Closed astroDimitrios closed 3 months ago
Thank you for this PR @astroDimitrios, and for the excellent description and documentation. I do see this feature being very useful, especially for our workshop setup pages (for example https://datacarpentry.org/ecology-workshop/setup-python-workshop.html), which are currently using the spoiler
callout class to hide different setup options. I know @froggleston responded in Slack to let you know we'll be taking a look at this in the next couple of weeks and wanted to also jump in to say I'm excited to dig in and test this new feature!
@astroDimitrios - Thanks for your patience. I've finally had some time to play around with this and, although I'm able to get this up and running, I am seeing some odd behavior that I'm wondering if we could change.
tab
callout requires tab names to be prefixed by a single #
, whereas all of our other callouts require titles to use double ##
. This is likely to be confusing for folks trying to migrate over existing callouts to the tab style. Is it possible to change this so that the new callout type uses ##
for tab titles?In the above screenshot, the "Windows" tab title appears. It is prefixed by a single hashtag in the markdown file.
In the above screenshot, the "Windows" tab title does not appear. it is prefixed by a double hastag in the markdown file.
In the above screenshot, content formatted as an unordered list does not appear at all in the tab callout.
In the above screenshot, content formatted as an unordered list appears, but without list formatting.
In the above screenshot, numbered list items appear (with list formatting removed) and unordered list items do not appear at all.
Installation instructions are likely to be a common use case for tabbed callout boxes, so the ability to render lists (and especially ordered lists) seems pretty important. Do you think there's a way to incorporate this?
I'd personally be pretty excited to get this new feature incorporated into the Workbench, as I think it's a pretty big improvement over our current method for showing installation instructions across different platforms using spoiler class callouts (example below).
Do you think it would be possible to incorporate changes mentioned in items 1 and 2 above? @froggleston and I can take a look at the styling (item 3) if that's outside of your wheelhouse. Not that it's in our wheelhouse either! 😂
@ErinBecker
###
instead of ##
. Let me know if you want it to be ##
instead.New syntax:
::: tab
### Windows
- List one
- List 2
- List 3
After list
:::
Screenshot below showing altered styling and an unordered list:
Screenshot below showing an ordered list:
@astroDimitrios I just wanted to understand the functionality of group tabs, does that mean if I make a selection for one set of tabs, the same selection is made for the other set(s).
The reason I'm asking is that I would have liked to make the default tab configurable (so I could choose between a SLURM tab and a PBS tab in the configuration file for my use case). I could live without that though if they only had to select the tab once and the choice would propagate through.
@astroDimitrios I just wanted to understand the functionality of group tabs, does that mean if I make a selection for one set of tabs, the same selection is made for the other set(s).
The reason I'm asking is that I would have liked to make the default tab configurable (so I could choose between a SLURM tab and a PBS tab in the configuration file for my use case). I could live without that though if they only had to select the tab once and the choice would propagate through.
Hi @ocaisa for group tabs clicking once on say the Windows tab turns all other group tabs to windows and will remember the users choice :)
Thank you so much again for your contribution @astroDimitrios ! You can see your tabs in the wild in the sandpaper docs 😄 https://carpentries.github.io/sandpaper-docs/episodes.html
What: This pull request adds support for tab and group-tab admonitions/panels. They are based off sphinx-tabs. It does this by adding an extra lua filter.
Why: So I can have a tab of instructions for each computer platform which sync (group-tabs) across episodes. Tabs are also useful when teaching compiled languages as I can have a tab for each compiler.
Syntax:
tab
Text after
:::
::: group-tab
Linux
1
Windows
2
Archer
3
:::
::: group-tab
Linux
4
Windows
5
Archer
6
:::