Skip to content

Add slider for font size of edge link labels, Correct edge label dates#1042

Merged
dacowan404 merged 4 commits intoCDCgov:devfrom
glstott:dev
Apr 15, 2026
Merged

Add slider for font size of edge link labels, Correct edge label dates#1042
dacowan404 merged 4 commits intoCDCgov:devfrom
glstott:dev

Conversation

@glstott
Copy link
Copy Markdown
Collaborator

@glstott glstott commented Apr 1, 2026

Addresses feature request: #1015

Items changed for feature:

  • added slider in UI under the Links tab Labels and Tooltips dropdown.
  • Updated components for new data element and style updates, using similar code to the node label font size slider.

Screenshots of UI update on sample data:

image image

@glstott glstott requested a review from mossy426-cdc April 1, 2026 17:22
@glstott
Copy link
Copy Markdown
Collaborator Author

glstott commented Apr 12, 2026

Addresses bug "Dates as Node labels not displaying correctly) # 183"

  • Modified files-plugin.component.ts to read in date elements as dates when loading an excel file.
  • Modified files-plugin.component.ts to pass data as formatted string instead of a date object.

Screenshot for fix.
image

@glstott glstott changed the title Add slider for font size of edge link labels Add slider for font size of edge link labels, Correct edge label dates Apr 12, 2026
@dacowan404 dacowan404 requested review from dacowan404 and removed request for mossy426-cdc April 14, 2026 19:16
@dacowan404
Copy link
Copy Markdown
Collaborator

Sorry, for the delay in reviewing this. Overall, it looks good but I have a couple of notes. You can probably ignore my merge branch (c54bdf7) for this pull request. I thought I'd be able to resolve my issue 1 below but it did not.

The link label with dates issue looks good to me.

For the link label sizing issue, it seems to be working but there are a few things to address.
1.) For some reason (I think it's coming from git), a few lines relating node shapes in 2D view were removed resulting in custom shapes no longer working.
2.) See image below, but the row for link slider isn't taking up the full row and it doesn't look consistent with the other rows. Looking at the HTML, the div.form-group.row for Label Size is within the div.form-group.row for Label. When I separate these two div, it seems to be spacing correctly.
3.) <input type="range" class="custom-range" id="link-label-size" min="6" value="16" max="72" [(ngModel)]="SelectedLinkLabelSizeVariable" (change)="onLinkLabelSizeChange($event)">. using [(ngModel)] creates two way binding between the component (ts) and template (html). So changes in one will be reflexed in the other. In this case there is no SelectedLinkLabelSizeVariable in the component so I'm surprised it isn't giving an error for that reason. You could either make that variable in the component or update the template to use widgets['link-label-size'].
This one correctly uses (change) instead of (ngModelChange). (ngModelChange) usually fires continuously while the slider is being dragged which will result in too many function calls. (change) usually fires once when the drag is finished and results in 1 function call.
Additionally for reference the value="16" is there for historic (pre-Angular) and can be removed if needed. If the [(ngModel)] is set correctly it uses that for initial value anyways.

image

@glstott
Copy link
Copy Markdown
Collaborator Author

glstott commented Apr 14, 2026

  1. Copied all recent changes from the dev branch on the two files to ensure there isn't another deletion from Git.

  2. Moved misplaced div to correct the formatting on the UI

  3. Removed the unnecessary value=16 parameter. Used the widget option you suggested, and now it looks like it only updates on release of the slider. Thank you for the suggestion and helpful description of the differences.

@dacowan404 dacowan404 merged commit 3f061e4 into CDCgov:dev Apr 15, 2026
4 checks passed
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.

2 participants