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(#7338): Persisted styles correctly apply to StackedPlotItems on mount #7341

Merged
merged 10 commits into from
Jan 8, 2024

Conversation

ozyx
Copy link
Member

@ozyx ozyx commented Jan 4, 2024

Closes #7338

Styles weren't being applied to StackedPlotItems correctly because we would manually mount them (using Vue.createApp). This PR updates StackedPlotItem to use Plots directly in the template (since only Plots end up in StackedPlots anyway, we don't need to do anything dynamic).

Also fixes a small inconsistency where staleness styling wasn't being applied over custom border color styles for Stacked Plot Items.

Describe your changes:

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

deploysentinel bot commented Jan 4, 2024

Current Playwright Test Results Summary

✅ 15 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 01/08/2024 09:31:52am UTC)

Run Details

Running Workflow e2e-couchdb on Github Actions

Commit: b952990

Started: 01/08/2024 09:29:59am UTC

⚠️ Flakes

📄   functional/tree.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Main Tree Creating a child object on one tab and expanding its parent on the other shows the correct composition @couchdb @2p
Retry 1Initial Attempt
0% (0) 0 / 23 runs
failed over last 7 days
4.35% (1) 1 / 23 run
flaked over last 7 days

View Detailed Build Results


Current Playwright Test Results Summary

✅ 173 Passing - ⚠️ 4 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 01/08/2024 09:31:52am UTC)

Run Details

Running Job e2e-stable on CircleCI

Commit: b952990

Started: 01/04/2024 09:25:22am UTC

⚠️ Flakes

📄   functional/plugins/styling/stackedPlotStyling.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stacked Plot styling styling the overlay plot properly applies the styles to all containers
Retry 1Initial Attempt
31.58% (12) 12 / 38 runs
failed over last 7 days
2.63% (1) 1 / 38 run
flaked over last 7 days

📄   functional/plugins/plot/logPlot.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Log plot tests Log Plot ticks are functionally correct in regular and log mode and after refresh
Retry 2Retry 1Initial Attempt
1.82% (1) 1 / 55 run
failed over last 7 days
20% (11) 11 / 55 runs
flaked over last 7 days

📄   functional/planning/timelist.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Time List Create a Time List, add a single Plan to it and verify all the activities are displayed with no milliseconds
Retry 1Initial Attempt
2.08% (1) 1 / 48 run
failed over last 7 days
60.42% (29) 29 / 48 runs
flaked over last 7 days

📄   functional/plugins/notebook/restrictedNotebook.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Restricted Notebook with a page locked and with an embed @addinit Disallows embeds to be deleted if page locked @addinit
Retry 1Initial Attempt
4.08% (2) 2 / 49 runs
failed over last 7 days
53.06% (26) 26 / 49 runs
flaked over last 7 days

View Detailed Build Results


hexToRGB(setBorderColor),
hexToRGB(setBackgroundColor),
hexToRGB(setTextColor),
page.getByLabel('Plot Container Style Target').first()
Copy link
Collaborator

Choose a reason for hiding this comment

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

🥇

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

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

Comparison is base (70de736) 55.78% compared to head (b952990) 55.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7341      +/-   ##
==========================================
- Coverage   55.78%   55.46%   -0.32%     
==========================================
  Files         657      657              
  Lines       26203    26173      -30     
  Branches     2549     2546       -3     
==========================================
- Hits        14618    14518     -100     
- Misses      10881    10954      +73     
+ Partials      704      701       -3     
Flag Coverage Δ *Carryforward flag
e2e-full 41.04% <ø> (-0.02%) ⬇️ Carriedforward from 930f95f
e2e-stable 58.94% <ø> (+0.16%) ⬆️
unit 48.30% <0.00%> (-0.53%) ⬇️

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

Files Coverage Δ
src/plugins/plot/PlotView.vue 69.81% <ø> (+1.29%) ⬆️
src/plugins/plot/stackedPlot/StackedPlotItem.vue 22.38% <0.00%> (-15.12%) ⬇️

... and 22 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 70de736...b952990. Read the comment docs.

@ozyx ozyx added the type:bug label Jan 4, 2024
@ozyx ozyx added this to the Target:3.3.0 milestone Jan 4, 2024
@@ -78,7 +85,7 @@ export default {
PlotLegend
},
mixins: [stalenessMixin],
inject: ['openmct', 'domainObject', 'path'],
inject: ['openmct', 'domainObject'],
Copy link
Member Author

Choose a reason for hiding this comment

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

this isn't used so i removed it

};
},
watch: {
Copy link
Member Author

Choose a reason for hiding this comment

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

no more need for this since we pass them all as props directly

this.subscribeToStaleness(object, (stalenessResponse) => {
this.updateComponentProp('isStale', stalenessResponse.isStale);
});
this.subscribeToStaleness(object);
Copy link
Member Author

Choose a reason for hiding this comment

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

we don't need to set with the callback since the mixin already provides and updates isStale

@ozyx ozyx marked this pull request as ready for review January 4, 2024 09:31
@unlikelyzero unlikelyzero self-requested a review January 7, 2024 18:51
openmct: this.openmct,
domainObject: this.childObject
};
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

why isn't this line covered

Copy link
Member Author

Choose a reason for hiding this comment

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

coverage metrics are out of whack

@scottbell scottbell added the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 8, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 8, 2024
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.

Love all the deleted code @ozyx - good work!

Before:

Screen.Recording.2024-01-08.at.10.43.06.AM.mov

After:

Screen.Recording.2024-01-08.at.10.41.42.AM.mov

@ozyx ozyx merged commit dfba4e2 into master Jan 8, 2024
29 of 30 checks passed
@ozyx ozyx deleted the mct7338 branch January 8, 2024 18:19
@unlikelyzero unlikelyzero modified the milestones: Target:3.3.0, Target:4.0.0 Jan 17, 2024
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.

[Styling] Persisted styles don't get applied to Stacked Plot Items
3 participants