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(overlay plot): legend updates correctly when removing element via remove action #7531

Merged
merged 4 commits into from
Mar 5, 2024

Conversation

ozyx
Copy link
Member

@ozyx ozyx commented Feb 28, 2024

Closes #7530
Closes #7527

Describe your changes:

  • Fixes an issue where removing a single item from an Overlay Plot via the Remove Action would remove 2 legend items
  • Fixes an issue causing continuous errors to be thrown after removing an item from an Overlay Plot via the Remove action
  • Small a11y improvement to legend items

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 a notable change that will require a special callout in the release notes Notable Change ? For example, will this break compatibility with existing APIs or projects which source these plugins?

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?

@ozyx ozyx added the type:bug label Feb 28, 2024
@ozyx ozyx added this to the Target:4.0.0 milestone Feb 28, 2024
Copy link

codecov bot commented Feb 28, 2024

Codecov Report

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

Project coverage is 55.25%. Comparing base (0bdd096) to head (37afb70).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7531      +/-   ##
==========================================
+ Coverage   55.22%   55.25%   +0.03%     
==========================================
  Files         672      672              
  Lines       26969    26965       -4     
  Branches     2622     2622              
==========================================
+ Hits        14893    14900       +7     
+ Misses      11356    11344      -12     
- Partials      720      721       +1     
Flag Coverage Δ
e2e-full 23.32% <ø> (ø)
e2e-stable 59.55% <ø> (+0.20%) ⬆️
unit 48.53% <40.00%> (+0.02%) ⬆️
Files Coverage Δ
src/plugins/plot/legend/PlotLegend.vue 61.29% <ø> (+0.42%) ⬆️
...rc/plugins/plot/legend/PlotLegendItemCollapsed.vue 51.72% <40.00%> (-0.66%) ⬇️

... and 3 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 0bdd096...37afb70. Read the comment docs.

@@ -165,7 +165,6 @@ export default {
this.registerListeners(this.config);
}
this.listenTo(this.config.legend, 'change:expandByDefault', this.changeExpandDefault, this);
this.initialize();
Copy link
Member Author

Choose a reason for hiding this comment

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

remove duplicate code

Comment on lines +209 to +211
if (seriesIndexToRemove === -1) {
return;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

don't remove a seriesModel if we don't find one in the list

Copy link
Contributor

Choose a reason for hiding this comment

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

haha, that ... makes sense

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.

😎

@akhenry akhenry removed the request for review from shefalijoshi March 4, 2024 21:37
Copy link
Contributor

@jvigliotta jvigliotta left a comment

Choose a reason for hiding this comment

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

This looks great! Tested it out as well, working flawlessly.

@jvigliotta jvigliotta enabled auto-merge (squash) March 5, 2024 01:24
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Mar 5, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Mar 5, 2024
@jvigliotta jvigliotta merged commit 39ab81c into master Mar 5, 2024
22 of 25 checks passed
@jvigliotta jvigliotta deleted the mct7527 branch March 5, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants