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

d3 implementation of progress pie chart #7485

Merged
merged 31 commits into from
Mar 5, 2024
Merged

d3 implementation of progress pie chart #7485

merged 31 commits into from
Mar 5, 2024

Conversation

shefalijoshi
Copy link
Contributor

@shefalijoshi shefalijoshi commented Feb 7, 2024

Closes #7377 #7483

Describe your changes:

Use the d3.arc API to draw pie progress
-driveby to fix some of the flaky percy tests
-driveby to add a mission percy test

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Is this a breaking change to be called out in the release notes?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 55.28%. Comparing base (ef62633) to head (b7628e7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7485      +/-   ##
==========================================
+ Coverage   55.24%   55.28%   +0.03%     
==========================================
  Files         672      673       +1     
  Lines       26965    26994      +29     
  Branches     2622     2623       +1     
==========================================
+ Hits        14898    14924      +26     
- Misses      11346    11351       +5     
+ Partials      721      719       -2     
Flag Coverage Δ
e2e-full 23.30% <16.00%> (-0.02%) ⬇️
e2e-stable 59.61% <100.00%> (+0.08%) ⬆️
unit 48.50% <15.38%> (-0.04%) ⬇️
Files Coverage Δ
src/plugins/timelist/TimelistComponent.vue 61.80% <ø> (ø)
src/plugins/timelist/svg-progress.js 100.00% <100.00%> (ø)
src/plugins/timelist/ExpandedViewItem.vue 4.68% <0.00%> (-0.32%) ⬇️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef62633...b7628e7. Read the comment docs.

@ozyx ozyx added this to the Target:4.0.0 milestone Feb 8, 2024
@ozyx ozyx added the type:feature Feature. Required intentional design label Feb 8, 2024
Copy link
Contributor

@charlesh88 charlesh88 left a comment

Choose a reason for hiding this comment

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

The pie isn't displaying properly at 0% (yellow arrow) and 100% (orange arrow).

Screenshot 2024-02-08 at 1 47 38 PM

  • At 0%, it's displaying a very thin sliver of progress, but shouldn't.
  • At 100%, it's displaying a very thin sliver of "incompleteness", but shouldn't.

This may be due to not "rounding" things properly; I had to deal with this in the previous code when progress was near 100%: if the amount of remaining update (in terms of percent) was less than the percent-update-per-tick, my version was always stalling and never getting to 100%. I added a test to check if the remaining percent < the percent-update-per-tick, and if so, directly set the percentage to 100%.

Maybe there's a related thing near 0?

@shefalijoshi
Copy link
Contributor Author

The pie isn't displaying properly at 0% (yellow arrow) and 100% (orange arrow).

Screenshot 2024-02-08 at 1 47 38 PM

* At 0%, it's displaying a very thin sliver of progress, but shouldn't.

* At 100%, it's displaying a very thin sliver of "incompleteness", but shouldn't.

This may be due to not "rounding" things properly; I had to deal with this in the previous code when progress was near 100%: if the amount of remaining update (in terms of percent) was less than the percent-update-per-tick, my version was always stalling and never getting to 100%. I added a test to check if the remaining percent < the percent-update-per-tick, and if so, directly set the percentage to 100%.

Maybe there's a related thing near 0?

0% works now:

Screen.Recording.2024-02-12.at.10.14.11.AM.mov

and so does 100%:

Screen.Recording.2024-02-12.at.10.16.40.AM.mov

shefalijoshi and others added 2 commits February 12, 2024 10:22
- Minor tweaks to `s-selected` styling.
Copy link
Contributor

@charlesh88 charlesh88 left a comment

Choose a reason for hiding this comment

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

0 and 100% pie issues addressed, looks great!

@charlesh88
Copy link
Contributor

This is ready to ship! My name is @charlesh88 and I approve this message.

@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 21, 2024
@ozyx ozyx enabled auto-merge (squash) February 21, 2024 23:37
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 21, 2024
@unlikelyzero
Copy link
Collaborator

let's make sure we have coverage

@unlikelyzero unlikelyzero self-assigned this Feb 22, 2024
@unlikelyzero unlikelyzero self-requested a review February 22, 2024 00:15
Copy link
Collaborator

@unlikelyzero unlikelyzero left a comment

Choose a reason for hiding this comment

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

Need the simplest visual test

@ozyx ozyx self-requested a review March 5, 2024 20:03
Copy link
Member

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

LGTM! Great job on the tests

e2e/constants.js Outdated
@@ -17,3 +17,9 @@ export const MISSION_TIME = 1732413600000; // Saturday, November 23, 2024 6:00:0
*/
export const VISUAL_URL =
'./#/browse/mine?tc.mode=fixed&tc.startBound=1693592063607&tc.endBound=1693593893607&tc.timeSystem=utc&view=grid&hideInspector=true&hideTree=true';

/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

@shefalijoshi can you update this?

@unlikelyzero unlikelyzero merged commit df96972 into master Mar 5, 2024
29 of 38 checks passed
@unlikelyzero unlikelyzero deleted the redo-pie-chart branch March 5, 2024 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Feature. Required intentional design
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "Expanded View" for timelist for Situational Awareness dashboards
5 participants