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

Add lesson status and fix title element alignment #39

Merged
merged 13 commits into from
May 31, 2022
Merged

Conversation

zkamvar
Copy link
Contributor

@zkamvar zkamvar commented May 30, 2022

Testing

To test this locally, use the {remotes} package:

remotes::install_github("carpentries/varnish#39")

To test this on a lesson on github, you can add the following to your lesson's config.yaml file:

varnish: carpentries/varnish@add-lesson-status

Description

This fixes the lesson title to appear as an inline block instead of inline so that it respects the bounds of its box (see https://www.digitalocean.com/community/tutorials/css-display-inline-vs-inline-block)

This also adds lesson status indicators that will

  1. link to the appropriate section in the CDH
  2. Provide a tooltip/hidden text that describes the stage if one were to hover their mouse over the element (which I could not show in the screenshots), but you can find an example of the hover text in the source code

Pre-Alpha:
screenshot of header for lesson in the incubator in pre-alpha. It has a bold link with a red alert octagon next to it

Alpha:
screenshot of header for lesson in the incubator in alpha. It has a bold link with a yellow alert triangle next to it

Beta:
screenshot of header for lesson in the incubator in beta. It has a bold link with a blue alert circle next to it

This will fix #20

@zkamvar zkamvar changed the title Add lesson status Add lesson status and fix title element alignment May 30, 2022
@zkamvar zkamvar requested a review from tobyhodges May 30, 2022 23:00
@tobyhodges
Copy link
Member

It looks good with the Incubator logo as shown in your screenshots above, but I feel that somehow the spacing could be improved for a lesson with The Carpentries branding. I attach screengrabs for that, plus each of the lesson programs for reference.
Screenshot 2022-05-31 at 09 41 32
Screenshot 2022-05-31 at 09 41 09
Screenshot 2022-05-31 at 09 40 44
Screenshot 2022-05-31 at 09 38 54

@tobyhodges
Copy link
Member

Screenshot 2022-05-31 at 16 50 27

looks a lot better now, thanks 👍

@zkamvar
Copy link
Contributor Author

zkamvar commented May 31, 2022

I've added a single nonbreaking space in front of the text, so it now looks like this with the various logos:

screenshot of header with incubator logo and pre-alpha status

screenshot of header with carpentries logo and pre-alpha status

screenshot of header with software carpentry logo and pre-alpha status

screenshot of header with data carpentry logo and pre-alpha status

screenshot of header with library carpentry logo and pre-alpha status

screenshot of header with carpentries lab logo and pre-alpha status

@zkamvar zkamvar merged commit 0662295 into main May 31, 2022
@zkamvar zkamvar deleted the add-lesson-status branch May 31, 2022 14:53
@zkamvar
Copy link
Contributor Author

zkamvar commented May 31, 2022

Thank you for reviewing, @tobyhodges!

@tobyhodges
Copy link
Member

The inclusion of the Lab version above reminds me that we will need something like these status indicators to make lessons stand out that have passed peer review (see the banner on https://carpentries-lab.github.io/python-aos-lesson/ for an example of what I mean) but that can definitely be an issue for another day. it will need to link to the relevant Zenodo entry or journal publication.

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

Successfully merging this pull request may close these issues.

Add non-invasive way to indicate lesson status
3 participants