Skip to content

Add story segment symbology overrides#1102

Merged
martinRenou merged 11 commits intogeojupyter:mainfrom
gjmooney:segment-absolute-control
Feb 6, 2026
Merged

Add story segment symbology overrides#1102
martinRenou merged 11 commits intogeojupyter:mainfrom
gjmooney:segment-absolute-control

Conversation

@gjmooney
Copy link
Collaborator

@gjmooney gjmooney commented Feb 4, 2026

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

  • PR has a descriptive title and content.
  • PR description contains references to any issues the PR resolves, e.g. Resolves #XXX.
  • PR has one of the labels: documentation, bug, enhancement, feature, maintenance
  • Checks are passing.
    Failing lint checks can be resolved with:
    • pre-commit run --all-files
    • jlpm run lint
  • If you wish to be cited for your contribution, CITATION.cff contains 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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Binder 👈 Launch a Binder on branch gjmooney/jupytergis/segment-absolute-control

@gjmooney gjmooney force-pushed the segment-absolute-control branch from 35f8cdf to 7d07e3e Compare February 5, 2026 12:04
@gjmooney gjmooney added the enhancement New feature or request label Feb 5, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Integration tests report: appsharing.space

@gjmooney gjmooney requested a review from martinRenou February 5, 2026 12:26
@gjmooney gjmooney force-pushed the segment-absolute-control branch from 0049236 to a2ba73d Compare February 5, 2026 12:51
@martinRenou
Copy link
Member

That is quite amazing

@gjmooney gjmooney force-pushed the segment-absolute-control branch from a2ba73d to 53e1878 Compare February 5, 2026 13:08
@gjmooney gjmooney force-pushed the segment-absolute-control branch from 53e1878 to 72bf681 Compare February 5, 2026 13:16
Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

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.
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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),
Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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 🙃

Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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.

Comment on lines +55 to +60
export const SYMBOLOGY_VALID_LAYER_TYPES = [
'VectorLayer',
'VectorTileLayer',
'WebGlLayer',
'HeatmapLayer',
];
Copy link
Member

@martinRenou martinRenou Feb 6, 2026

Choose a reason for hiding this comment

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

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".

Copy link
Member

Choose a reason for hiding this comment

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

Let's track the idea of layer/source override in an issue

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

That's amazing!! I'll release that in 0.13.0! 🚀 Thanks!

@martinRenou martinRenou merged commit e1850c1 into geojupyter:main Feb 6, 2026
15 checks passed
gjmooney added a commit to gjmooney/jupytergis that referenced this pull request Feb 18, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants