Skip to content

ENH: update show code cell prompt to be more concise #362

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

Merged
merged 2 commits into from
Feb 16, 2024
Merged

Conversation

mmcky
Copy link
Contributor

@mmcky mmcky commented Feb 13, 2024

This PR uses myst-nb config to update the Show code cell source prompt to Show source

The source is backed into the myst-nb node so we could override through our own extension if needed

Copy link

netlify bot commented Feb 13, 2024

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 4cf22c1
🔍 Latest deploy log https://app.netlify.com/sites/taupe-gaufre-c4e660/deploys/65cae526d2c6090008ae8f82
😎 Deploy Preview https://deploy-preview-362--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Feb 13, 2024

@mmcky
Copy link
Contributor Author

mmcky commented Feb 13, 2024

@jstac would you be happy enough with Show source?

We can override the myst-nb text via _config.yml that is responsible for writing these objects in html which is a pretty simple fix but the {type} is hard coded into the package so Show {type} will produce Show source, Show output and Show contents based on the node type that is being parsed.

Screenshot 2024-02-13 at 2 59 48 pm

The alternative would be to override this node in myst-nb via a sphinx extension which can be done in quantecon-book-theme -- it is just a bit more involved.

@mmcky mmcky requested a review from jstac February 13, 2024 04:33
@jstac
Copy link
Contributor

jstac commented Feb 14, 2024

Sure @mmcky , thanks

@mmcky mmcky added the ready label Feb 15, 2024
@mmcky mmcky merged commit 307cb17 into main Feb 16, 2024
@mmcky mmcky deleted the show-code-prompt branch February 16, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants