-
Notifications
You must be signed in to change notification settings - Fork 15
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
base: main
Are you sure you want to change the base?
feat: resize & focus tracking in view_data #112
Conversation
Codecov ReportAttention: Patch coverage is
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. |
There was a problem hiding this 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?
Why are we storing all views if we only use the last updated view? |
That is an implementation detail (or particular use case) of glue-jupyter, this is a general widget. |
This allows us to track what view is the active one, and resize figures based on that.
e5d0c06
to
51b24cc
Compare
Otherwise we get a typing_extensions version that is too new (support for Python 3.7 was dropped in https://github.com/python/typing_extensions/releases/tag/4.8.0), resulting in a SyntaxError from typing_extensions' `TypedDict`.
73939ba
to
f983ed0
Compare
Pull Request Template
Description
Stores timestamps
resized_at
andfocused_at
inview_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: