-
Notifications
You must be signed in to change notification settings - Fork 65
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
Sankey 3.2.2.0v #161
Sankey 3.2.2.0v #161
Conversation
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.
LGTM, a lot of calc changed, test pass?
|
src/sankeyDiagram.ts
Outdated
@@ -214,6 +216,9 @@ export class SankeyDiagram implements IVisual { | |||
values: "Weight" | |||
}; | |||
|
|||
public static InputTooltipValue: string = "Input "; | |||
public static OutputTooltipValue: string = "Output "; |
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.
Why do we need space in the end of the string?
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.
these should be localized
src/sankeyDiagram.ts
Outdated
|
||
if (valueDisplayName) { | ||
tooltips.push({ | ||
displayName: SankeyDiagram.InputTooltipValue + valueDisplayName || SankeyDiagram.RoleNames.values, |
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.
is '+' a good idea of string concatenation?
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.
use backticks(`) like '${SankeyDiagram.InputTooltipValue} ${valueDisplayName}'
do not store whitespace inside of strings
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.
fixed and localized 09b4985
src/sankeyDiagram.ts
Outdated
@@ -214,6 +216,9 @@ export class SankeyDiagram implements IVisual { | |||
values: "Weight" | |||
}; | |||
|
|||
public static InputTooltipValue: string = "Input "; | |||
public static OutputTooltipValue: string = "Output "; |
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.
these should be localized
src/sankeyDiagram.ts
Outdated
|
||
if (valueDisplayName) { | ||
tooltips.push({ | ||
displayName: SankeyDiagram.InputTooltipValue + valueDisplayName || SankeyDiagram.RoleNames.values, |
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.
use backticks(`) like '${SankeyDiagram.InputTooltipValue} ${valueDisplayName}'
do not store whitespace inside of strings
src/sankeyDiagram.ts
Outdated
link.dySource = shiftByAxisY; | ||
else | ||
link.dyDestination = shiftByAxisY; | ||
link.dySource = shiftByAxisY; |
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.
what is dySource and dyDestination?
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.
renamed 508dec9
src/sankeyDiagram.ts
Outdated
@@ -1523,6 +1517,10 @@ export class SankeyDiagram implements IVisual { | |||
.darker(SankeyDiagram.StrokeColorFactor) | |||
.toString() | |||
) | |||
.attr("tabindex", 0) |
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.
is tabindex = 0 applied to each node?
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.
fixed b723383
x1 = link.destination.x; | ||
} | ||
y1: number, | ||
curveRadius: number, |
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.
Is it possible to set high value of curveRadius to selfLinks (so that there is no overlap between self link and backward link)
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.
fixed 9641777
style/visual.less
Outdated
outline: none; | ||
} | ||
|
||
.nodeRect:focus-visible { |
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.
works on Edge, Chrome, Firefox?
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.
works as expected on Edge, Chrome and Firefox
style/visual.less
Outdated
&:focus-visible { | ||
outline: auto 1px; | ||
outline-color: -webkit-focus-ring-color; | ||
.link:focus { |
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.
try using less hierarchy like here
https://riptutorial.com/less/example/29941/pseudo-elements
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.
fixed a68bc7a
const links: NodeListOf<HTMLElement> = visualBuilder.linkElements; | ||
|
||
links[0].dispatchEvent(enterEvent); | ||
|
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.
expect(links[0]...).toBeTrue();
const otherLinks = links.slice(1);
otherLinks.forEach((link)=>expect(link...).toBeFalse())
looks kinda more clear to me
LGTM |
No description provided.