-
Notifications
You must be signed in to change notification settings - Fork 26
Sequence diagram first part #2302
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
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.
A few comments added but overall LGTM
async function deleteAllInstances() { | ||
try { | ||
await Promise.all(sortedInstances.value.filter((instance) => instance.name === endpointName).map((instance) => store.deleteEndpointInstance(instance))); | ||
await Promise.all(sortedInstances.value.filter((instance: EndpointsView) => instance.name === endpointName).map((instance: EndpointsView) => store.deleteEndpointInstance(instance))); |
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 this really needed?
Isn't the array typed already?
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.
it started failing my build. Will try removing it again
try { | ||
await store.updateEndpointSettings( | ||
filteredEndpoints.value.filter((endpoint) => (dialogWarningOperation.value === Operation.Track && !endpoint.track_instances) || (dialogWarningOperation.value === Operation.DoNotTrack && endpoint.track_instances)) | ||
filteredEndpoints.value.filter((endpoint: LogicalEndpoint) => (dialogWarningOperation.value === Operation.Track && !endpoint.track_instances) || (dialogWarningOperation.value === Operation.DoNotTrack && endpoint.track_instances)) |
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 this really needed?
Isn't the array typed already?
|
||
<template> | ||
<div class="outer"> | ||
<svg class="sequence-diagram" :width="`max(100%, ${isNaN(maxWidth) ? 0 : maxWidth}px)`" :height="maxHeight + 20"> |
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.
Should we be rendering at all if isNaN(maxWidth)
is true
?
I have created a spinner for exactly this purpose?
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.
will add this to the latest branch rather than this one
src/Frontend/src/components/messages/SequenceDiagram/EndpointsComponent.vue
Show resolved
Hide resolved
src/Frontend/src/components/messages/SequenceDiagram/EndpointsComponent.vue
Outdated
Show resolved
Hide resolved
@mouseover="() => store.setHighlightId(arrow.id)" | ||
@mouseleave="() => store.setHighlightId()" | ||
> | ||
<rect v-if="arrow.highlight && arrow.messageTypeOffset" :width="arrow.highlightTextWidth + 19 + 4 + 4" :height="arrow.highlightTextHeight + 4 + 4" fill="var(--highlight-background)" /> |
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 are the magic numbers?
+ 19 + 4 + 4
+ 4 + 4
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 are we using underscores for private variables?
You can use private visibility - https://www.typescriptlang.org/docs/handbook/2/classes.html#private
Or you can set it at the cstructor - https://www.typescriptlang.org/docs/handbook/2/classes.html#parameter-properties
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 not use underscore? I am using private visibility where required
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 code base does not use _ to mean "private" anywhere, are we planning to make this a rule now?
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.
no, it's private _variableName
, not just _variableName
. Since the variable name is the same as what's exposed publicly (as readonly) then I'm using underscore to be able to differentiate
Edit: there was one place where it looks like there was an erroneous _variableName, fixed
#endpoints: Endpoint[]; | ||
#handlers: Handler[]; | ||
#processingRoutes: MessageProcessingRoute[]; |
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.
Declare them as private instead? Easier to understand for c# devs
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.
not truly private though. I was only reverting to the typescript private where necessary due to use of proxies
); | ||
|
||
const names = () => filteredInstances.value.map((value) => value.host_display_name); | ||
const names = () => filteredInstances.value.map((value: EndpointsView) => value.host_display_name); |
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 this needed?
); | ||
|
||
const names = () => filteredHealthyEndpoints.value.map((value) => value.name); | ||
const names = () => filteredHealthyEndpoints.value.map((value: LogicalEndpoint) => value.name); |
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 this needed?
…Component.vue Co-authored-by: John Simons <john.simons@particular.net>
right flow only, and no message selection