Add story segment symbology overrides#1102
Conversation
35f8cdf to
7d07e3e
Compare
|
Integration tests report: appsharing.space |
0049236 to
a2ba73d
Compare
|
That is quite amazing |
a2ba73d to
53e1878
Compare
53e1878 to
72bf681
Compare
martinRenou
left a comment
There was a problem hiding this comment.
haven't tried yet, but it looks great
| - **Preview Mode off** (default): The panel shows the **Story Editor** (story-level form and **Add Story Segment**). Use this to create and edit the story and segment properties. | ||
| - **Preview Mode on**: The panel shows the **Story Map** viewer: the same step-through experience as in full presentation mode (previous/next, segment content, map updates), but still inside the main JupyterGIS window. | ||
|
|
||
| Use Preview Mode to check how the story will look and behave without entering full-screen presentation. The switch is hidden when you are already in presentation mode. |
There was a problem hiding this comment.
We could add a section about sharing the story map made easier with specta and JupyterLite. For that we'd need a minimal setup, maybe in a separate repo, of specta + jupyterlite + jupytergis. I can help with that if you need.
There was a problem hiding this comment.
Let's also leave that for futur us and not block this PR with this
| const obj: IStopRow = { | ||
| stop: scaleValue(color[i], isQuantile), | ||
| output: color[i + 1], | ||
| stop: scaleValue(Number(color[i]), isQuantile), |
There was a problem hiding this comment.
This makes me think, it seems the color stops do not support other types than numbers. Although you may want to define color stops with data other than numbers e.g. with categorized symbology.
That's not an issue that this PR introduced, it's already on main. But the Number(...) makes me wonder if that's related?
There was a problem hiding this comment.
Yea the typing was subpar 🤣 The interpolate case only supports numbers, so that's for Graduated vector symbology and the linear option in SingleBand symbology. The case case (Categorized, Discrete, and Exact) should work with strings as well, but it doesn't populate the stop rows. Right now the color attribute in the vector schema isn't typed at all (it is for the WebGLLayer schema). So yea we should fix that 🙃
There was a problem hiding this comment.
Let's not hold this PR longer than needed. If I understand correctly, things are not getting worse with this PR anyway?
I feel like it's an issue we should look into sooner than later though. Maybe as a follow up if you feel like looking into it?
There was a problem hiding this comment.
things are not getting worse with this PR anyway?
Right.
I feel like it's an issue we should look into sooner than later though. Maybe as a follow up if you feel like looking into it?
Yea that seems like a good idea.
| export const SYMBOLOGY_VALID_LAYER_TYPES = [ | ||
| 'VectorLayer', | ||
| 'VectorTileLayer', | ||
| 'WebGlLayer', | ||
| 'HeatmapLayer', | ||
| ]; |
There was a problem hiding this comment.
Do we really need this? I feel like we could take a step further, and allow editing any parameter of the layer AND the source, not just symbologyState/visible/opacity.
But before we generalize, I think a valid use case if to show/hide any layer type in the story segment. I was trying to make a story based of raster tile layers only and got surprised I could not select a layer to hide/show it.
Maybe for the current state of the PR, we can allow any type of layer here, of course grey out the symbology button for those that do not support the symbology panel (we have a condition somewhere in the open symbology command that does just that), we can generalize to any layer parameter in a follow up PR.
Then we should probably name it "Layer parameters override" instead of "Symbology override".
There was a problem hiding this comment.
Let's track the idea of layer/source override in an issue
martinRenou
left a comment
There was a problem hiding this comment.
That's amazing!! I'll release that in 0.13.0! 🚀 Thanks!
* Squashed * Fix rebase * Lint * Remove unused props * Remove example * Add story maps doc * Add Short Screencast * Remove unused css * Allow selecting all layers * Rename symbologyOverride -> layerOverride * Use const in command
Description
This lets a story map segment temporarily change how other layers look (visibility, opacity, color, render type, etc.) while that segment is active. Each segment has a list of overrides keyed by target layer; when you move to that segment, those overrides are applied. When you change segment or leave the story, the previous state of the layers is restored.
Editing symbology in the segment panel:
segment-edit.mp4
Symbology updating during story:
do-story.mp4
Checklist
Resolves #XXX.Failing lint checks can be resolved with:
pre-commit run --all-filesjlpm run lintCITATION.cffcontains an author entry for yourself📚 Documentation preview: https://jupytergis--1102.org.readthedocs.build/en/1102/
💡 JupyterLite preview: https://jupytergis--1102.org.readthedocs.build/en/1102/lite