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(#7055): Expand on image with double click #7308

Merged
merged 13 commits into from
Jan 14, 2024

Conversation

marcelo-earth
Copy link
Contributor

@marcelo-earth marcelo-earth commented Dec 17, 2023

Closes #7055

Describe your changes:

I added the expand function to dblclick function, allowing users to double-click on an image to enlarge it. I made a modification to the Imagery tests to verify this feature.

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 Dec 17, 2023

Current Playwright Test Results Summary

✅ 176 Passing - ⚠️ 3 Flaky

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

(Last updated on 01/10/2024 03:30:41am UTC)

Run Details

Running Job e2e-stable on CircleCI

Commit: bc04900

Started: 01/10/2024 03:25:26am UTC

⚠️ Flakes

📄   functional/plugins/imagery/exampleImagery.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Example Imagery in Display Layout Resizing the layout changes thumbnail visibility and size
Retry 1Initial Attempt
0% (0) 0 / 52 runs
failed over last 7 days
5.77% (3) 3 / 52 runs
flaked over last 7 days

📄   functional/plugins/tabs/tabs.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Tabs View Renders tabbed elements
Retry 1Initial Attempt
5% (3) 3 / 60 runs
failed over last 7 days
35% (21) 21 / 60 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.84% (3) 3 / 62 runs
failed over last 7 days
53.23% (33) 33 / 62 runs
flaked over last 7 days

View Detailed Build Results


Copy link

codecov bot commented Dec 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6ce340c) 55.85% compared to head (bc04900) 55.87%.

❗ Current head bc04900 differs from pull request most recent head f0dbf70. Consider uploading reports for the commit f0dbf70 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7308      +/-   ##
==========================================
+ Coverage   55.85%   55.87%   +0.02%     
==========================================
  Files         659      657       -2     
  Lines       26243    26198      -45     
  Branches     2549     2548       -1     
==========================================
- Hits        14658    14639      -19     
+ Misses      10880    10854      -26     
  Partials      705      705              
Flag Coverage Δ
e2e-full 41.06% <ø> (-0.08%) ⬇️
e2e-stable 59.09% <ø> (+0.04%) ⬆️
unit 48.86% <100.00%> (-0.03%) ⬇️
Files Coverage Δ
src/plugins/imagery/components/ImageryView.vue 40.19% <100.00%> (ø)

... and 13 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 6ce340c...f0dbf70. Read the comment docs.

@ozyx ozyx added the source:community Community contribution or request label Dec 18, 2023
@unlikelyzero unlikelyzero changed the title Expand on image with double click [CLA Approved] Expand on image with double click Dec 18, 2023
@ozyx ozyx self-requested a review December 18, 2023 18:58
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.

I can't seem to get this to work. Am I doing something wrong? Yep, I am. Need to embed the imagery in a layout first.

@ozyx ozyx added the type:bug label Dec 18, 2023
@ozyx ozyx added this to the Target:3.3.0 milestone Dec 18, 2023
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.

Looks good overall! Just had one small suggestion for consistency. And I agree with @unlikelyzero that we should have a functional test for this instead of the perf test.

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.

Looking good, just have a few comments for the e2e.


test('Can double-click on the image to view large image', async ({ page }) => {
// Double-click on the image to open large view
await page.locator('.image-wrapper').dblclick();
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing here. Is there a way we could avoid .locator() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! But I'm not sure if I did it right, would waitForSelector('.image-wrapper') work? If not, what would you recommend me to do (or use as the method to get the element)?

Copy link
Contributor

Choose a reason for hiding this comment

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

We're moving away from page.locator() in general and we now prefer to use ARIA based methods such as page.getByRole(). One way we could improve this could be by adding an accessible name (such as an aria-label to the img element. We could then update the locator to something like this:

await page.getByRole('img', { name: 'Focused Image' });

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you! I have replaced the pageSelector of the image wrapper and the background image with getByRole.

@ozyx ozyx self-requested a review January 8, 2024 18:21
@ozyx ozyx added the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 8, 2024
@ozyx ozyx added pr:e2e:couchdb npm run test:e2e:couchdb and removed pr:e2e:couchdb npm run test:e2e:couchdb labels Jan 8, 2024
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.

Nice work! Just a couple small comments but otherwise LGTM. Thanks for this!

src/plugins/imagery/components/ImageryView.vue Outdated Show resolved Hide resolved
@ozyx ozyx changed the title [CLA Approved] Expand on image with double click Expand on image with double click Jan 8, 2024
@ozyx ozyx changed the title Expand on image with double click fix(#7055): Expand on image with double click Jan 8, 2024
@marcelo-earth
Copy link
Contributor Author

Nice work! Just a couple small comments but otherwise LGTM. Thanks for this!

Thank you! Done.

@ozyx ozyx added pr:e2e:couchdb npm run test:e2e:couchdb and removed pr:e2e:couchdb npm run test:e2e:couchdb labels Jan 10, 2024
@ozyx ozyx enabled auto-merge (squash) January 14, 2024 23:40
@ozyx ozyx added pr:e2e:couchdb npm run test:e2e:couchdb and removed pr:e2e:couchdb npm run test:e2e:couchdb labels Jan 14, 2024
@ozyx ozyx merged commit 11f3ce9 into nasa:master Jan 14, 2024
21 of 22 checks passed
@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
pr:e2e:couchdb npm run test:e2e:couchdb source:community Community contribution or request type:bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double clicking on an image in a layout should embiggen it but does not.
3 participants