-
Notifications
You must be signed in to change notification settings - Fork 335
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
Add tabbed widget JS and CSS to build #2180
Add tabbed widget JS and CSS to build #2180
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.
I think we'll want to change the JS so it gets included in /guide/static/docs.js
(and thus can be loaded once and cached) rather than inlining it on every page (increasing page sizes and slowing down page loads, even if only marginally), even pages that don't use the widgets.
I'll have to refresh my memory on how that all gets built, but if you want to try to figure it out, great!
Moved JS to |
OK, I think this is ready for review again. I can see the JS at http://localhost:8000/guide/static/docs.js, and the CSS at http://localhost:8000/guide/static/styles.css |
It seems like the test is failing because it's trying to set the active tab on a test page that doesn't have the tab widget? |
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.
This is looking good! I think we just need to update the functions to not do anything if there are no tab widgets on the page.
Interesting! OK, let me try to figure out how to do that 🤔 Relevant failure:
|
I have an idea of how to fix this. Is there a way to run
I think this is failing because the |
@bmorelli25 You can change into the |
Once you get the tests passing, feel free to merge! |
Will do! It looks like that fixed |
Summary
We're now using the tabbed widget in at least 10 different documentation books! This PR adds the tabbed widget JS and CSS to the documentation build. I'm confident I've added the CSS correctly, but the JavaScript is another story. It works 😮, but I'm not sure if there's a better way to go about this. @gtback, if this is comically wrong, just let me know and I'll close this PR 😬
How to test this
gh pr checkout 2180
Related issues
Closes #1895.