Skip to content
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

Fix NAD branch width when zooming in Microsoft Edge #114

Closed
wants to merge 16 commits into from

Conversation

YenguiSeddik
Copy link
Contributor

@YenguiSeddik YenguiSeddik commented Nov 5, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce?

Bug Fix: When using Microsoft Edge, CSS rules for branch width do not apply when zooming in NAD. The behivior. the behavior is fixed at the slightest movement of the svg, but when zooming without moving the svg, the width of the branches does not change dynamically as expected

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

Signed-off-by: Seddik Yengui <seddik.yengui@rte-france.com>
Seddik Yengui and others added 5 commits November 5, 2024 15:14
Signed-off-by: Seddik Yengui <seddik.yengui@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui@rte-france.com>
fix
Signed-off-by: Seddik Yengui <seddik.yengui@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
@YenguiSeddik YenguiSeddik changed the title [WIP] Fix NAD branch width when zooming in Microsoft Edge Fix NAD branch width when zooming in Microsoft Edge Nov 14, 2024
@@ -9,77 +9,67 @@ export enum THRESHOLD_STATUS {
BELOW = 'BELOW',
ABOVE = 'ABOVE',
}
export type CSS_DECLARATION = Record<string, string>;

export type CSS_DECLARATION = Record<string, (value: number) => string>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export type CSS_DECLARATION = Record<string, (value: number) => string>;
export type CSS_DECLARATION = Record<string, ((value: number) => string) | string>;

then use CSS_DECLARATION instead of Record<string, string> ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For updateSvgCssDisplayValue function, the type should be Record<string, string> or we have to consider both cases of string and (value: number) => string.
Instead, I kept the old CSS_DECLERATION type as Record<string, string> and added a new type DYNAMIC_CSS_DECLARATION = Record<string, ((value: number) => string) | string>; which gives the user the freedom to use a function or a value

Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Comment on lines 1409 to 1414
'CSS Rule ' +
rule.cssSelector +
' above threshold ' +
maxDisplayedSize +
' >= ' +
rule.threshold
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing, we should remove this log.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

Seddik Yengui added 4 commits November 25, 2024 03:43
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
sBouzols and others added 4 commits December 3, 2024 09:19
Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
…sybl-diagram-viewer into fix_nad_branch_edges

Signed-off-by: Seddik Yengui <seddik.yengui_externe@rte-france.com>
Copy link

sonarqubecloud bot commented Dec 9, 2024

@EstherDarkish
Copy link
Contributor

Another solution was merged. This is now obsolete.

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