Skip to content

Allow url adressible version on app page#193

Open
rnwood wants to merge 5 commits intoSplashtopInc:masterfrom
rnwood:master
Open

Allow url adressible version on app page#193
rnwood wants to merge 5 commits intoSplashtopInc:masterfrom
rnwood:master

Conversation

@rnwood
Copy link

@rnwood rnwood commented Dec 5, 2025

Package version selection is now URL addressable via path segments (e.g., /apps/7zip.7zip/24.07).

Why? I would like to link to apps in your site with specific version selected.

Changes

  • Routing restructure: Moved pages/apps/[id].jspages/apps/[id]/index.js and added pages/apps/[id]/[version].js for versioned URLs
  • SingleApp.js: Added initialVersion prop, version selector now updates URL on change, share button includes version path
  • Mock API: Added pages/api/apps/ endpoints for local testing

Behavior

URL Result
/apps/7zip.7zip Latest version (v24.09)
/apps/7zip.7zip/23.01 Specific version

Selecting latest version removes version suffix from URL. Invalid versions show error page.

Screenshots

Default (latest) version:
Default version

Older version selected (/apps/7zip.7zip/23.01):
Older version

Copilot AI and others added 5 commits December 5, 2025 06:29
…[id]/[version])

Co-authored-by: rnwood <1327895+rnwood@users.noreply.github.com>
Co-authored-by: rnwood <1327895+rnwood@users.noreply.github.com>
Co-authored-by: rnwood <1327895+rnwood@users.noreply.github.com>
…-selection

Add URL addressable version selection on package page
@@ -0,0 +1,56 @@
// Mock API endpoint for testing - returns a list of apps
export default function handler(req, res) {
const mockApps = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks. I don't think we should duplicate this list of apps (here and in [id].js). If there is such a mock list, then it should only exist once in the code base. That doesn't mean that the list can't be exposed as an API in multiple places though, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants