Repository navigation
feat: critical notes with modal popup + popover & Don't show again - #7146
Merged
Merged
Conversation
Sort all 105 notes in docs/.vitepress/notes/ into critical (must-read)
vs non-critical (tips/enhancements). 18 notes that involve safety,
malware, bootloops, account bans, data loss, fake download buttons,
adware, or broken installers are now *-critical.md with their first
heading ending in "Critical"; the remaining 87 keep their current names.
Critical notes render a red ⚠ Critical badge in place of the note link:
- Clicking the badge opens a FloatingVue popover (like normal notes)
with Close only — no dismissal side effects.
- Clicking the main entry link (e.g. Foxit) is intercepted in
Layout.vue and opens a centered modal dialog (reka-ui, modeled on
Base64Dialog) with a "Don't show again" checkbox + Cancel/Continue.
Continue opens the real link; dismissed clicks pass through. Dismissals
are stored per-note in localStorage (fmhy-critical-notes-dismissed) as
{noteId: contentHash} (sha256 truncated to 12 chars, computed in
tooltips.ts); editing a critical note changes its hash and re-prompts.
Non-critical notes are untouched (existing hover/click tooltip via
Tooltip.vue), as are all link relocations (34 occurrences across 13
docs pages, incl. misleading [Note] labels fixed to [Critical]).
Also adds Contributing docs, a /sandbox test row, max token 6k.
Match the non-critical note tooltip behaviour: - Badge popover opens on hover (tap on touch devices) via useMediaQuery, same 50ms show/hide delay as Tooltip.vue - Remove the Close action row and its dead handler/CSS; auto-hide, Esc and click-outside are the close paths now The main-link modal (Don't show again) is unchanged.
Normal note tooltips (Tooltip.vue) have no hover styling on their trigger, so the Critical badge shouldn't either. Removes the :hover rule and its transition; cursor + focus-visible outline remain.
…up-dismissal # Conflicts: # docs/file-tools.md
Match the chat review notes: keep one icon style for all notes and let colour carry the severity, so the page never reads as a wall of words. - Warning notes now use the same note.svg glyph as regular notes, tinted red; the "Critical" pill/label is gone from the UI - Add fixed --fmhy-note-icon / --fmhy-note-icon-warning tokens (swarm vs carnation) so info vs warning stay distinguishable in every theme, including red and monochrome, where --vp-c-brand-* and --vp-custom-block-danger-* are themed away - Regular notes now read --fmhy-note-icon instead of text-primary, giving both icons identical sizing/geometry plus the same hover affordance - Dialog title fallback "Warning", icon/checkbox/outline use the fixed warning hue, primary button back to brand button colours - Note headings end with "Warning"; the four [Critical] link labels become [Warning]; CONTRIBUTING documents the blue/red icon split and keeps the *-critical.md filename suffix as an internal marker - Drop docs/public/critical.svg (no longer referenced)
The rewrite dropped the bg-current utility from the masked span, so the mask had no background colour to paint through and the icon rendered blank. Restores it to match Tooltip.vue.
Restores the coloured border the warning popover had before the icon refactor, now using the fixed --fmhy-note-icon-warning token so it stays red in every theme.
nbats
marked this pull request as draft
November 9, 2026 09:47
nbats
marked this pull request as ready for review
November 10, 2026 22:58
Merged
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.
Summary
Sort all 105 notes in
docs/.vitepress/notes/into critical (must-read) vs non-critical (tips/enhancements). 18 notes that involve safety, malware, bootloops, account bans, data loss, fake download buttons, adware, or broken installers are now*-critical.mdwith their first heading ending in "Critical"; the remaining 87 keep their current names.Critical notes render a red ⚠ Critical badge in place of the note link:
Sourcefooter + Close only (no dismissal side-effects).Foxit) is intercepted inLayout.vueand opens a centered modal dialog (réka-ui, modeled onBase64Dialog) with a Don't show again checkbox + Cancel/Continue. Continue opens the real link in a new tab; dismissed clicks pass through. Dismissals are stored per-note inlocalStorage(fmhy-critical-notes-dismissed) as{noteId: contentHash}— sha256 (truncated to 12 chars) computed inutils/tooltips.ts; editing a critical note changes its hash and re-prompts all users.Non-critical notes are untouched (existing hover/click tooltip via
Tooltip.vue). 34 link occurrences across 13 docs pages updated, including 3 previously misleading[Note]labels (sanet, liteapk-modyolo, yts-yify) fixed to[Critical].Files changed
Content (59 files)
docs/.vitepress/notes/*.mdrenamed to*-critical.md(content-sorted; heading updated to "… Critical")file-tools,mobile,gaming,privacy,reading,system-tools,video-tools,video,internet-tools,downloading,beginners-guide,sandbox, …) — link URLs + labels updated.github/CONTRIBUTING.md— documents*-critical.mdvs*-note.md+critical: true/falsefrontmatterNew (5 files)
docs/.vitepress/theme/components/CriticalBadge.vue— inline red badge + popoverdocs/.vitepress/theme/components/CriticalDialog.vue— modal dialog withtargetUrl(Continue opens the link)docs/.vitepress/theme/composables/criticalNotes.ts— per-note localStorage ({noteId: hash}, fail-open, SSR-guarded)docs/.vitepress/theme/composables/criticalRegistry.ts— runtime registry soLayout.vuecan populate the dialogdocs/public/critical.svg— badge icon (same artwork asnote.svg)Modified (7 files)
docs/.vitepress/theme/Layout.vue— capture-phase click interceptor +CriticalDialoghosting,criticalTargetUrltracking; fallback to.critical-badge-hidden-bodydocs/.vitepress/utils/markdown.ts— critical →<CriticalBadge>, non-critical →<Tooltip>(unchanged)docs/.vitepress/utils/tooltips.ts—criticalflag (filename convention + frontmatter override) andcontentHashdocs/.vitepress/theme/index.ts+docs/.vitepress/theme/components/VPLocalSearchBox.vue—CriticalBadgeregistered (global + search stub)Test plan
pnpm eslintclean,pnpm prettier -w .,node scripts/lint-markdown.jspassespnpm docs:dev --port 5173, then in preview:/sandbox(has both a Critical and a non-critical example) and/file-tools//reading:/ Noteicon → normal tooltip, unchanged (no red badge, no modal)prefers-reduced-motion, forced-colorsNotes