Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: resize & focus tracking in view_data #112

Merged

Conversation

iisakkirotko
Copy link
Collaborator

@iisakkirotko iisakkirotko commented Dec 11, 2024

Pull Request Template

Description

Stores timestamps resized_at and focused_at in view_data. This is useful to track which viewer figures should have their shape set based on.

@maartenbreddels and others I welcome discussion / feedback on the focus portion in particular:

  • Should we also track the last point at which focus entered a view?
  • Is there any need to remove the eventListener from window?

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 42.42%. Comparing base (7b90b9d) to head (21609d0).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
bqplot_image_gl/viewlistener.py 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
- Coverage   50.00%   42.42%   -7.58%     
==========================================
  Files           7        8       +1     
  Lines         140      198      +58     
==========================================
+ Hits           70       84      +14     
- Misses         70      114      +44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@maartenbreddels maartenbreddels left a comment

Choose a reason for hiding this comment

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

Nice PR!
The only worry I have is that a particular view could also have received the focus event. We could also implement this later on, so we don't just listen to the window focus event, but also the element's focus event.
What do you think?

@mariobuikhuizen
Copy link
Contributor

Why are we storing all views if we only use the last updated view?

@maartenbreddels
Copy link
Collaborator

That is an implementation detail (or particular use case) of glue-jupyter, this is a general widget.

@iisakkirotko iisakkirotko force-pushed the feat-resize-focus-tracking branch 2 times, most recently from 73939ba to f983ed0 Compare December 18, 2024 11:48
@iisakkirotko
Copy link
Collaborator Author

iisakkirotko commented Dec 18, 2024

So I think I managed to track down the issue, which was in a different place than I thought. Looks like the tox scripts that are used to run tests (OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1) seem to be using conda for installing dependencies. However, the conda-forge package for typing_extensions is maintained by a third party (see this comment), and claims to support Python 3.7 even in current versions, while actually support for Python 3.7 was dropped in 4.8.0. This causes conda to resolve an actually incompatible version of the package, which in turn causes the tests to fail. How to solve it... I'll look into :)

@iisakkirotko iisakkirotko force-pushed the feat-resize-focus-tracking branch 3 times, most recently from 6d13145 to b19fee3 Compare December 18, 2024 16:34
@iisakkirotko iisakkirotko force-pushed the feat-resize-focus-tracking branch 2 times, most recently from 7bd7b7c to 21609d0 Compare December 23, 2024 14:50
@maartenbreddels maartenbreddels merged commit 480c2df into glue-viz:main Dec 23, 2024
14 of 16 checks passed
@maartenbreddels
Copy link
Collaborator

Thanks, also a nice split in commits

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.

3 participants