-
Notifications
You must be signed in to change notification settings - Fork 663
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
adding collapsible code blocks #59
Conversation
This looks great ! It looks like the tests are failing because we should add a space to this assert statement. Really excited to see this added ! And I noticed you also added in the configuration for the sidebar here -- 👍 |
0ed8184
to
2d2c8ce
Compare
OK check out a live version here: https://85-137292803-gh.circle-artifacts.com/0/html/features/notebooks.html I updated to use icons instead of '+' and '-'. LMKWYT |
I think the icons are a little too bold -- could we make them blue ? But I do like the fixed-width !! EDIT: I realized you're adding these as SVGs, and I don't want it to be a pain to update. The styling could always be revisited later, but the functionality is fantastic ! 🎉 |
I started playing around with styling the SVG and encountered something I didn't quite understand so I was wondering if you had any hints -- It looks like you're just using the If you have any recs, I'd appreciate it ! |
hmmm, let me play around with this a bit once I get #30 working, which is kind of a beast to figure out, that ok? :-) |
3dc673d
to
2d72fc2
Compare
OK, the latest push re-works some of the collapsible code stuff. The buttons are now purely in CSS, which should make them much easier to customize and configure rather than using SVGs. It also adds some more explanation in the features section for how to enable this feature (as well as a couple other features). See the link to a demo page here: https://330-137292803-gh.circle-artifacts.com/0/html/features/hiding.html @emdupre wanna take another look at this? thanks for the feedback so far, I like this version of the feature much better than the last :-) |
2d72fc2
to
c638f8d
Compare
c638f8d
to
b9005f6
Compare
(actually, I'm gonna merge this one once the tests pass because I need to update the data8 textbook :-) ) we can spot-check problems in smaller PRs! |
Sounds great ! Thanks ! |
This PR adds the basic support for collapsible code blocks on the built site. If you enable it in the configuration, any of the code cells will have a little button to the side that lets you hide the code contents. In addition, if a notebook cell has a
hidecode
tag in it, then by default the code will be hidden in the site (though it can be re-opened by clicking the button).@emdupre what do you think about this? I'm thinking it might be time to cut a release of jupyter-book, then this can be the first feature in the next version so there's some time to iterate on it, fix the styling, etc.
Here's a demo of what it looks like: