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(conditional styling): conditional visibility for images and alpha-numerics in display layouts #7824

Conversation

ozyx
Copy link
Member

@ozyx ozyx commented Sep 4, 2024

Closes #7718
Closes #7782

Describe your changes:

Conditionally shows image views and alpha-numeric views within display layouts when visibility is toggled via a conditional style. This is achieved via Vue's v-show conditional rendering, which applies a display: none; when the v-show condition is false.

Adds a couple regression tests plus a test which generates a localstorage state with a basic condition set that can be used in other e2e tests to save execution time.

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? For example, will this break compatibility with existing APIs or projects that consume 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.
  • 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 Sep 4, 2024
@ozyx ozyx added this to the Target:4.0.1 milestone Sep 4, 2024
@ozyx ozyx linked an issue Sep 4, 2024 that may be closed by this pull request
7 tasks
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.

Project coverage is 56.96%. Comparing base (21a4335) to head (9f980e4).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/ui/registries/ToolbarRegistry.js 86.66% 2 Missing ⚠️
src/plugins/displayLayout/components/ImageView.vue 0.00% 1 Missing ⚠️
...plugins/displayLayout/components/TelemetryView.vue 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7824      +/-   ##
==========================================
+ Coverage   56.14%   56.96%   +0.82%     
==========================================
  Files         674      674              
  Lines       27283    27281       -2     
  Branches     2669     2671       +2     
==========================================
+ Hits        15317    15541     +224     
+ Misses      11629    11401     -228     
- Partials      337      339       +2     
Flag Coverage Δ
e2e-ci 61.76% <80.00%> (+6.28%) ⬆️
e2e-full 23.50% <80.00%> (-31.63%) ⬇️
unit 49.34% <76.47%> (-0.21%) ⬇️
Files with missing lines Coverage Δ
...ugins/condition/components/ConditionCollection.vue 0.00% <ø> (ø)
src/ui/toolbar/components/ToolbarButton.vue 21.42% <ø> (ø)
src/ui/toolbar/components/ToolbarMenu.vue 0.00% <ø> (ø)
src/plugins/displayLayout/components/ImageView.vue 0.00% <0.00%> (ø)
...plugins/displayLayout/components/TelemetryView.vue 2.38% <0.00%> (-0.02%) ⬇️
src/ui/registries/ToolbarRegistry.js 86.66% <86.66%> (-2.81%) ⬇️

... and 73 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 21a4335...9f980e4. Read the comment docs.

scottbell

This comment was marked as resolved.

@ozyx ozyx requested a review from scottbell September 5, 2024 18:01
Copy link
Contributor

@scottbell scottbell left a comment

Choose a reason for hiding this comment

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

Works great - well done!

@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Sep 6, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Sep 6, 2024
@ozyx
Copy link
Member Author

ozyx commented Sep 6, 2024

Waiting to merge this due due an anomaly i found in the visual tests related to me changing a div to a button element. investigating

@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Sep 9, 2024
@ozyx ozyx enabled auto-merge (squash) September 9, 2024 22:40
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Sep 9, 2024
@ozyx ozyx merged commit 440474b into master Sep 9, 2024
21 of 23 checks passed
@ozyx ozyx deleted the mct7718-conditional-styling-visibility-option-on-conditional-styling-is-broken branch September 9, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants