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

Plot legends expand by default when enabled #7453

Merged

Conversation

scottbell
Copy link
Contributor

@scottbell scottbell commented Feb 1, 2024

Closes #7403

Describe your changes:

Rely on Vue to enable/disable legend. Ensure we check config on mount for expansion and properties.

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?

@scottbell scottbell linked an issue Feb 1, 2024 that may be closed by this pull request
7 tasks
@scottbell scottbell added this to the Target:4.0.0 milestone Feb 1, 2024
.cspell.json Show resolved Hide resolved
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

Attention: 34 lines in your changes are missing coverage. Please review.

Comparison is base (cd6adba) 41.22% compared to head (8cacd5d) 52.89%.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #7453       +/-   ##
===========================================
+ Coverage   41.22%   52.89%   +11.67%     
===========================================
  Files         428      671      +243     
  Lines       13353    27002    +13649     
  Branches        0     2629     +2629     
===========================================
+ Hits         5505    14284     +8779     
- Misses       7848    11994     +4146     
- Partials        0      724      +724     
Flag Coverage Δ *Carryforward flag
e2e-full 48.90% <ø> (+7.67%) ⬆️ Carriedforward from 9799b04
e2e-stable 42.99% <25.00%> (?)
unit 48.43% <58.02%> (?)

*This pull request uses carry forward flags. Click here to find out more.

Files Coverage Δ
src/plugins/plot/configuration/XAxisModel.js 57.57% <100.00%> (ø)
src/plugins/plot/inspector/PlotOptionsItem.vue 75.00% <ø> (ø)
src/plugins/plot/inspector/forms/LegendForm.vue 51.51% <100.00%> (ø)
src/plugins/plot/inspector/forms/SeriesForm.vue 31.74% <ø> (ø)
src/plugins/persistence/couch/plugin.js 88.88% <66.66%> (+7.40%) ⬆️
src/plugins/plot/inspector/PlotOptionsBrowse.vue 83.87% <85.71%> (ø)
src/plugins/plot/legend/PlotLegend.vue 60.86% <88.88%> (ø)
src/plugins/plot/stackedPlot/StackedPlotItem.vue 26.47% <0.00%> (ø)
...rc/plugins/plot/legend/PlotLegendItemCollapsed.vue 52.38% <51.72%> (ø)
src/plugins/plot/legend/PlotLegendItemExpanded.vue 46.06% <50.00%> (ø)

... and 495 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 cd6adba...8cacd5d. Read the comment docs.

@davetsay davetsay added the pr:e2e:flakefinder Runs the tests 10 times label Feb 1, 2024
@github-actions github-actions bot removed the pr:e2e:flakefinder Runs the tests 10 times label Feb 2, 2024
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 2, 2024
@scottbell scottbell marked this pull request as ready for review February 2, 2024 09:56
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 2, 2024
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.

Changes look awesome overall. I have a few comments and suggestions before we merge

e2e/tests/functional/plugins/plot/overlayPlot.e2e.spec.js Outdated Show resolved Hide resolved
e2e/tests/functional/plugins/plot/overlayPlot.e2e.spec.js Outdated Show resolved Hide resolved
e2e/tests/functional/plugins/plot/overlayPlot.e2e.spec.js Outdated Show resolved Hide resolved
e2e/tests/functional/plugins/plot/overlayPlot.e2e.spec.js Outdated Show resolved Hide resolved
src/plugins/plot/configuration/XAxisModel.js Show resolved Hide resolved
src/plugins/plot/legend/PlotLegendItemCollapsed.vue Outdated Show resolved Hide resolved
src/plugins/plot/stackedPlot/pluginSpec.js Show resolved Hide resolved
@scottbell scottbell requested a review from ozyx February 5, 2024 10:22
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 5, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 5, 2024
Copy link
Contributor

@shefalijoshi shefalijoshi left a comment

Choose a reason for hiding this comment

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

The changes themselves are working fine!

During testing I noticed that when I toggle the Expand by Default option and save it, the change is not immediately applied. A refresh is required for the changes to take effect.

@scottbell
Copy link
Contributor Author

scottbell commented Feb 5, 2024

During testing I noticed that when I toggle the Expand by Default option and save it, the change is not immediately applied. A refresh is required for the changes to take effect.

@shefalijoshi My interpretation of "Expand by Default" was the it should expand the legend on page load, not to immediately expand the legend. Is that what we want?

@shefalijoshi
Copy link
Contributor

During testing I noticed that when I toggle the Expand by Default option and save it, the change is not immediately applied. A refresh is required for the changes to take effect.

@shefalijoshi My interpretation of "Expand by Default" was the it should expand the legend on page load, not to immediately expand the legend. Is that what we want?

Right. I'm curious about what @charlesh88 thinks. I'll approve this for now. If you feel like the change needs to go into a different PR, I'm ok with that.

@shefalijoshi shefalijoshi self-requested a review February 5, 2024 18:33
@scottbell
Copy link
Contributor Author

During testing I noticed that when I toggle the Expand by Default option and save it, the change is not immediately applied. A refresh is required for the changes to take effect.

@shefalijoshi My interpretation of "Expand by Default" was the it should expand the legend on page load, not to immediately expand the legend. Is that what we want?

Right. I'm curious about what @charlesh88 thinks. I'll approve this for now. If you feel like the change needs to go into a different PR, I'm ok with that.

It's been implemented to immediately expand, but can easily be reverted.

@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 5, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 5, 2024
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 6, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 6, 2024
* simplify config loading logic

* wip

* fixed stacked plot legend issue

* fix legend

* remove console.debugs

* remove extraneous prop

* add test

* fix legend

* use props
@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 7, 2024
@scottbell scottbell enabled auto-merge (squash) February 7, 2024 18:32
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Feb 7, 2024
@scottbell scottbell merged commit 5f8d689 into master Feb 7, 2024
20 of 21 checks passed
@scottbell scottbell deleted the 7403-plot-legends-legends-not-expanding-when-requested branch February 7, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Plot Legends] Legends not expanding when requested
4 participants