Skip to content

Conversation

@jjspace
Copy link
Contributor

@jjspace jjspace commented Jul 22, 2025

Description

Add clarity by including labels to sandcastles that use the split view. I'd appreciate a second pass on the wording to make sure all the labels are correct (@ggetz?).

image

Issue number and link

Fixes #12758

Testing plan

  • run npm start
  • Open sandcastle locally
  • Search for SplitDirection (or part of this)
  • Test each sandcastle and make sure they're labeled.
    • I specifically did not do the SplitDirection sandcastle itself because it'd dynamic and the focus is on the splitter not the content.

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

@github-actions
Copy link

Thank you for the pull request, @jjspace!

✅ We can confirm we have a CLA on file for you.

Copy link
Contributor

@mzschwartz5 mzschwartz5 left a comment

Choose a reason for hiding this comment

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

Looks good to me - only the one comment about potentially sharing CSS, otherwise gtg!

cursor: ew-resize;
}

.split-label {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do sandcastle's have any shared CSS file where we could put this rather than copying it to each?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The shared styles are mostly in that bucket.css that's imported above. This is a broader question about how we manage styles for sandcastles in general. Will probably aim to tackle this as part of the sandcastle rebuild.
We already duplicate the styles for the #toolbar element like this in the sandcastles that need it so this is not unusual for current sandcastles.

One concern with putting them all into a shared stylesheet is that they become "hidden" from the user. It's not obvious they exist and not easy to discover how to use them without copying from an existing sandcastle. Plus trying to replicate a sandcastle without these styles will make it not display correctly. It's a balance that needs a bit more thought, more than this small PR 😆

Copy link
Contributor

Choose a reason for hiding this comment

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

Related: There's one thing that always bugged me about the slider, far more "user-facing" than some CSS:

Cesium Slider Duplication

It is related to the CSS, and that may make it more difficult to fix. But having to call document.getElementById is ... not ideal in general, IMHO, and I wondered whether this "element" could somehow be sneaked into the Cesium Viewer, and just be hidden by default.

The point is: That duplicated code should (or could?) preferably be some

viewer.enableSplitSlider(); // ? 
viewer.installDefaultSplitHandler(); // Sets up all the default action mappings...

Who wants to drag that slider with the right mouse button after all? 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By including it in the viewer itself it would also lock people into the way we want it to look. We could add options to style it but it's still under our control. Maybe that's a good thing, maybe not. Part of a bigger discussion. Maybe someone wants the "split viewer" functionality but no draggable line and instead a slider under it, or just a static width.
Doing it the way we have it creates some duplicated code in our sandcastle examples but makes it more flexible for everyone.

Copy link
Contributor

Choose a reason for hiding this comment

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

Offering more fine-grained control does not mean that the boilerplate code that are currently required couldn't be offered as a convenience function. Analogously: What if users want to zoom with the left mouse button instead of the right? Yeah, you'll have to rewire a few things in the ScreenSpaceCameraController or so.

People who "just want to split that" can call justSplitThat(). People who want to make the slider 4 pixels wide and yellow can do this, but .... not with a makeItFourPixelsWideAndYellow() function, FWIW 😁

@ggetz
Copy link
Contributor

ggetz commented Jul 22, 2025

Thanks @jjspace! I didn't do a full review, but I have some wording suggetions:

"Bing Maps unlabeled + Washington Imagery + Labels only" ->
"Bing Maps (unlabeled) + Washington DC Satellite + Bing Maps (labels only)"

"Gaussian Splats / 3D Tiles Mesh" -> "3D Tiles Gaussian splats / 3D Tiles mesh"
(They are both 3D Tiles)

"3D Tileset / OSM Buildings" -> "3D Tiles mesh / 3D Tiles OSM buildings"
(They are both 3D Tiles)

@jjspace
Copy link
Contributor Author

jjspace commented Jul 22, 2025

Thanks @mzschwartz5 and @ggetz. I just pushed some updated wording. I think this is good to go

@ggetz
Copy link
Contributor

ggetz commented Jul 23, 2025

@mzschwartz5, if you reviewed the implementation, please feel free to merge once you're happy with any changes.

@mzschwartz5 mzschwartz5 added this pull request to the merge queue Jul 24, 2025
Merged via the queue into main with commit b5dc7c1 Jul 24, 2025
9 checks passed
@mzschwartz5 mzschwartz5 deleted the sandcastle-split-labels branch July 24, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add labels to split view sandcastles (like Gaussian Splats)

5 participants