apluslms / a-plus-rst-tools

Tools to publish RST course content for mooc-grader and a-plus. Should be cloned as a course submodule.
MIT License
5 stars 24 forks source link

Add alternative launch button `thebe-precell-button` #142

Closed vlipiainen closed 2 years ago

vlipiainen commented 2 years ago

Description

What?

Add a new type of button to launch interactive code cells, meant to be used just before a code cell.

Why?

It (subjectively) looks better, and allows students to start running code from whatever point of the page (assuming that the buttons are added before every code cell).

How?

Define a new directive thebe-precell-button and make styling work.

Testing

Remember to add or update unit tests for new features and changes.

What type of test did you run?

I tested the new buttons in Chrome and Firefox, and checked what happens

Did you test the changes in

Think of what is affected by these changes and could become broken

Mostly styling, which could behave in weird ways in situations I didn't think of.

Translation

Programming style

Have you updated the README or other relevant documentation?

Is it Done?

Clean up your git commit history before submitting the pull request!

vlipiainen commented 2 years ago

@Mankro Thank you for the review! The changes in javascript URLs in #141 are fine by me. This pull request should be ready to merge now. I noticed a few styling bugs while working on something else, that's why I added commits (I'm not sure what the best practice there is, other than noticing the bugs before putting up a merge request).

markkuriekkinen commented 2 years ago

All good! I rebased and squashed the commits first.