-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Sandcastle Reborn #12574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Sandcastle Reborn #12574
Conversation
Thank you for the pull request, @jjspace! ✅ We can confirm we have a CLA on file for you. |
Wahoo! @jjspace could you get this PR targeting to a feature branch for sandcastle v2? That way we can have smaller, iterative PRs as needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great so far! I haven't reviewed any of the app code itself, since as I understand it is very much in flux. But I do have some thoughts on the overall configuration.
"eslint-plugin-react-hooks": "^5.2.0", | ||
"eslint-plugin-react-refresh": "^0.4.19", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should all go into the dev dependencies for packages/sandcastle
. Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the nature of eslint after the "single top level flat-config" change these are actually used in the top level eslint.config.js
so they do need to be dev dependencies of the whole repo AFAIK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file built? Should it be it the .gitignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is here just because I had copied it for the hackathon project but it's not being used anymore. Will check and remove.
@@ -0,0 +1,203 @@ | |||
(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would love to modernize these functions and get them documented. Not sure where you're maintaining a TODO list, but that can get added in an iterative PR.
@@ -250,6 +250,11 @@ export async function buildTs() { | |||
workspaces = packageJson.workspaces; | |||
} | |||
|
|||
// TODO: we probably need to manage workspaces better now | |||
workspaces = workspaces.filter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to target workspace which are dependencies to avoid the manual filtering.
bucket = bucket.substring(pos + 1); | ||
} | ||
|
||
window.Sandcastle = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as for Sandcastle-client.js
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to point this at the existing gallery directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as my other comment. I copied these for the hackathon and didn't remove them yet. They're not even referenced in the new app at all right now.
The whole gallery system might need a review of how we want to manage it so potentially a little in flux here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I think we address the strategy around the gallery in a subsequent PR. Let's just get this initial one cleaned up in the meantime.
I started a TODO list if only for my own sanity. Please feel free to edit or move.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also a built file, and should be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually not a built file right now. At the moment this is an array with the full code of each of the sandcastles I included in the project for the hackathon. it was just the quickest way I could get them in there without implementing the full parsing of how we're currently storing/loading the gallery. Definitely needs a review for how we're accessing them.
@ggetz I was expecting this branch/PR to be that feature branch. I was thinking of developing directly here until the build system is mostly sorted then do smaller PRs into this branch for review as needed. Where you thinking differently? |
To keep things clean, let's target a new staging branch. That way we can merge this and keep the PR list tidy. Well... tidier. |
Description
Starting work on rebuilding Sandcastle. Currently this branch has the scrapped together hackathon code. This branch and PR will act as a staging branch for the work involved in the whole process. See #12566 for more details
packages/sandcastle
to encapsulate the new Vite + React + Typescript projectApps/Sandcastle2
(temporary path)vite
dev server and the static files from the normal CesiumJS dev server should behave the same. This requires a bit of extra config to make sure routes for assets and sample data line up. Should be working now but may require some finagling later if we change routes.TODO:
Issue number and link
Fixes #12566
Testing plan
From the top level
npm run build-sandcastle
npm start
http://localhost:8080/Apps/Sandcastle2/index.html
From inside
packages/sandcastle
for direct development of sandcastlenpm run dev
for the dev server buildhttp://localhost:5173/
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change