-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Infra: Add tooltips to type/status in PEP 0 #2838
Conversation
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.
Good idea!
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.
+1 to the idea
I think it makes more sense to implement in PEP.details
though, and return a shorthand
key instead of type
and status
, where the shorthand
key would contain the result of the call to the new function. This also means the new function doesn't have to work backwards to get the full properties.
A
Updated! Like this? |
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.
Great idea @hugovk ; I'd been hoping to do something about that for quite a while but had never gotten the time to actually do something. And +1 to @AA-Turner 's suggestion as well, which it looks like you implemented as at least I would interpret it.
One other nice improvement would be eliding redundant labels present in most tables, e.g. P in process PEP tables, I in informational PEP tables, A in accepted PEPs, etc. But if that's not trivially achievable here (or not non-controversial), that can go in a separate issue.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
@hugovk I pushed what I meant to this branch as it was too complicated for inline suggestions -- please revert / etc if you want to take a different route, but this was the line I was going down (it also fixes a slight bug in the old implementation with e.g. 581, 602 which were marked as Active rather than Accepted). A |
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.
Thanks, looks good! One little style nit :)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Thanks Hugo! A |
We can use
:abbr:`MET (my excellent tooltip)
, which is turned into<abbr title="my excellent tooltip">MET</abbr>
to show what the initials in the PEP 0 tables mean.Browsers often style them with a dotted underline to indicate hoverability.
For example:
Also fix a couple of Flake8 findings: remove the
f
from plain strings.Preview