Skip to content
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

[Spike]: Investigate adding support for buttons in MyST #5346

Open
3 tasks
Tracked by #5045
agoose77 opened this issue Jan 8, 2025 · 1 comment
Open
3 tasks
Tracked by #5045

[Spike]: Investigate adding support for buttons in MyST #5346

agoose77 opened this issue Jan 8, 2025 · 1 comment
Assignees

Comments

@agoose77
Copy link
Contributor

agoose77 commented Jan 8, 2025

Jupyter Book 1 has a {button-link} role that originates from sphinx-design. We do not yet have this in Jupyter Book 2 (mystmd). This user-story tracks the need to implement this in MyST-MD. This should be a small PR to both mystmd and myst-theme

There are buttons in sphinx-design, which is incorporated with Jupyter Book 1: https://sphinx-design.readthedocs.io/en/latest/badges_buttons.html#buttons

The syntax there takes the form of two directives:

```{button-link} https://google.com

Description
```


```{button-ref} foo.md
:ref-type: doc

Description
```

As we are authoring this feature for mystmd, we have to consider upgrading from Jupyter Book 1 and the future-proofing of the implementation. We might not want to adopt all of the features / design decisions made here.

See the upstream issue: jupyter-book/mystmd#1654

Definition of Done

  • Add new role to mystmd
  • Add renderer to myst-theme
  • Test role in local server
jnywong added a commit to jnywong/myst-theme that referenced this issue Jan 13, 2025
Add LinkOrButton renderer

Co-authored-by: Angus Hollands <[email protected]>
@agoose77 agoose77 changed the title Add support for buttons in MyST [Spike]: Investigate adding support for buttons in MyST Jan 13, 2025
@agoose77
Copy link
Contributor Author

Wow, that was a lot more work than I initially anticipated! @jnywong and I paired on this, and it was really useful for me to get a better handle on my side of the refinement work. On top of this, we ran into some challenges that I wasn't able to predict that led to some workload scope-creep. I've learned that my initial 2-hour estimate for this was too optimistic, and next time I should further increase the estimated difficulty irrespective of the additional scope-creep we encountered.

As such, we have re-defined this as a spike, and optimised for getting something done rather than a final solution. I will get the last parts of the PR across the line, and then we can see what the rest of the upstream team think about the direction. Once we get some feedback, this can be pulled back in via sprint planning.

Shout out to @jnywong, who was very prepared for the session and pushed through quite a lot of "huh that's odd, let's back track" moments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants