Help us improve Sandcastle - Feedback thread
We've recently launched our rebuild/redesign of Sandcastle for CesiumJS. We'd love to hear feedback, especially if anything's not working as expected. This issue will serve as the primary point for said feedback and bug reports.
If you're interested in the build process feel free to check out this issue. If you're interested in some of the previous feedback and discussion around features check out this forum thread or this one for some design discussion.
The new nav help menu buttons look a little awkward to me. Maybe I'm just used to the old sandcastle, where the Mouse and Touch buttons were row-aligned, but the empty space here looks weird to me. I think it's also less clear now that these are buttons that show different help menus.
Sometimes, the highlighting and the cursor position do not seem to match:
This has some strange symptoms: It feels like not being able to use "END" to jump to the end of the line. But it is really only the cursor that is displayed at a wrong position. (E.g. editing after END does indeed edit at the end of the line). Strangely, when using the Browser-Zoom to zoom to "90%", then it fits perfectly.
Happened on Windows 10 with Chrome 140.0.7339.81. (It does not happen in FireFox)
Can the Gallery view somehow highlight the tab for the Sandcastle I am currently viewing?
I may be missing something, but I think the URL is the only indicator of which item on the left is being displayed on the right.
Some CSS issue, probably, in https://dev-sandcastle.cesium.com/?id=materials :
Did we switch the main search from strict to fuzzy match? I used to find it very useful (so much that I came to rely on it) to match exactly when searching for class or parameter. I see the benefit of fuzzy search but could there be an option for the old strict matching?
Another example, I need classes that implement the fromUrl pattern, but the search results are not specific enough
Feature request: the ability to drag-and-drop (or otherwise) load in a file from local file system. E.g. load in a GLB and use it in the sandcastle.
Currently, without spinning up a local version of sandcastle, or hosting your test data somewhere public, there's no easy way to view a local model in sandcastle.
@mzschwartz5 that would be great for 3D Tiles too (possibly with some technical caveats)
Click on the iModel Mesh Export Service (https://dev-sandcastle.cesium.com/?id=imodel-mesh-export-service) produces this issue for me. My setup: Brave 1.82.161 (Official Build) (64-bit)](https://brave.com/latest/) Chromium: 140.0.7339.80
message:
"Expected iModelId to be typeof string, actual typeof was undefined"
name:
"DeveloperError"
stack:
Error
at new DeveloperError (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:7584:11)
at Check.typeOf.string (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:7632:11)
at ITwinPlatform.getExports (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:199016:24)
at ITwinData.createTilesetFromIModelId (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:226432:61)
at <anonymous>:83:48"
Click on the iModel Mesh Export Service (https://dev-sandcastle.cesium.com/?id=imodel-mesh-export-service) produces this issue for me. My setup: Brave 1.82.161 (Official Build) (64-bit)](https://brave.com/latest/) Chromium: 140.0.7339.80
**message:** `"Expected iModelId to be typeof string, actual typeof was undefined"` **name:** `"DeveloperError"` **stack:**
Error at new DeveloperError (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:7584:11) at Check.typeOf.string (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:7632:11) at ITwinPlatform.getExports (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:199016:24) at ITwinData.createTilesetFromIModelId (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:226432:61) at <anonymous>:83:48"
Similar for iTwin Feature Service (https://dev-sandcastle.cesium.com/?id=itwin-feature-service)
message:
"Expected iTwinId to be typeof string, actual typeof was undefined"
name:
"DeveloperError"
stack:
Error
at new DeveloperError (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:7584:11)
at Check.typeOf.string (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:7632:11)
at ITwinData.loadGeospatialFeatures (https://dev-sandcastle.cesium.com/Build/CesiumUnminified/index.js:226543:24)
at <anonymous>:41:39"
@matjuric A first guess is that the Sandcastles that are shown in the new gallery do not yet anticipate https://github.com/CesiumGS/cesium/pull/12801
@jjspace This would mean that the change from https://github.com/CesiumGS/cesium/commit/e8cad4332103b1f761521326ad8be2c385d2a754 only went into the old, but not into the new sandcastle HTMLs.
(If there are doubts, I can check whether that's really it...)
@mzschwartz5 @lilleyse
Feature request: the ability to drag-and-drop (or otherwise) load in a file from local file system. E.g. load in a GLB and use it in the sandcastle.
that would be great for 3D Tiles too (possibly with some technical caveats)
Great idea! Not new, but great. This is what I drafted in https://github.com/CesiumGS/cesium/pull/10591 roughly 3 years ago:
(I also have a cesium-standalone Electron application that allows drag-and-drop of tileset JSON files....)
There are many low-hanging fruits that we are not picking because we are too busy with trimming the weeds 😞
This functionality is somewhat unrelated to the sandcastle, though...
Ok, catching up on this thread a little, sorry for the delay
The new nav help menu buttons look a little awkward to me.
@mzschwartz5 This was a side effect of the stratakit styles bleeding into the viewer. Fixed in https://github.com/CesiumGS/cesium/pull/12885
Can the Gallery view somehow highlight the tab for the Sandcastle I am currently viewing?
@jjhembd I do really like this idea, it's on my lists to look into. For now the title of the current sandcastle is shown in the top left between the logo and the "Share" button.
Some CSS issue, probably
@javagl Fixed in https://github.com/CesiumGS/cesium/pull/12885
Did we switch the main search from strict to fuzzy match?
@lukemckinstry Yes we did! As explained in person we are now using pagefind for all our search. There are some parameters we can change for how specific or fuzzy search terms can be. I'll put it on the list to investigate further. There may be other options we can include like including specific api terms that we can look into
Click on the iModel Mesh Export Service
@matjuric Thanks for pointing this out. I was already looking into that very thing yesterday. I've pulled in some changes that happened between the initial conversion and the new version in this PR https://github.com/CesiumGS/cesium/pull/12885
Feature request: the ability to drag-and-drop (or otherwise) load in a file from local file system.
Just to follow up on this. As we discussed in person this does seem like a pretty nice feature to have. It may be best to implement as a specific sandcastle instead of the entire app. We already have some of this functionality in the other local development "Cesium Viewer" mini-app so I don't think it would be too hard to replicate.
Have we assessed or addressed making code in the sandcastles more discoverable by search engines? One nice benefit of traditional static documentation or tutorials is they are easily to find and index by the Google bot (.... and presumably LLMs too). The indexing that pagefind is doing made me think of this, not sure it that index is public facing and could help make the code examples discoverable or if separate steps are needed.
能否提供切换布局的按钮,有时开启控制台或者其他操作时,打算将代码和地图上下布局放置(尤其我习惯将测试显示器竖向放置)
Some feedback on the console window.
Would it be possible to exclude the log number when selecting text?
Slight oversight on my part, I didn't think about that when adding the index. Probably possible but I don't know how easy. Might end up just removing the number if it doesn't feel necessary. I've added it to the list to look into but it's probably lower priority atm.
Translation for comment above via DeepL - https://github.com/CesiumGS/cesium/issues/12857#issuecomment-3277340684
"Could you provide a button to switch layouts? Sometimes when opening the console or performing other operations, I want to place the code and map in a vertical layout (especially since I am used to placing the test monitor in a portrait orientation)."
Is a "Clear console" functionality something that could be implemented with reasonable effort? (If so: should it be tracked in a dedicated issue?)
Good idea @javagl! That shouldn't be too hard to achieve. I've added it to our list with some other console improvements we'd like to do
Something where my gut feeling is that it may be hard (or ~"nearly impossible") to fix, because this might be something that is built-in from that "monaco" editor:
The "hint windows" are great. But ... they are cut off horizontally:
They can be scrolled vertically with the mouse wheel, but not horizontally.
The "workaround" is to make the code area wider. But maybe there's some CSS magic that allows fixing this "easily" (when you know exactly where and how...)
i had been see a same problem,we just can hope the editor has the layout button to change a vertival one(as so i had make a issue ,but it put in the future plan😢).
**message:** `"Expected iModelId to be typeof string, actual typeof was undefined"` **name:** `"DeveloperError"` **stack:**