Closed trallard closed 1 year ago
A few responses below:
Decision: do we move forward with looking at the design system at a whole now? (I would strongly advise to do this otherwise we will be having these discussions every time we need to tweak/improve a specific component to meet accessibility requirements, for example)
It isn't clear to me what exactly is entailed in "look at the design system as a whole". If this just means "making a collection of suggested adjustments all at once, instead of proposal by proposal", then that sounds good to me (but if you want to significantly alter the structural layout or major UX those should be standalone proposals).
If that is the case, I suggest we follow these decision-making guidelines around the process in order to avoid a never-ending discussion spiral about minor design decisions:
Note: If there are still objections at the end of this process that are unresolveable, then we need a way to decide on a path forward nonetheless. We have no formal governance for this right now.
Decision: shall we keep orange and yellow as semantic colours? or get rid of one (I already added my suggestion above but I will defer to the rest of the team)
I'm fine getting rid of one. I guess the question would then be do we stop distinguishing the color between caution
, warning
, etc? (whichever two semantic directives we were using this color to distinguish between)
Decision: do we want to move in the direction of a vibrant palette (2 which is an improved version of 1) or a more muted one (such as option 3).
It is really hard for me to have opinions about this without seeing what they look like in the docs. All of the palettes are visually appealing to me. If you had to push me I'd say number 3 (more muted), but I do not have strong feelings (maybe that'd be different but it's very abstract to just look at a grid of colors 🤷 ).
Colours in context: I will work on a tiny design system in Figma show how these colours would look along with the typography and in button/badges. With this we can make a decision on colours to keep: for primary,secondary, and accent (light blue, purple, magenta, pink).
This would certainly help (me, at least)
Right now I am proposing a review and maybe changes to the colours used in the themes, but from a holistic point of view. That is looking at the semantic, background, brand, and foreground colours to ensure we have a palette designed with accessibility and coherence in mind. Instead of making small adjustments for text, then potentially look at more colour adjustments to fix the buttons/badges contrast issues, and so on, which most of the time results in having too many slightly different colours scattered around and usually it's harder to do accessibility remediation work.
I think that is enough an improvement/change - and from a user experience perspective it's always best to make iterative, self contained changes. UX or structural changes (if any) should be done separately and in a way that are minimally disruptive to the user experience and workflow.
It is really hard for me to have opinions about this without seeing what they look like in the docs
Agree, seeing colours in context is 💯 more helpful. But I needed to start somewhere to ensure we had enough shades for each colour.
There is no need to make a decision right now as this is just a first proposal but I wanted to get a feel in case anyone felt strongly about muted palettes or more vibrant ones.
I started working on a Figma file yesterday so should have this done today and can share this with y'all for discussion.
Edit: ended being dragged into some unexpected tasks so will get this throughout the week 🤦♀️
Design work in the open can be slightly tricky as it's still very visual heavy (and design tools do not play nicely with GitHub) so I am trying to share as much context and intermediate steps so that these discussions also serve as a record and documentation on how this process happened and how decisions are made. So please let me know if there is a way I can make this work easier for y'all or if there is too much noise.
This is great progress, thanks @trallard!
Given the various complexities mentioned by @trallard I think it's probably expedient for us to drop the color distinction between attention/important and caution/warning/versionchanged admonitions (much as I'd like to keep them distinct). That would simplify our current system to 7 colors, plus some whites/grays/blacks for backgrounds, shadows, todo-admonitions, etc:
Of course these groupings are not set in stone; if we really needed to we could consider e.g. re-using one of the admonition semantic colors for inline code. But let's not go there unless we really get stuck.
As far as the hues that we want/need: I suggest that we keep:
The other four hues are more malleable IMO --- primary and secondary could be anything as long as they complement each other, and inline code and generic admonition/note could likewise be anything in principle. That said, if we can keep the code pinkish and the notes bluish to avoid too shocking of a change, I think we should do that. Consequently, that would mean primary/secondary are "whatever 2 colors are left" after assigning the others as above.
Relating that reasoning back to your 3 color system ideas, here is what I see:
I think for a next step I would suggest making a system palette that has only 7 hue columns (plus a column of neutrals), so we can get closer to a clear picture of "this would be primary, this would be danger" etc. To summarize the above, I think those 7 hues should be red, orange-or-yellow, green, pink, and 3 others.
sorry for not participating in this debates even though I'm a big fan of what you did so far @trallard but I lost control of my time in November and completely dropped FOSS for a while. let me just drop few comments that may be useful:
I agree with the latest comment of @drammock on keeping color-ish whenever possible. We modified a lot of the colors recently and some documentation and users depending on default don't keep up (see the panda doc, it's now a mix of teal and dark purple)
Elevation: I am unsure how the elevation (shadows) + background colours (background, surface, on-surface colours) were chosen, but I have found that the shades (or changes in shades) are inconsistent across dark and light themes.
@trallard I made the coloring for the dark theme in https://github.com/pydata/pydata-sphinx-theme/pull/540. The elevation/background color is inconsistent between the 2 themes by design. I followed guidelines from css-trick website which is highly suggesting NOT to use shadows to convey depth in a dark theme. The only solution is to have shadows in the light theme and different levels of lightness in the dark one as backgrounds.
Hey folks - now that I am back from some time off, I can share this with you. I have put together three proposals based on discussions we have had:
I added plenty of notes to add more context and clarify some decisions. Some things to notice:
Example - Kitchen sink
page where you can see the components together and get an idea of how the colours and font scale work together.green, red, orange
are reserved semantic colours.EDIT: thanks to @choldgraf for reminding me that not everyone is a Figma user so there are multiple pages: the Example - Kitchen sink
has variants of the components in context and the other pages have all the variants of the components plus more notes on when one would be used over the other and additional observations
To discuss:
thank you very much for your proposals. I'm personally a big fan of the 3rd option. It's less opinionated than teal and will work better (in my opinion) as default colors. Also, we could illustrate the color customization in the demonstration documentation to align it on pydata theme.
I have 1 question and 1 comment though:
target
color I will strongly advocate against using violet. to give you an example of use case, it's used to underline the target word when using a search: https://pygadm.readthedocs.io/en/latest/usage.html#find-names and more importantly it's used to underline code sources when using the source code extension and violet is widely used for code itself: https://pygadm.readthedocs.io/en/latest/_modules/pygadm.html#get_items. TBH yellow is one of the few colors that is never used in code highlights in light mode.Thanks for the comments @12rambau
Also, we could illustrate the color customization in the demonstration documentation to align it on pydata theme.
This is a great idea and I am sure folks will find this very useful
I assume we will drop all the transparency tricks that we created to use real colors instead?
yes, working with transparencies is convenient from a dev point of view, but it can be quite challenging when looking at WCAG conformance (accessibility), so I'd like to use "true colours" as much as possible
regarding the target color I will strongly advocate against using violet
I had not thought about this. You are absolutely right here; we can keep the yellow then (it will not be used anywhere else) and might just do a small tweak to align with the other colours in the theme
I think that number 3 looks quite nice as well. I left a few comments in there.
I didn't realize that there were multiple pages, or that we could leave comments in figma at first. In case anybody else is relatively new to Figma like me, here is a GIF of me clicking through a few pages and leaving a comment so you know how it works in the UI:
yes, working with transparencies is convenient from a dev point of view, but it can be quite challenging when looking at WCAG conformance (accessibility), so I'd like to use "true colours" as much as possible
Ok then I have a technical question:
In the current implementation of dark and light themes, we have 2 color sets defined in _color.scss. It is super convenient as in the other files we are always calling the same colors (e.g. --pst-color-primary
). In the color palette presented here you have 1 color palette and you change the shade from one theme to another (e.g. --pst-color-primary-100
to --pst-color-primary-600
). Is there a way to remain compatible with the previous paradigm (1 file to control color for all) ?
Definitely! There will be some work needed to use the correct variables but we should still be able to have all the colours defined in a single file.
I'm conflicted between option 2 and option 3. Is it a crazy idea to use the teal color from option 2 as the "dark" primary, and the more bluish color from option 3 as the "light" primary? IMO the teal looks good in dark mode but not light, and the converse is true of the option 3 primary color. If that idea doesn't fly, here are the other considerations in my mind:
Possible point in favor of option 2:
primary
is fairly close to info
and is even somewhat close to secondary. As I mentioned in a figma comment, the similarity of primary/secondary is a trade-off: it makes links (primary) on announcement banners (secondary) look harmonious, but it also means that links everywhere don't change as obviously on hover.Possible point in favor of option 3:
Is it a crazy idea to use the teal color from option 2 as the "dark" primary, and the more bluish color from option 3 as the "light" primary?
Not crazy - but it would cause more issues with maintainability and consistency (more colours to keep track of). I can see folks scratching their heads about why the light and dark themes differ. And such a pattern could also be incredibly confusing or overwhelming for folks with cognitive and learning disabilities. There is a very early draft of recommendations from the newly created Cognitive disability WCAG taskforce, and consistency, usability, and reducing cognitive stress are fundamental principles towards making content accessible for these readers/users.
Agree that the Option 3 feels the most harmonious as the colours are adjacent in the colour wheel.
inline code
: keep the border and the accent colouradmonitions
: keep the TODO (need to agree on colour) and preserve the existing left margin on desktopbuttons
: give them a consistent min-widthlinks
and buttons
: it seems like folks like the proposed default, hover, and focus statesheadings
: will our default be the Primary or a monochrome colour?links
: @choldgraf suggested looking at links (default state) with the underline in the same colour as the text. I added this to the Figma file, so we need to decide on link styling.Both proposals are suitable for red-green and yellow-blue colour blindness and partial monochromacy (actually, the themes with the filter for the latter look pretty good). There are some issues with full monochromacy, but we are adding other cues to not rely entirely on colour.
Again, feel free to add comments to the files or ask questions.
headings
: will our default be the Primary or a monochrome colour?
+1 for monochrome. Users can override if they want to.
links (default state) with the underline in the same colour as the text.
-1 on this from me. I agree with @trallard that it looks very strange on the dark background, and even on the light background I'm not enamored. Although maybe I misunderstood, I thought @choldgraf was suggesting that the underline be a medium gray (not the same value as the text)? As a way of making the underline less prominent?
I created another option (basically, Option 3 shifted along the wheel), so we need to decide between these
I like option 3 better than option 4
links (default state) with the underline in the same colour as the text
Let's just drop my proposal - we can discuss in a future issue if we like, but I was actually suggesting something even more minimal than what is here, something like this:
However, I think that this would violate accessibility constraints because we'd rely too much on just color to denote the links.
I like option 3 better than option 4
+1 for option 3 as well
Drive-by comment from an old contributor: this is really amazing work!!
I like the different options, especially option 3 or 4 as well.
While here, a few questions:
(maybe the general comment is that it is not super clear to me what "primary" and "secondary" colors are meant to be / what they will be used for)
In the current theme (released/main), it is the "primary" color that is used for "navigation highlighting" .... While in the examples here it seems that the secondary color is used for this?
I mostly looked at it yesterday evening, and I see that now in Option 3 you added a "Navigation item (active)" element that actually uses the primary color.
Hey @jorisvandenbossche thanks for popping by
In the current theme (released/main), it is the "primary" color that is used for "navigation highlighting" (i.e. indicating on which page you are, highlighting in the right sidebar where you are on the page while scrolling). While in the examples here it seems that the secondary color is used for this?
I did notice yesterday that I forgot to add the "active" state to the nav bar and added this later in the Option 3 file.
So basically, the links and navigation items (nav bar, TOC, pagination, drop-down, etc.) should follow these patterns:
So here, the primary colour denotes an interactive element in a "passive state" - i.e. not being interacted with by default.
On the other hand, the secondary colour denotes an "interaction state," so if the user hovers, clicks or navigates through a keyboard or screen reader. This interaction is shown in the secondary colour.
These states are accompanied by other non-colour cues also to meet accessibility conformance.
Also, having these colours can help denote hierarchy or add some visual sugar. For example, if having buttons or tags - the primary colour could be considered the default or most important action/option (while not being destructive or confirmation, in which case the green/red/orange semantic colours should be used). So while we are moving towards a monochrome heading colour, keeping these distinct primary and secondary colours still makes sense from an interaction POV.
Docusaurus (and GitHub for links) do not swap colours, but these state distinctions certainly help highlight user interaction and, in general, is better suited to meet some of the WCAG success criteria (WCAG 2.1 and upcoming 2.2). Also - note I used inspiration interactions from sites focused on accessibility (like the a11y project) or from organisations and individuals I know who have done solid research and design work around accessibility and user interaction (Eric Bailey and gov.uk to name a few).
Also - I have yet to add sidebars to the Figma file (as I noticed, for example, that the left sidebar has no cue for hover or active states other than the colour right now). These should match the other "link" like components and states we already defined (to ensure all the interactions and states are consistent and follow Gestalt principles).
thought @choldgraf was suggesting that the underline be a medium gray (not the same value as the text)? As a way of making the underline less prominent?
oops, I completely misunderstood this, but having a quite muted gray might be tricky as we'd need to ensure this meets at least 3:1 contrast, not impossible but might need tweaking
Hey folks, I am circling back here - as per @choldgraf comment it would be best to follow a consent decision-making approach for this work.
So far, we have done the following:
From this, it seems the team would like to move with Option 3. So I would like, in turn, to move to the proposal ratification phase. Here is what I am proposing:
min-width
) and the such + update relevant Examples sectionsSo at this point, I would like to ask the following:
Not sure how long should this consultation period be open so I will defer to the judgement of @choldgraf @drammock and @12rambau. Also not sure if other folks should be brought into this discussion since I have only tagged those participating in the discussions so far.
Keep the accent colour (for the inline code) - and we could reuse it also for announcement banners
+1 from me. The announcement banner is meant to be attention-grabbing; IMO the accent color is a bit "louder" than primary or secondary so it better fulfills that requirement anyway.
Are there any follow-up questions from any of you?
I want to make sure we don't lose track of @12rambau's point about the target color. It's used for highlighting search matches and for changing the background color of code blocks. It's not clear to me what (if anything?) was proposed to do about that.
Not sure how long should this consultation period be open
let's give it a week? tagging @jorisvandenbossche and @bollwyvl to see if they want to weigh in. But anyone in the community is welcome to do so! I'll pin this issue to make it more prominent.
Are there any objections to this proposal?
I'm going to push back one last time on the "teal is too opinionated" issue. I thought I had let it go, but it continues to bother me, and when I look back at Option 2 I am still quite drawn to it, and I still struggle a bit with the choice of primary color for options 3 / 4.
IIUC, "opinionated" here means "chosen for aesthetic (not functional) reasons" and we're trying to let usability / functionality drive this process. But it seems to me that a pretty good functional argument was raised in support of using teal as the primary color, but it wasn't really accepted:
I would have thought that "I like the complementarity" would be seen as opinionated reasoning (this comes up in my own comments too, saying option 3 was "more harmonious"). I also would have thought that "more distinct" -> "easier to tell apart info boxes from interactable UI elements like clickable tabs/links" -> "a more usable design". But it seems like that line of reasoning didn't get any traction. I guess I'm wondering why not? Do people just hate teal? Why isn't the not-quite-violet-not-quite-periwinkle in option 3 and 4 considered an opinionated choice the way that teal is?
The impression that I'm getting is that it's really hard to set aside aesthetic judgments and let non-aesthetic considerations drive our choices, so when we like the results, we're more willing to say "LGTM!" and when we don't like the results, we try to find reasons to disqualify a proposed change (or non-change). I think I'm doing exactly this right now: I like how teal looks as primary color, and I don't like the currently-leading proposal quite as much. So I'm taking the time to come up with reasons why we should stick with teal.
So how do we proceed? As I said above, I think some (many?) of the arguments in favor of option 3 (including my own points in support of it) seem to be based on aesthetics. And I think the reason I've raised in support of teal is based on perception / discriminability, not aesthetics. Yet nobody besides me seems to find it compelling. I'm not going to take my ball and go home if option 3 wins, but I do want to understand what others are thinking / considering when they make these judgments --- am I missing something? Maybe the answer is "opinions don't matter until they do"; in which case maybe we can agree that there's nothing especially bad about teal and I'm content to have been out-voted on a question of aesthetics.
As an aside, one could also argue that keeping the primary color as teal is a good idea because it is consistent, and "consistency, usability, and reducing cognitive stress are fundamental principles towards making content accessible for these readers/users" with cognitive disabilities. I.e., for those users who don't customize the colors already, it represents a smaller change from what they're used to.
Hey @drammock, thanks for keeping the conversation going
I want to make sure we don't lose track of @12rambau's https://github.com/pydata/pydata-sphinx-theme/issues/1079#issuecomment-1370831093. It's used for highlighting search matches and for changing the background color of code blocks. It's not clear to me what (if anything?) was proposed to do about that.
No changes to using yellow - but will slightly tweak the shades used
The impression that I'm getting is that it's really hard to set aside aesthetic judgments and let non-aesthetic considerations drive our choices
I agree; it is hard to set these aside when it comes to colours and aesthetics; unfortunately, it tends to drag design discussions (at least in my experience). I have tried to set aside my personal preferences as much as possible (and thus my biases), and it seemed folks were leaning more towards Option 3 than 2 (so that is what I used as a compass, and maybe I misread something).
it was https://github.com/pydata/pydata-sphinx-theme/issues/1079#issuecomment-1371184528 that using teal as the primary color would make the primary color more distinct from the other colors in the palette. This wasn't really responded to AFAICT.
Apologies, I completely skipped/missed this. But yes, from a purely colour perception POV, the teal is more distinct from the violet as there is more distance between their corresponding hues. So this will not only be reflected in states (hover/default) distinction but reducing ambiguity regarding context-specific colours (info/warning/success).
TLD;R
The main goals for this work are:
#0A7D91
) and secondary (#894DEF
) have more distinct hues, so there is a more noticeable change in states #0A7D91
) is more distinct to the semantic info
(#276BE9
) colour#0A7D91
) is closer to the current primary colour (#459DB9
), which will help with keeping things consistent for existing users (see colour wheel)#4F6AD5
) and secondary (#894DEF
) are closer together in terms of hues which gives that feeling of "cohesion" but can also be a disadvantage in the sense of making the change in states less noticeableBoth themes:
brand
and semantic
colours, which makes it easier for folks to customise and, at the same, use contextual information effectively (also why we settled in ditching yellow)My personal preference: I like both proposals - but I would lean towards Option 2 (I like bold colours). Also, the teal/purple combination does work slightly better for certain types of red-green colour blindness (Deuteranopia and Protanopia - I did extensive research on colourblindness and the cognitive impact of colour when working on a colourblind friendly syntax highlighting theme). The latter can be balanced (in Option 3) with the non-colour cues in the rest of the system, but for fully abled readers, this will be the most striking colour combination.
Note: The links in this comment will redirect you to the "proposal for implementation" Figma files of the two themes
➡️ How to move from here?
Since it was proposed to use a consent decision-making process this seems this is the point where we balance our preferences (i.e. making a decision by yourself for yourself) and our range of tolerances (i.e. not your preference but also not something you'd object to).
We are seeking consensus on which proposal to choose: Option 2 or Option 3
So, looking at the proposals (Figma files) and arguments in this comment (from TLD;R onwards), each of us would register any main objections for Option 2 and/or Option 3 (as comments here). Same if there are no objections so that we could add something like:
- Fish: no objection
- Bird: I believe this falls short on...
(helpful questions to ask to determine if this is a paramount objection: "Will this option better serve the disabled users?" "Can I live with this proposal?" "Will this proposal cause harm?")
No objections == consent
Does this sound like a plan forward? As per this comment a 1 week period seems reasonable to me.
A few quick thoughts:
Ooops I was trying not to lean folks in a specific direction with the 🐟 and 🐦 examples, but it might have ended up being more confusing. So here is what I was suggesting as a format to capture individual's objections or lack thereof
My response to the proposals:
alternative
theme (so I explicitly state if I have any/no objections - aligning to the goals and removing personal preferences)
My response:
primary
and info
colors being too similar, which might give the confusing impression that info
elements are interactable.I have no clear preference between Option 2 and Option 3. I think both look great and would be a nice improvement, and would be happy with either.
(I think the blue primary color of Option 3 is more "standard", so with the benefit that people are used to this from other sites, while the teal primary color of Option 2 is more unique, with the benefit of giving a more distinct character to our theme. But no idea which of those benefits are "best" ;))
primary
and info
look the same. info admonitions are used everywhere and they will look the same as custom admonition (that are in primary
)So to summarize quickly, it seems that nobody has an objection to option 2 or 3, though in general there are more concerns with 3 than with 2.[^1]
It sounds like the main concern with 2 is:
[^1]: assuming here that the concerns people shared were not "objections" - I think in this context "objection" means that you think it would be a major mistake to move forward w/ the proposal, not a general comment.
I think that's a fair summary.
A note on both concerns:
The teal color is very distinct from what most themes use as a blue hue
BTW, docusaurus is also not using blue, but something greenish (that is not that far from teal): https://docusaurus.io/docs/installation
worry about
primary
andinfo
colors being too similar,
Also other themes we compare with seem to have this issue. For example, for furo (https://pradyunsg.me/furo/reference/admonitions/) the "note" color is also blue but a different blue as the primary color for navigation/links (and same for metaflow).
Although furo uses a totally different color for custom admonitions (purple-like), and not the primary color, so doesn't have the issue of confusing those two kinds of admonitions (for option 3, it would thus also be an option to use the secondary color for custom admonitions, which is more distinct from the info color).
The problem with Furo is that there are too many admonition colours - purple, red, orange, teal, blue 1, blue 2, green, grey.
Also, note that blue 1
and blue 2
are different from the main blue
, making at least three very similar colours (also, the green and teal are pretty similar).
This proposal tries to minimise the number of ad-hoc or otherwise colours and provide a consistent colour palette for the whole theme.
nobody has an objection to option 2 or 3, though in general there are more concerns with 3 than with 2.
so far it seems like 2 might be winning, but as promised let's give it a full week to see if any other objections emerge. I think that means waiting until EOD Tuesday 17 Jan.
Agreed - my feeling is that if nobody objects by then we should go with option 2
This also makes me feel like we'd benefit from some slightly more structured decision making guidelines, now that the contributors have grown a bit.
The jupyterhub team has PR merging guidelines that try to balance inclusion and efficiency, and have two groups for making decisions (a larger one for most decisions, based on lazy consent, and a smaller steering council that decides on majority vote for when we have an objection but still need to move forward)... I wonder what folks think about adopting something similar (it's basically what we already do informally but with the addition of a tie breaking mechanism). Should I open an issue about this?
I like @choldgraf proposal re decision making - also I acknowledge I am pretty new to the project so my opinion might not have too much weight.
But having these processes defined and ideally documented for new contributors would be extremely helpful to set expectations and fair/equitable processes. LMK if I can help with this at all.
I like the Jupyterhub guidelines. +1 for adopting something similar here.
Hey folks, I am back after some focused time on other work items. As per the above, we are moving in the option 2 direction. So I will start working on the colour improvements next week.
Hey folks - I know I need to finish this PR (almost there, and I should be able to do so now that the infinite loop in docs has been fixed 🎉 thanks, @drammock)
Also, I am super happy to inform you that we have hired an excellent designer at Labs @smeragoel who will work on accessibility design and our grant deliverables for PyData Sphinx.
Originally discussed in gh-1052
Summary
It was discussed in gh-1052 and gh-1043 that the current theme is constrained by the PyData brand colours, which makes these themes considerably opinionated.
A proposed enhancement is creating a more neutral (less opinionated) default theme (light and dark) for the PyData Sphinx theme.
Follow-up
Update: After working on #1086 I discovered the following issues and challenges:
warning
buttons and admonition). Such an example can be found in the Stripe writeup about making an accessible design system . I have added an image from the said write-up in which the yellow and orange are almost identical. While these two meet contrast requirements, they would be incredibly hard for colourblind and low-vision folks to distinguish from each other.warning
meaning, I wonder if keeping this as one of our default brand colours is the best option. I am worried that this might add some cognitive load for folks by using this for links and other structural elements and strong meaning in context. This aligns with the discussion in #1052 about adopting more neutral defaults.Moving forward
Suggestions to work towards an accessible and consistent design system
First iterations for colour systems
This system keeps the pink colour, as we currently use this for
inline code
.secondary
in the theme.Having a colour system like this helps to build scalable and coherent light and dark themes and this is basically the standard across the industry (see Atlassian, GitHub primer, GitLab, Stripe)
Need to do