-
Notifications
You must be signed in to change notification settings - Fork 326
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
space icon-links evenly across #1726
Conversation
(rather than justified left)
Hmm, that's not what I intended. I'll take a closer look this weekend but let's try putting the column gap back for now. |
@gabalafou I think this looks right https://pydata-sphinx-theme--1726.org.readthedocs.build/en/1726/ |
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.
Looking at the PR build, I see no visible difference versus the docs for current main
. @leifwalsh can you confirm that for your project/site this PR still achieves the desired improvement?
In an ideal world we would add a test here that failed on main
and passed on this PR; if you can see a clear path to do that please add one... but I'll acknowledge that our tests are not very complete/thorough and testing page layout is tricky to do, so if adding a test is too high a hurdle feel free to say so and we'll move forward without one.
Yeah, I have exactly this in custom css and it works for us: .navbar-icon-links {
justify-content: space-evenly;
} |
I don't think I've ever tested page layout but I'd be happy to try if you want to point me to an example? |
One way is to use Playwright, which loads a headless browser, renders and serves pages (without displaying them anywhere), and lets you interact with the dom. Here's an example from our tests: pydata-sphinx-theme/tests/test_a11y.py Lines 227 to 242 in 99f9b1c
That test uses Another way is to do a static sphinx build on disk (using our test fixture pydata-sphinx-theme/tests/test_build.py Lines 218 to 228 in 99f9b1c
This latter way is faster but more limited as the page isn't rendered, so you can only really effectively test the page source (not, e.g., the effects of JS). |
Hmm, those approaches would really only be testing that CSS works the way CSS is supposed to work, not that it results in output that looks correct. I'm willing to try if you think it's valuable (e.g. if it would catch a regression somehow) but it doesn't seem super valuable to me. Let me know what you'd like to do, I'll have some hacking time over the weekend. |
you're not wrong. I guess the alternative is to use a playwright screenshot and use the pydata-sphinx-theme/tests/test_build.py Lines 329 to 336 in 99f9b1c
I don't think we've ever used it for screenshots before though, and the approach feels a bit hackish to me, but I think it's basically the approach used by bespoke website testing frameworks for visual regression testing. |
Thanks for that pointer! I'll try it and see if I can get it to do something that won't be really annoying :) |
Ok, I don't think that's going to work without a big change to the testing infrastructure. It looks like |
Ah yes, my bad! I didn't connect those dots. FWIW we do plan to make such a change to the test infra (rely more on playwright) but this PR is not the right time to try to set that all up. |
Thank you! Please ping me if you do get that set up and I'll be happy to add a regression test for this :) |
* space icon-links evenly across pydata#1720 (rather than justified left) * restore column-gap
(rather than justified left)
fixes #1720