Skip to content

Automatically switch to identify panel when identifying#900

Merged
martinRenou merged 2 commits intogeojupyter:mainfrom
arjxn-py:identify-auto
Aug 27, 2025
Merged

Automatically switch to identify panel when identifying#900
martinRenou merged 2 commits intogeojupyter:mainfrom
arjxn-py:identify-auto

Conversation

@arjxn-py
Copy link
Member

@arjxn-py arjxn-py commented Aug 26, 2025

Description

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--900.org.readthedocs.build/en/900/
💡 JupyterLite preview: https://jupytergis--900.org.readthedocs.build/en/900/lite

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch arjxn-py/jupytergis/identify-auto

@github-actions
Copy link
Contributor

github-actions bot commented Aug 26, 2025

Integration tests report: appsharing.space

@arjxn-py arjxn-py added the enhancement New feature or request label Aug 26, 2025
@mfisher87
Copy link
Member

This works once for me, but not a 2nd time. Also, the first time, when it does switch tabs, there's a longer delay than expected! I think the new model attribute isn't being updated when I change tabs by manually clicking on a tab.

annotationModel?: IAnnotationModel;

// TODO Add more modes: "annotating"
currentMode: 'panning' | 'identifying';
Copy link
Member Author

Choose a reason for hiding this comment

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

oh nice

Comment on lines +762 to +767
if (this._currentMode === 'identifying') {
this._currentMode = 'panning';
} else {
this._currentMode = 'identifying';
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think we can have something more extensible for future:

setIdentifyMode(enabled: boolean): void {
  this.currentMode = enabled ? 'identifying' : 'panning';
}


toggleIdentify(): void {
  this.setIdentifyMode(this._currentMode !== 'identifying');
}

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure, we can always work on it in the future :)

@arjxn-py
Copy link
Member Author

Screen.Recording.2025-08-27.at.17.17.54.mp4

Works really well, you rock @martinRenou

@martinRenou martinRenou merged commit 014cf57 into geojupyter:main Aug 27, 2025
23 of 24 checks passed
mfisher87 pushed a commit to mapninja/jupytergis-docwork that referenced this pull request Aug 28, 2025
* Automatically switch to identify panel when identifying

* Introduce model.currentMode + activate tab everytime the identified
features change

---------

Co-authored-by: martinRenou <martin.renou@gmail.com>
HaudinFlorence pushed a commit to HaudinFlorence/jupytergis that referenced this pull request Jan 28, 2026
* Automatically switch to identify panel when identifying

* Introduce model.currentMode + activate tab everytime the identified
features change

---------

Co-authored-by: martinRenou <martin.renou@gmail.com>
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.

Automatically toggle the "Identify" panel tab when clicking identifying features

3 participants