Repository navigation
Add a GitHub-style developer view for projects - #226
Merged
Merged
Conversation
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.
Adds a developer view to project pages: a view of the project's fractch files laid out like a GitHub repository. Open it from the new Developer view button in the project header. It lives at
/project/:id/code(and/p/:slug/code).Preview: https://developer-view.scratch-gui.pages.dev/project/p1790295130360345000J3JZRS/code (the commit column fills in once MistWarp/api#82 is deployed)
What's in it
?branch=);/code/tree/<folder>and/code/blob/<file>each have a breadcrumb and their own latest commit. Files open in the existing viewer, which is now pulled out ofProjectFilesasProjectFileViewer. It keeps syntax highlighting for fractch and SVG, plus image and audio previews./code/commitsand so on) can be linked.last-commitsendpoint in Add last-commits inspection for per-path latest changes api#82. It ignores saves that only change saved variable values, so a folder only moves to the top when its scripts or assets change. Until that endpoint is deployed, the listing renders without the commit column./coderoutes, so they get project meta tags instead of a 404 status. The dev server now falls back to the SPA for/code/tree/and/code/blob/paths that end in a file extension.…button from stretching on phones.Screenshots
Code tab, desktop, Chromium, dark theme:

A folder, with breadcrumb and parent row:

A fractch file on its own page:

An SVG costume preview, Firefox, light theme:

Commits tab (the existing graph, using the readable summaries):

The new header button on the project page:

Phone, Chromium dark (left) and Firefox light (right):

Project header on a phone:

Checks
pnpm run checkpasses: 4122 unit tests, including 18 new developer view tests and new middleware route tests.Version: 3.8.1 to 3.9.0 (new feature).