Skip to content

Make docs options floating button a real toggle for touch and keyboard#25748

Open
maliming wants to merge 2 commits into
devfrom
maliming/docs-options-floating-fix
Open

Make docs options floating button a real toggle for touch and keyboard#25748
maliming wants to merge 2 commits into
devfrom
maliming/docs-options-floating-fix

Conversation

@maliming

@maliming maliming commented Jul 4, 2026

Copy link
Copy Markdown
Member

Replace the hover-only ::before ball for the scrolled document-options bar with a real .toggle-btn that opens the popover on click, so it works on touch and keyboard, and hide the collapsed bar instantly to stop the translucent flash while scrolling.

- reveal on click (.is-open) instead of hover so touch devices can open it
- hide the collapsed bar instantly to stop the translucent flash on scroll
Copilot AI review requested due to automatic review settings July 4, 2026 08:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the docs “document options” UI so the collapsed (scrolled) options bar is controlled by a real button-based toggle rather than a hover-only pseudo-element, improving touch and keyboard usability and preventing a brief translucent flash during scroll collapse.

Changes:

  • Replaces the collapsed bar’s ::before hover button with an .options-header .toggle-btn FAB and .is-open state styling.
  • Adds JS to toggle .is-open, update aria-expanded, close on outside click/Escape, and close when leaving the scrolled state.
  • Adds a new localized DocumentOptions label across multiple languages and updates the Project document page markup to include the new header/body structure.

Reviewed changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss Implements the new FAB + .is-open styling and collapse behavior in the SCSS source.
modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css Updates the generated CSS to match the SCSS changes.
modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Scripts/vs.js Adds click/tap + keyboard-based toggling and close behaviors for the collapsed options popover.
modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml Adds .options-header + toggle button markup and wraps options in .options-body with an id for aria-controls.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ar.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/cs.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/de.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/el.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/en-GB.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/es.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/fi.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/fr.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hi.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hr.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hu.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/is.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/it.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/nl.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pl-PL.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/pt-BR.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ro-RO.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/ru.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sk.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sl.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/sv.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/tr.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/vi.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json Adds DocumentOptions localization.
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hant.json Adds DocumentOptions localization.
Files not reviewed (1)
  • modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css: Generated file
Comments suppressed due to low confidence (1)

modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss:180

  • p.alert-p is now always hidden in the body.scrolledMore .alert-criteria popover because the selector only checks for .options-header. Since this PR adds .options-header to module pages too, the "MultipleVersionDocumentInfo" line will never appear while scrolled, contradicting the comment that module pages keep it.
            // abp.io renders an .options-header title, so its info line is redundant; module pages keep it
            &:has(.options-header) p.alert-p {
                display: none !important;
            }

Comment thread modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css Outdated
Comment thread modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css
Comment thread modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Scripts/vs.js Outdated
@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.87%. Comparing base (a563a88) to head (551ac6e).
⚠️ Report is 3 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #25748      +/-   ##
==========================================
+ Coverage   48.84%   48.87%   +0.02%     
==========================================
  Files        3733     3733              
  Lines      126277   126280       +3     
  Branches     9709     9710       +1     
==========================================
+ Hits        61682    61715      +33     
+ Misses      62764    62728      -36     
- Partials     1831     1837       +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- add a :focus-visible ring on the toggle button for keyboard users
- keep the info line visible in the popover
- namespace and unbind the toggle handlers to avoid stacking on re-init
@maliming maliming added this to the 10.6-preview milestone Jul 6, 2026
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.

3 participants