-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: Make event handling table scrollable #24752
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
Conversation
After writing this PR description, I realized we should probably mark these keys with |
36b0e5b
to
0a4b07e
Compare
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.
I like this styling, and especially the :kbd:
addition!
Some minor nits if you're able:
- Switching between tabs the width of the columns changes and jumps around a bit, so can you fix the width of the columns relative to the maximum somehow?
- Keyboard keys with a
+
in them show up as bold for me and are also inset a couple of points relative to the non multi-keys. Would be nice to get all of that consistent too.
doc/users/explain/event_handling.rst
Outdated
:kbd:`Shift` shift | ||
:kbd:`Control` control | ||
:kbd:`Alt` alt | ||
:kbd:`AltGr` *nothing* |
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.
Are these actually nothing or are they unknown? For example, I filled out most of the macosx section and I just don't have an AltGr
key, so I just had no idea what it produces :)
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.
I don't know actually, so I've reverted it to be empty.
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.
lost gtk
I agree that a clipped table is not feasible. However, the tabs are not very good from a usability perspective either. The table is about inconsistencies between the backends. The key information is the comparison between the backends. This is quite complicated if you can only see one backend at a time. We should think about other alternatives, e.g. (I'm not a CSS expert) could one make a button that let's the table element expand to the right and float over the right side bar? Or maybe a button to pop it out as an overlay similar to the search field. Side note: I find the very limited horizontal space in the pydata-sphinx-theme quite annoying. Are there no other projects that need more horizontal space from time to time? Maybe we should bring the topic back to pydata-sphinx-theme and discuss possible solutions with them. |
I tried making the columns the same width in the source, but that didn't seem to fix it in the result.
That's just how Sphinx produces them; they get nested
It is relatively simple to add a horizontal scroll bar to the note if it is too large. We could also have the overflow appear on hover, but I'm not sure how well that works on small screens. I think I've seen a similar thing on code blocks in places. The button idea is more complicated, as I expect it would need JavaScript to implement. |
Yeah, I think so, it definitely looks odd to me, but no need to change it here. They are better than before.
If we are going back to the horizontal scroll bar, I think it would be nice to freeze the first column as well then. That first column is the independent variable here that we sort of need to understand everything else. |
I believe there is a way to scroll and keep the first column, but in order to do that, we need to actually mark the first column differently. The only way to do this in reST is to make it a |
0a4b07e
to
5eb62a6
Compare
This should work like that now, I believe. Unfortunately, the whole note scrolls a little bit before the first column becomes sticky, and I don't know a way to fix that. But this is probably better than before. |
I wasn't able to get it to freeze/stick the first column for me? Another thing to consider is re-ordering the items to have the more commonly used/extended toolkits up front, having QT and Tk be the first two columns I'd guess. |
I would go with the order [tk, qt, macosx, webagg, gtk, wxpython]. |
Ah, oops, I missed copying something something from build back to the source. |
The existing table is too wide, and overflow is clipped, so that not all toolkits are visible. Also, wrap all the entered keys in `:kbd:`, and re-sort the columns. Fixes matplotlib#24741
5eb62a6
to
542f325
Compare
I moved the table into a Also reordered the columns. |
PR Summary
The existing table is too wide, and overflow is clipped, so that not all toolkits are visible.
Fixes (partially?) #24741
I also changed
Nothing
to*nothing*
to make it clearerand added a*nothing*
to the macosx table for AltGr.PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst