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

Get actions collection on Preview Container update #7385

Merged
merged 5 commits into from
Jan 26, 2024

Conversation

michaelrogers
Copy link
Contributor

@michaelrogers michaelrogers commented Jan 18, 2024

Closes #7158

Describe your changes:

Added updated lifecycle hook to fetch actions collection after the Preview Container is updated. This resolves not all menu items being available when viewing in Preview mode.

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 Jan 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3e5ada8) 56.00% compared to head (3c10175) 55.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7385      +/-   ##
==========================================
- Coverage   56.00%   55.92%   -0.08%     
==========================================
  Files         662      662              
  Lines       26301    26302       +1     
  Branches     2551     2551              
==========================================
- Hits        14730    14710      -20     
- Misses      10862    10887      +25     
+ Partials      709      705       -4     
Flag Coverage Δ
e2e-full 41.20% <ø> (-0.83%) ⬇️
e2e-stable 59.91% <ø> (-0.01%) ⬇️
unit 48.87% <100.00%> (-0.06%) ⬇️
Files Coverage Δ
src/ui/preview/PreviewContainer.vue 30.86% <100.00%> (+3.36%) ⬆️

... and 9 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 3e5ada8...3c10175. Read the comment docs.

@michaelrogers michaelrogers requested a review from ozyx January 18, 2024 21:09
Copy link
Contributor

@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, just one suggestion to add a comment. We should also add a quick e2e test

Comment on lines 111 to 113
updated() {
this.getActionsCollection(this.view);
},
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an unconventional change and might raise some eyebrows in the future. We should add a // FIXME: and a brief note explaining why it's here. We should also reference the issue URL

Copy link
Contributor

Choose a reason for hiding this comment

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

You know what? This totally escaped my mind. We might be able to just use await nextTick() in the mounted() hook before running this.getActionsCollection(this.view);. That way we're not running that on every update, even though I think it technically only gets run once anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, nextTick didn't bail us out this time so I left the updated lifeycle hook and added a fixme to give more context.

Copy link
Contributor

Choose a reason for hiding this comment

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

Damn! Ok, sounds good

@ozyx ozyx added the type:bug label Jan 18, 2024
@ozyx ozyx added this to the Target:3.3.0 milestone Jan 18, 2024
@michaelrogers michaelrogers requested a review from ozyx January 25, 2024 22:25
@ozyx
Copy link
Contributor

ozyx commented Jan 25, 2024

@michaelrogers just need to run a lint:fix on this bad boy. the failing e2e test should pass once we update to master

Copy link
Contributor

@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

@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 26, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 26, 2024
@michaelrogers michaelrogers enabled auto-merge (squash) January 26, 2024 15:36
@michaelrogers michaelrogers enabled auto-merge (squash) January 26, 2024 16:43
@michaelrogers michaelrogers merged commit 3e31bbe into master Jan 26, 2024
20 checks passed
@michaelrogers michaelrogers deleted the mct7158-preview-mode-menu-actions branch January 26, 2024 17:35
@unlikelyzero unlikelyzero modified the milestones: Target:3.3.0, Target:4.0.0 Feb 1, 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.

3 participants