-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Implement hoverxref for floating tooltips #2290
Conversation
@RDaxini I suggest adding that sphinx plugin as a new |
@kandersolar You can see me struggling to find out where to add it 😂 |
I like it! As we eventually make wider use of I suppose we should consider enabling it for more than just |
What drawbacks would there be to enabling it foe everything immediately? I think I'm leaning that way |
I guess the downside I see is that function docstrings are much larger and thus more "intrusive" as a pop-up. I guess there's no harm in trying it out in this PR just to see what it's like! |
|
Looks like |
This improvement is super :D
Yes. That prefix is for the domain https://www.sphinx-doc.org/en/master/usage/domains/index.html My eyes hurt after seeing this: Issue reported at readthedocs/sphinx-hoverxref#231 Mitigation for my fellas at https://darkreader.org/ |
Co-authored-by: Echedey Luis <[email protected]>
This reverts commit d4a0241.
This reverts commit 6ea834f.
To do:
Let me know if there's anything else or if you have any thoughts on the items above |
do I need to create a new .css file to contain something along these lines: https://github.com/pybamm-team/PyBaMM/pull/3083/files#diff-faffc787a692ac8c3c013159ca171e14a027d0417bdec68d8b3624dbb4aee0f0R153-R169 |
@RDaxini you are right in all your points. Specifically, all CSS files get sent to the browser and it applies the rules/styles in them. It would be certainly equivalent to add the same styles in an existing file, but I think it's more maintainable if you add that to another file. Documentation in Just in case, although you probably won't need to learn much about CSS, this is my go-to sources of web documentation And if you want to play a bit, you can start by modifying the webpage live through your browser inspector (usually opens from Ctrl+Shift+C, at least in chrome and firefox). |
A general comment: CSS tweaks target parts of these packages which are not really part of the "public API" and often stop working when we update to newer versions. There is a place for CSS tweaks in our docs, but it's best to keep them minimal. It would be much better if it could be fixed upstream instead of here (nudge @echedey-ls :P).
What do you guys think about merging this PR the way it is now, and looking into fixes for the dark mode thing in a follow-up? If the dark mode problem can be fixed easily then great, but I think it is acceptable (even if suboptimal) the way it is now too.
What is this one about? |
I agree. @RDaxini if you want I could have a try at it if you haven't started yet, thou if you wanna learn a bit about web development it's definitely a manageable task.
Yes, I overlooked that.
Haha, just another side-contribution to the lengthy list xD |
+1
I think it is possible to limit the size of tooltips, for example if we thought that the tooltip for a page cross-reference was too large, we can implement a size restriction. I think the current sizing is fine, but it's an option if anyone feels strongly otherwise. Might be easier to decide on these details after an initial implementation and increased used across the docs. Goes back to your first point about merging this first and then considering further developments. |
@echedey-ls thanks, yeah I am quite interested, but I guess it would take me longer and I might need some extra help 😅 If you guys prefer, I don't mind if someone else takes over, but otherwise I could give it a go 😅 |
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.
Let's go ahead with merging this, with the possibility of further improvements later on. Thanks @RDaxini and @echedey-ls!
Tests addedUpdates entries indocs/sphinx/source/reference
for API changes.docs/sphinx/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).remote-data
) and Milestone are assigned to the Pull Request and linked Issue.See example here by hovering your cursor over the term "dni"