fix: do not show back button when there is no history#1133
fix: do not show back button when there is no history#1133danielroe merged 1 commit intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThis pull request adds conditional visibility to back buttons across four page components: about.vue, compare.vue, privacy.vue, and settings.vue. Each back button now includes a Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
app/pages/settings.vue (1)
51-56:⚠️ Potential issue | 🟡 MinorRemove inline focus-visible utility on the button; rely on global focus styles.
The class includesfocus-visible:outline-accent/70, which conflicts with the project’s global button focus-visible rule.Proposed change
- class="inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded focus-visible:outline-accent/70 shrink-0 p-1.5 -mx-1.5" + class="inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded shrink-0 p-1.5 -mx-1.5"Based on learnings: “Ensure focus-visible styling for button/select is implemented globally in app/assets/main.css … Do not apply per-element inline utility classes like focus-visible:outline-accent/70.”
app/pages/compare.vue (1)
117-122:⚠️ Potential issue | 🟡 MinorRemove inline focus-visible utility on the button; rely on global focus styles.
The class includesfocus-visible:outline-accent/70, which conflicts with the project’s global button focus-visible rule.Proposed change
- class="inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded focus-visible:outline-accent/70 shrink-0" + class="inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded shrink-0"Based on learnings: “Ensure focus-visible styling for button/select is implemented globally in app/assets/main.css … Do not apply per-element inline utility classes like focus-visible:outline-accent/70.”
app/pages/about.vue (1)
52-57:⚠️ Potential issue | 🟡 MinorRemove inline focus-visible utility on the button; rely on global focus styles.
The class includesfocus-visible:outline-accent/70, which conflicts with the project’s global button focus-visible rule.Proposed change
- class="inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded focus-visible:outline-accent/70 shrink-0" + class="inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded shrink-0"Based on learnings: “Ensure focus-visible styling for button/select is implemented globally in app/assets/main.css … Do not apply per-element inline utility classes like focus-visible:outline-accent/70.”
app/pages/privacy.vue (1)
29-34:⚠️ Potential issue | 🟡 MinorRemove inline focus-visible utility on the button; rely on global focus styles.
The class includesfocus-visible:outline-accent/70, which conflicts with the project’s global button focus-visible rule.Proposed change
- class="inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded focus-visible:outline-accent/70 shrink-0" + class="inline-flex items-center gap-2 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded shrink-0"Based on learnings: “Ensure focus-visible styling for button/select is implemented globally in app/assets/main.css … Do not apply per-element inline utility classes like focus-visible:outline-accent/70.”
When users landed on non-home page, there is no router history so nothing happens when clicking the back button.
cf. https://npmx.dev/about vs https://npmxdev-git-fork-shuuji3-fix-hide-back-button-wit-2dbbf1-poetry.vercel.app/about