Skip to content

Focusing Layer/Group always to rename#1123

Merged
martinRenou merged 5 commits intogeojupyter:mainfrom
nakul-py:renaming-layer
Feb 18, 2026
Merged

Focusing Layer/Group always to rename#1123
martinRenou merged 5 commits intogeojupyter:mainfrom
nakul-py:renaming-layer

Conversation

@nakul-py
Copy link
Collaborator

@nakul-py nakul-py commented Feb 16, 2026

Description

This PR fixes Renaming a layer with F2 doesn't work unless you've just clicked the layer.

Now we can easily rename a layer without clicking evevrytime.

Screencast.From.2026-02-16.21-08-34.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

📚 Documentation preview: https://jupytergis--1123.org.readthedocs.build/en/1123/
💡 JupyterLite preview: https://jupytergis--1123.org.readthedocs.build/en/1123/lite

@nakul-py nakul-py added the bug Something isn't working label Feb 16, 2026
@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch nakul-py/jupytergis/renaming-layer

@nakul-py nakul-py requested a review from mfisher87 February 16, 2026 06:29
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Integration tests report: appsharing.space

Copy link
Member

Choose a reason for hiding this comment

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

Maybe that one is missing it as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If i add same class here then both rename layer or group have same selector and than only one command works because of this

// If more then one item is selected, only rename the first
for (const id in selectedItems) {
if (selectedItems[id].type === itemType) {
itemId = id;
break;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To omit this situation we are using new single renameSelected command that helps F2 works consistently for both layers and groups and behavior is selection driven.

@nakul-py
Copy link
Collaborator Author

nakul-py commented Feb 16, 2026

Hey @martinRenou if this approach was correct we can also done same refactor for remove layer/group commands too.

@nakul-py nakul-py requested a review from martinRenou February 16, 2026 15:52
@nakul-py nakul-py changed the title Focusing layer always to rename Focusing Layer/Group always to rename Feb 16, 2026
@martinRenou
Copy link
Member

Hey @martinRenou if this approach was correct we can also done same refactor for remove layer/group commands too.

We should be extra careful that the logic still works with layers/layer groups/story segments. I'm 👍🏽 on unifying the logic and simplifying the keybindings definition.

@nakul-py
Copy link
Collaborator Author

We should be extra careful that the logic still works with layers/layer groups/story segments.

Yes, I have updated the screen cast in PR description which shows logic works fine.

@nakul-py
Copy link
Collaborator Author

nakul-py commented Feb 18, 2026

This is how it looks now

image

@nakul-py nakul-py marked this pull request as ready for review February 18, 2026 04:50
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.

Looks great!

@martinRenou martinRenou merged commit 0dcdde0 into geojupyter:main Feb 18, 2026
17 checks passed
@nakul-py nakul-py deleted the renaming-layer branch February 18, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only Rename/Remove Group buttons for Group? Renaming a layer with F2 doesn't work unless you've just clicked the layer

2 participants