-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor global filter to support voltage range #3626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Rename `getBaseVoltage` to `getBaseVoltageInterval` - Update all relevant components and hooks to use voltage ranges and new method naming Signed-off-by: Florent MILLOT <florent.millot_externe@rte-france.com>
…ent and key cleanup Signed-off-by: Florent MILLOT <florent.millot_externe@rte-france.com>
|
Mathieu-Deharbe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
| <Checkbox size="small" checked={state.selected} /> | ||
| {option.filterType === FilterType.VOLTAGE_LEVEL ? ( | ||
| <Tooltip title={formatVoltageRange(option)} placement="right"> | ||
| <Typography>{label}</Typography> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now the titles are small but wouldn't it be more careful to use a OverflowableText just in case ? Just like the others. After all this part is already partly customizable by the user.
| <ListItemButton selected={state.selected} component="li" {...otherProps}> | ||
| <Checkbox size="small" checked={state.selected} /> | ||
| {option.filterType === FilterType.VOLTAGE_LEVEL ? ( | ||
| <Tooltip title={formatVoltageRange(option)} placement="right"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last time I added a tooltip Stéphane asked for an arrow on it. I like it :
| <Tooltip title={formatVoltageRange(option)} placement="right"> | |
| <Tooltip title={formatVoltageRange(option)} placement="right" arrow> |



PR Summary
This pull request refactors the global filter to support voltage ranges. Also, the method
getBaseVoltageis renamed togetBaseVoltageInterval.