Repository navigation
Change header right options buttons to React - #1978
Conversation
β¦nd help button in demo config
|
@jamesmisson is attempting to deploy a commit to the Universal Viewer Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @jamesmisson.
The major functional change I notice here is that the one-up/two-up/gallery buttons in the old code show the state of which one is highlighted, and that no longer seems to be happening here. Is that intentional, or is it planned future work, or is it an actual problem?
Also, see below for one more question.
|
Thanks @demiankatz , I intentionally haven't carried the active/inactive state highlighting for the 1-up/2-up buttons as it'll change again soon anyway: they will be moved in #1809 , which should also turn the two buttons into a proper toggle (only the icon for the currently inactive state should appear). As well as the ticket I've made a todo note in PagingHeaderRightOptions.tsx)Β· |
demiankatz
left a comment
There was a problem hiding this comment.
Thanks, @jamesmisson, glad to here that the button state is tracked for future work. Also good catch regarding the tests; I suppose we really ought to have a mechanism for running tests at different resolutions, but that's a separate project for another day. I'm happy to approve this so we can move forward from here!
|
Great thanks Demian! |

Pull request description
This is probably better seen as a continuation of #1972 as it adds some new features to the
Buttoncomponent necessary for when there is more than one as a group:Buttoncomponent styling is now handled by a newuv-btnclass (using existingbtnclass was getting messy - ultimately allbtnclass rules will be removed in favour ofuv-btn). This has required the tests for gallery, settings, and paging toggle buttons to be adjusted to target the new class.HeaderRightOptionsworks out which button is thelastButtonbased on what is configured to appear, and then sets the right tooltip alignment for the one appearing on the far right.HeaderRightOptions parent component (no SVG icon for the help button as of yet)HeaderPanelvia the more specificPagingHeaderPanelmodule; I've just made another React root/parent component here and rendered them separately from theHeaderRightOptions(ultimately these will be moved down to the bottom right of the canvas anyway so separate is easier)@grayvariable which is WCAG compliant but might need some more attention in the context of theming.The header right option buttons are configurable and this will influence the tooltips. Use these settings to test:
Related issues
Sprint issue: #1956
Contributor checklist
Accessibility & internationalisation
Compatibility & interoperability
Code quality & testing
Configuration & documentation
Additional notes for reviewers:
Not tested on non-mobile touch screens.