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

feat: LEAP-1424: Open preview window for images in Grid view #6748

Closed
wants to merge 18 commits into from

Conversation

hlomzik
Copy link
Collaborator

@hlomzik hlomzik commented Dec 3, 2024

Open a simple modal with image from the data of clicked task. Allow to navigate between tasks visible in Grid view by Prev/Next buttons. Only one image is displayed right now.

Simple common hotkeys are available:

  • <Arrows left/right> to switch between tasks
  • <Space> to select/unselect task
  • <Escape> to close the modal
Screenshot 2024-12-07 at 19 02 19

PR fulfills these requirements

  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Feature flags used to cover this change

fflag_feat_front_leap_1424_grid_preview_short

Describe the reason for change

It's hard to quickly preview task and select it depending on a content in current state — if you open task it's another view and it takes time to load it. Here is the new view for quick preview.

Does this PR introduce a breaking change?

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

Click on task in Grid view now has a different action, but task selection is still possible if you click on task id with checkbox.

What level of testing was included in the change?

  • e2e
  • integration
  • unit

Open a simple modal with image from the data of clicked task.
Allow to navigate between tasks visible in Grid view by Prev/Next buttons.
Only one image is displayed right now.
Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for heartex-docs ready!

Name Link
🔨 Latest commit 930848f
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/67603e0b3f648b0009cbe18d
😎 Deploy Preview https://deploy-preview-6748--heartex-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 3, 2024

Deploy Preview for label-studio-docs-new-theme ready!

Name Link
🔨 Latest commit 930848f
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/67603e0ba3567100089d423f
😎 Deploy Preview https://deploy-preview-6748--label-studio-docs-new-theme.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the feat label Dec 3, 2024
@MihajloHoma
Copy link
Contributor

MihajloHoma commented Dec 11, 2024

/git merge

Workflow run
Successfully merged: create mode 100644 web/libs/frontend-test/src/helpers/utils/fixLSParams.ts

@hlomzik
Copy link
Collaborator Author

hlomzik commented Dec 11, 2024

/git merge

Workflow run
Successfully merged: Already up to date.

@MihajloHoma
Copy link
Contributor

MihajloHoma commented Dec 13, 2024

/git merge

Workflow run
Successfully merged: 3 files changed, 83 insertions(+), 2 deletions(-)

MihajloHoma and others added 3 commits December 13, 2024 07:23
When we leave the Grid View by browser controls or by hotkeys we need to close the modal.
That also means that we don't need to intercept Quick View hotkey.
And `capture` was a huge hit for performance, because keydown handler was called million times
during handling the same event, leading to browser freeze.
useEffect closing the modal should be global one-time one
@hlomzik
Copy link
Collaborator Author

hlomzik commented Dec 16, 2024

/git merge

Workflow run
Successfully merged: 12 files changed, 699 insertions(+), 40 deletions(-)

hlomzik added a commit that referenced this pull request Dec 18, 2024
…w modal (#6781)

Allow users to zoom in and pan images in preview modal, which you can open from Grid View.

Interactions are intuitive — scroll zooms and drag pans. This is also described in a tooltip.

This PR also includes #6748 for LEAP-1424:

Open a simple modal with image from the data of clicked task. Allow to navigate between tasks visible in Grid view by Prev/Next buttons. Only one image is displayed right now.

Simple common hotkeys are available:
- `<Arrows left/right>` to switch between tasks
- `<Space>` to select/unselect task
- `<Escape>` to close the modal

Co-authored-by: bmartel <[email protected]>
Co-authored-by: MihajloHoma <[email protected]>
Co-authored-by: hlomzik <[email protected]>
@hlomzik
Copy link
Collaborator Author

hlomzik commented Dec 20, 2024

merged already by #6781

@hlomzik hlomzik closed this Dec 20, 2024
@hlomzik hlomzik deleted the fb-leap-1424/grid-preview branch December 20, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants