Repository navigation
refactor: replace client-side drawer with a dedicated /plugin/[id] page - #14
Merged
Merged
Conversation
The slide-in DetailDrawer (?ext=) froze touch navigation and locked scroll on mobile: it cloned a full panel per plugin into <template> tags, then swapped content and animated a fixed overlay on click. Details are now a real server-rendered route, so opening one is a normal navigation with no client work and no scroll lock. - src/pages/plugin/[id].astro: reads the plugin from D1 by id and renders the breadcrumb, hero (icon, version, category, publisher link + verified badge), actions, README, route chips, install guide, and the manifest/checksum panel. A missing id is a 404 "Plugin not found"; a D1 failure is a 503, mirroring the publisher page. - One-click install: the primary action is "Install in OpenROM", a deep link to openrom://plugin/<id>. Download .orplug and Copy CLI Install sit beside it as fallbacks, with a hint line for anyone without OpenROM Core installed. The deep link and the download button are withheld when no bundle is published, so the page never offers a dead install. Adds a `zap` icon for the button. - Card.astro: the whole card is a link to /plugin/[id] via a stretched pseudo-element, with the publisher link and action buttons raised above it so they stay independently clickable. - index.astro: ?ext= and ?id= 301-redirect to /plugin/[id], so existing deep links keep working instead of landing on a query nothing reads. - DetailDrawer.astro and its CSS are removed; publisher/[id].astro drops the drawer too. Verified against the local worker: /plugin/nkit renders in ~60ms with the openrom:// deep link, unknown ids return 404, both legacy query forms return 301 to the new page, the not-published state renders without a dead install link, and npm run build is clean with npm test at 47/47. Co-authored-by: openhands <openhands@all-hands.dev>
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Deploying openrom-store with
|
| Latest commit: |
a00338a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c8abea2c.openrom-store.pages.dev |
| Branch Preview URL: | https://refactor-plugin-details-page.openrom-store.pages.dev |
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.
What changed
Plugin details were a client-side slide-over drawer keyed by
?ext=. It froze touch navigation and locked scroll on mobile, so details are now a server-rendered route at/plugin/[id].The lag was structural, not incidental: the old page shipped a full detail panel for every plugin in the catalog, then cloned one in and animated a full-viewport overlay on each open.
The new page
src/pages/plugin/[id].astroreads the plugin from D1 viagetPlugin()— a parameterized single-row lookup, so there is no injection surface.← Back to Marketplacev3.2.0badge, category pill, publisher link with verified checkmark,min coreversionInstall in OpenROM(primary) ·Download .orplug·Copy CLI InstallrenderMarkdownISO ➔ WUAplugin.jsonviewer plus SHA-256 with click-to-copyOne-click install
The primary action is a custom-protocol deep link:
Download .orplugandCopy CLI Installsit beside it as fallbacks, with a hint line for visitors who do not have OpenROM Core installed. Azapicon was added toIcon.astrofor the button.Both the deep link and the download button are withheld when
sha256is empty — a plugin with no published bundle shows "Bundle not published yet" rather than offering an install that cannot work.Card and legacy links
Card.astromakes the whole card a link via a stretchedafter:absolutepseudo-element on the title, with the publisher link and action buttons raised torelative z-10. I used that rather than wrapping the card in an<a>because the card already contains a link and a button — nested anchors are invalid HTML.?ext=and?id=now301to/plugin/[id], so existing deep links keep working instead of landing on a query nothing reads.DetailDrawer.astroand its CSS are deleted, andpublisher/[id].astrono longer imports it.Verification
/plugin/nkitopenrom://plugin/nkitin markup?ext=nkitand?id=nkit/plugin/nkit//plugin/<id>, zero drawer markupnpm run buildnpm testtsc --noEmitsrc/cleanTwo deliberate choices worth flagging: a D1 failure returns 503, not 404, matching the publisher page — a database outage is not a missing plugin. And the drawer's removal is verified by grepping the repo, not just by the build passing.
This pull request was created by an AI agent (OpenHands) on behalf of the user.
Summary by CodeRabbit
extandidlinks now redirect to the corresponding plugin detail page;exttakes precedence when both are provided.