Repository navigation
Conversation
|
Great work @meghanrjones! I'm not sure about the prominence of the dropdowns. In my eyes they draw too much attention from the reader. I agree with @seisman in #4926 and would prefer the Additionally I would place the script beneath the plot as this would aid the flow of reading: your version:
proposed version:
What do you think? |
I agree with placing the dropdown/toggle-button after the code. I also like the more subtle style of the togglebutton, but think that a more descriptive message for the button is essential (i.e., 'Click to show the source script' rather than 'Click to show'). I don't think this is included in the sphinx-togglebutton extension, but since the source code is so simple with a permissive license perhaps we could add the functionality or open an issue in sphinx-togglebutton. @seisman, do you know if changing the 'Click to show' text is already possible with that extension? |
Yes, the extension provides a configuration to change the hint text (see https://sphinx-togglebutton.readthedocs.io/en/latest/#configuration), but the text is the same for all toggle buttons. I think we may want to use different texts for different cases. For example:
It's possible to extend the directive to support a custom hint text, e.g., |
Great, let's move forward with using the togglebutton for showing the scripts. |

Description of proposed changes
This PR adds dropdown panels (using sphinx-panels) that show the code used to generate the figures in the 'features' section of the cookbook. Relates to #4926, which shows a different sphinx extension for generating dropdown panels. Also relates to the documentation discussion initiated by @KristofKoch here.
Preview link: https://gmt-1r6r2gxux-gmt.vercel.app/cookbook/features.html#overview-and-the-gmt-conf-file
It shows a toggle button:
which can be clicked on to show the code:
Fixes #
Reminders