Skip to content

Conversation

@Tristan-WorkGH
Copy link
Contributor

As <GlobalFilter/> is now not use only by results tables, moving it under components.

Also removing some redundant declaration of variable types.

@sonarqubecloud
Copy link

Comment on lines +8 to +12
// complete individual global filter
import type { UUID } from 'crypto';

// complete individual global filter
export interface GlobalFilter {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate comment.

import { AppState } from '../../redux/reducer';

export const useGlobalFilterOptions = () => {
export function useGlobalFilterOptions() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer this syntax so I am fine with it but is it the "official" syntax of gridsuite ? @etiennehomer ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both are used. It's ok with "function"

label: countryCode,
filterType: FilterType.COUNTRY,
}))
countryCodes.map((countryCode) => ({ label: countryCode, filterType: FilterType.COUNTRY }))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you put all this on a single line ? I think it reduces the readability.

.then((nominalVoltages) => {
setVoltageLevelsFilter(
nominalVoltages.map((nominalV: number) => ({
nominalVoltages.map((nominalV) => ({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you reduce the typing ? Is it wrong ?

Comment on lines +21 to +24
/**
* globals filters are the filters applied to computation results
* they may contain generic filters
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not very useful anymore. At least not here.

Copy link
Contributor

@Mathieu-Deharbe Mathieu-Deharbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change of folder is fine for me. Let's just wait that the recette is tagged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants