Repository navigation
Add the sphinx-togglebutton extension and a figure for MAP_FRAME_TYPES - #4926
Conversation
|
Is the toggle button better than the dropdown directive for sphinx-panels? |
|
@meghanrjones Do you still want to try the |
Co-authored-by: Meghan Jones <[email protected]>
Sure, I'll submit a PR. I think showing the code in a dropdown menu will be very helpful, but am not tied to the |
|
Regarding this comment and this reply about the toggle button hint text, I agree that we'll want to use a least two different texts for different cases. Do you think it's better to implement that in doc/rst/_extensions or submit a feature request to sphinx-togglebutton for extending the directive to support a custom hint text? |
I think we can add it here first, and submit a feature request later. It's unclear to me if they like this feature and how often they made a release. |
|
@meghanrjones I'd like to merge this PR into master first and work on the "custom hint text" in a separate PR. I feel that it's easier to track the changes and submit a PR to upstream. |
Yes, I agree. |
|
Just had a quick look at the sphinx-togglebutton source codes, it looks difficult to support "custom hint text", because the hint text is controlled by CSS. I'll open a feature request later. Perhaps we can use "Click to show the source or an example" as a temporary workaround. |


Description of proposed changes
This PR adds the
sphinx-togglebuttonextension (~20 KB) to the repository, and also an example figure for MAP_FRAME_TYPE showing how the togglebutton works.Preview link: https://gmt-p0akp8sm5-gmt.vercel.app/gmt.conf.html#term-MAP_FRAME_TYPE
It shows a toggle button on the right:
Click the button, and you will see:
Fixes #
Reminders