Add fullscreen image overlay for voting images - #68
Closed
IvoLeist wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
decided to use the Github Copilot implementation since this it is working now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Escapeor overlay controls to close the fullscreen view.Description
image-overlay.jsto the JS includes invotingUIso the overlay behaviour is loaded (panzoom.min.js,init-panzoom.js,hotkeys.js,image-overlay.js).output$voting_image_divwith namespaced IDs (voting_image_overlay,voting_image_overlay_image) and ARIA attributes.inst/shiny-app/www/voting-styles.cssincluding.image-overlay,.image-overlay-toggle,.image-overlay-close, andbody.overlay-opento lock scrolling while open.inst/shiny-app/www/js/image-overlay.jsto open the overlay (syncing the displayed image src), close it via the close button, backdrop click,Escapekey, and via double-click on the image.Testing
tmp_overlay_preview.html, serving it withpython -m http.server 8001, and running a Playwright script that opened the page, clicked the overlay toggle, waited, and saved a screenshot toartifacts/image-overlay.png, which completed successfully.renderUIand the CSS/JS files are present underinst/shiny-app/wwwduring the test run.Codex Task