Riverlea - merge crm-c-light-text and crm-c-text-light - #31994
Conversation
|
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
a2d9bfe to
4c5ee33
Compare
|
@ufundo thanks for spotting the The other main change here around warning colours will need some testing. Emphasis colours are a headache because there's so many different ways they're used and there always needs to be good colour contrast. E.g. for warning you get:
In short it should be a case of 'this is the red or green I want for danger/success' but in reality those colours need to work with the context and each stream has their own quirks. This is one of those problems I only realised while building RiverLea so it's ended up quite complex, and yet also not without issues. I tried to track this issue here: https://lab.civicrm.org/extensions/riverlea/-/issues/29 but as recently as v1.3 I had to add more emphasis colour variables to get the right contrast ratios, and I still occasionally find bugs, ie https://lab.civicrm.org/extensions/riverlea/-/issues/38, because of some combination, say, of an alert and an icon. All of which is to say a) I will test these alert colour changes in a bunch of contexts next week; b) if it doesn't break anything else - great - if it does, then c) maybe it would be good to have a call to see if there's a way to rationalise/simplify this all. Most sub-theme makers won't need this level of complexity/configurability (in the core variables file, there's 9 variables with 'success' in the name and 11 with 'warning' - almost all specifying colours!). |
|
hi @vingle thanks yeh I pulled a thread and... it kept going. Great if you can test a bit. Maybe a call would be good. I was thinking about streams and customised screens and how it would be really great if we can get as clearer view as poss of which variable pairs might appear as text-on-background or vv. But appreciate its not simple! I think the notification text disappearing in dark mode is a new example of the same bug For naming, sorry I didnt notice that convention. I thought
|
That makes sense. Flip side is being able to search FWIW - this screengrab doesn't occur for me, is it because of you forcing black on text in dark-mode standalone because of the login screen (#31991)?
|
No, I can recreate on smaster today. It's only for Hackney Brook. (the login screen change is tightly scoped to the login screen) |
Right yeh that does make sense. Maybe even more important to see these together if |
|
Thinking about it I think those are slightly different. I.e. we have: which are little grouped things and make sense that way round. But I think "light" and "dark" work slightly differently. I don't think these groups make sense: These seem the more logical groups to me maybe? |
That's true. There's probably a whole bunch of changes that could be done with naming of variables because it was begun without much of a plan for them. I'm also conscious that once people have built their own streams/themes from these variables it will be much harder to change them..... |
|
I've fixed the HackneyBrook DarkMode bug here: #32077 on 6.0beta (in a slightly more direct way). Maybe this PR could be just about name-changes, rather than the other two bundled changes of fixing Hackney DM notifications and changing the way alert colours are names/specificed in dark-mode? The alert changes I think will need quite a bit of testing, because of the various places alerts are used and the various things that appear in alerts. Your changes look simple but make me nervous about a bunch of known unknowns. If the main motivation is "my brain couldn't cope with e.g. --crm-c-light-green now being dark green and vice versa" then these changes are about making life easier for theming devs and might need some discussion so my brain can cope too! But the other two issues - hackneybrook darkmode notification and text-light/light-text mixup feel like they could/should be merged quickly.. |
| } | ||
| .crm-container .extension-installed { | ||
| background: var(--crm-c-green-light); | ||
| background: var(--crm-alert-background-help); |
There was a problem hiding this comment.
This change will impact Thames, which sets --crm-alert-background-help: var(--crm-c-blue-light);
There was a problem hiding this comment.
Yeh. I think what would be good here is a separate semantic label that is like "--crm-c-enabled".
Then the default for help and enabled colours can both be green.
If Thames wants to make help things blue, it can do without making enabled things blue. (And no one has to set green to blue)
Totally agree. I think I originally thought the notifications issue was caused by fixing the
Yes. The motivation is: |
8bb56c0 to
a349140
Compare
|
Have updated this to just merge those two variable names. But fixing that does create a problem in Hackney Brook dark mode - This doesn't happen before because I'm adding the smallest fix I can think, which is to set |
3f25167 to
effd7fd
Compare
|
That sounds a good suggestion
|
|
Indeed, it would be good to know that the streams should all "just work" because they are variations of the sort of thing users will be able to vary -- it feels like the core and stream css has got a bit tangled maybe?
I’m not sure where you specifically refer to, but the lines between core hard set css property (eg enabled extensions are a green variable), core set variable (eg green is hex value Y) and stream override (eg this stream uses a different shade of green) is so far opinionated and definitely open for discussion & improvement.. sometimes I will have good reason for doing it some way (usually it’s a variable if Shoreditch and Greenwich do the thing differently) other times it’s arbitrary, probably better ways to do it with more brains. That said - changing names of variables is something we should aim to do before there are custom streams in the wild…..
|
RiverLea 1.3.6 - Fixes GL#108, GL#109, #31994 & couple more
|
retest this please Jenkins |
699e611 to
4833530
Compare
|
Yes, that’d be good - then can move onto other variable name cleanups.
|
|
Hmm. There's an issue for Minetta with checkbox-list item. It's another place where dark mode is flipping a text var dark=>light but the background stays light. I think the best fix involves fixing a value for |
|
It's a bit bigger, because essentially I'm updating places where |
That's a big string you're pulling - maybe you shouldn't do that until we speak later on Thurs? I can see what you're aiming for, but you're changing quite a bit of internal logic by flipping crm-c-text and crm-c-dark-text (which was only intended to help clarify that a light bg wants a dark text foreground). It's barely used as a variable, and maybe could be dropped - but here you're elevating it to be used a lot more.. It feels like you're adding a new complexity to re-rationalise it differently, but mostly just to solve a bug here? You're also adding new variable names? Maybe structural proposals like new variable names or reworking how specific variables work could start on Gitlab as a discussion, not in the middle of a growing PR which I thought was just to clean up the (Apologies if I misunderstood - am just post-moving house, am ill, and today is my childcare day. I should have more time to read/test slowly tomorrow) |
|
I have another PR incoming which I hope might (amongst other things) help make testing easier: #32127 |
ef5403c to
8820001
Compare
…rast on minetta / hackney
|
I tried to pull back on the |
42a15f7 to
b66b5e3
Compare
|
I've done quite comprehensive tests on Minetta light + dark* and I've found a bunch of bugs, mostly around dark-mode contrast issues, but none are from this PR - they are in RiverLea itself. So while I will keep testing across the other three streams I would recommend to merge this now, and I will make a new PR with fixes for these newly found dark-mode legibility bugs, and do a final round of testing. *by comprensive I mean - all the ThemeTest screens, the Civi dashboard (all dashlets), Contact dashboard (all tabs), FormBuilder UI (all tabs), SearchKit UI (all tabs) and API4 UI - in case we ever want to try and automate visual tests with something like BackstopJS (ref: discussion) |
|
While continuing to check this in Walbrook and Hackney Brook I did find two issues linked to this PR. I'm putting fixes as part of RL 1.3.8 - which is a bit of an epic fix of darkmode issues, the vast majority not linked to this, but just emerged via deeper testing. So either this PR needs to be merged first before that, or wait with this and just merge 1.3.8 instead, coming shortly… |
RiverLea 1.3.8: 14 dark-mode fixes, 3 other fixes, 2 new variables & #31994
|
Closing, superceded by @vingle 's version |


updated description
Overview
Merge eerily similar css vars, then try to fix some things that break as a result of the merge.
This standardises on
crm-text-light. It also updates use ofcrm-text-darkso thatcrm-textis set to eithertext-lightortext-darkdepending on the context/dark mode.(Previously some of the streams set
text-lightto something dark in dark mode, but this a) caused some issues; b) made it hard to follow what was going on in dark mode.There's also some consequences for:
crm-heading-coland friendscrm-checkbox-list-bgand friendscrm-c-yellowand friendsalert-text-warningandalert-background-warningI've done my best to follow through the consequences as minimally but logically as poss.
Comments
I noticed this when looking at the Standalone login page on Hackney Brook with Dark Mode -- the alert message text color seems to be undefined, because it's using crm-c-light-text , which isnt defined in that context.
`