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 SPEC badge recommendation #305

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jarrodmillman
Copy link
Member

@jarrodmillman jarrodmillman commented Mar 6, 2024

Close #240. See https://deploy-preview-305--scientific-python-specs.netlify.app/specs/purpose-and-process/#badges

TODO after getting feedback

  • Update quickstart.py
  • Update Ecosystem Adoption section of existing SPECs
  • Add layouts/shortcodes/spec_badge.html to scientific-python.org repo. It is something like:
{{- $number := .Get "number" }}
{{- $title := .Get "title" }}
{{- $tabs := slice }}
{{- $name := "Rendered badge" }}
{{- $content := printf "[![SPEC %s — %s](https://img.shields.io/badge/SPEC-%s-blue)](https://scientific-python.org/specs/spec-%0*s/)" $number $title $number 4 $number }}
{{- $tabs := $tabs | append (dict "name" $name "content" $content) }}
{{- $name := "Markdown" }}
{{- $content := printf "`[![SPEC %s — %s](https://img.shields.io/badge/SPEC-%s-blue)](https://scientific-python.org/specs/spec-%0*s/)`" $number $title $number 4 $number }}
{{- $tabs := $tabs | append (dict "name" $name "content" $content) }}

{{- $groupId := .Page.Scratch.Get "tabgroup" | default 0 -}}
{{- .Page.Scratch.Set "tabgroup" (add $groupId 1) -}}
{{ partial "_elements/tabs" (dict "ctx" . "tabs" $tabs) }}

@jarrodmillman jarrodmillman marked this pull request as draft March 6, 2024 12:06
Copy link
Member

@lagru lagru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

By the way I really loved the green color scheme from the meeting notes! Looks like the colors of the SP logo (if not the same even).

@stefanv
Copy link
Member

stefanv commented Mar 6, 2024

This is fine as-is, but perhaps we also want to add a reminder along the lines of "Not all SPECs are applicable to all projects, so there is no need to try and 'earn' all badges."

@tupui
Copy link
Member

tupui commented Mar 6, 2024

This is fine as-is, but perhaps we also want to add a reminder along the lines of "Not all SPECs are applicable to all projects, so there is no need to try and 'earn' all badges."

Though at first maybe it's a good thing as people are more reluctant than anything else at the moment 😅 so if that can somehow motivate more people to look into it, why not I would say!

@jarrodmillman
Copy link
Member Author

2024-04-02T06:03:57,351212935-07:00

@Carreau
Copy link
Contributor

Carreau commented Apr 2, 2024

I don't think we really need table for such short snippets.

This is good to see how tabs work, but I think in the long run when snippets are only 1 or 2 lines we can "untabify".

@jarrodmillman
Copy link
Member Author

jarrodmillman commented Apr 2, 2024

With tabs

2024-04-02T10:20:37,396717318-07:00

@jarrodmillman
Copy link
Member Author

jarrodmillman commented Apr 2, 2024

Without tabs

2024-04-02T10:21:34,272886862-07:00

@jarrodmillman
Copy link
Member Author

jarrodmillman commented Apr 2, 2024

It would be great if the @scientific-python/spec-steering-committee could vote for which of the two options above they prefer:

option 1 without tabs 🎉
option 2 with tabs 🚀

@ivanov
Copy link
Member

ivanov commented Apr 8, 2024

I know I'm a dinosaur - but I appreciate the fact that without tabs works when I have javascript disabled, and has the proper context when rendered in a text-only browser (w3m in my case). (There are ways to make the tabbed version work without javascript too, using a combination of CSS and anchors)

@stefanv
Copy link
Member

stefanv commented Apr 9, 2024

We could add noscript fallbacks, but then we'd want to do it everywhere JS is used (shortcut sidebar, eg). We don't have the bandwidth for that work built into our roadmap, but if the changes are not too invasive, we'd certainly consider such contributions to the theme.

@stefanv
Copy link
Member

stefanv commented Apr 9, 2024

(As an aside, we do prioritize accessibility, albeit with JS enabled.)

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 badges
7 participants