-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.0][Atum] Refactor CSS variables and template options #26440
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
Conversation
|
@bembelimen are you able to take a look through this and make sure nothing on your guys side has regressed in the template options? |
|
The system tests failing here are actually due to this PR. The removeElement thing is fine - it's not due to this PR but the onchange is - I assume we need to wrap and if statement around if the element being retrieved by ID is actually found on the page. |
|
Thank you. Should be good now. |
|
@wilsonge Assuming ozdemirburak/iris is not used elsewhere, I guess I can remove the following from composer.json ? ... https://github.com/joomla/joomla-cms/blob/4.0-dev/composer.json#L84 |
|
It is really simple - you cannot achieve the intended aim of enforcing an accessible colour scheme using the hue field AND have the other field selects. It is one or the other. |
|
completely agree on that, that was never the intention back then to have the other selections... |
|
I'm not sure where to go with this. I can delete all the color options, leaving it open for someone to create different themes as suggested by @coolcat-creations and @nadjak77? This PR still cleans up the CSS and with a few additional changes would makes theming easier. Alternatively I leave as is. If we want a user to be able to define colors in the template options then this PR offers a CSS only, slimmer, client side solution. As suggested by @dgrammatiko this can probably be extended with JS but personnally I believe that is not required. Lastly of course I can just close it. |
|
Unfortunately as the template team did most of their work through direct commits there is no pull request which documents the intent of that hue field. I do note however that it was added to the template when it already had those other colour fields so it does seem odd to me that it wasn't considered that they cannot work together. |
|
Many moons ago I did a small experiment to prove that we are all doing it wrong! Did I mention that PHP is not the right tool for css works? I did, but let me repeat, PHP is not the right tool for scss/css works |
|
OK so given we're having the chat here. What about if we decided to flag to the user in the interface if their chosen colours have a11y compliant contrasts or not (at the various levels). Because @dgrammatiko is right in the context we really shouldn't be compiling this after the params are saved. At worst it should be done at the point where we save the params (with JS if required). My recollection of this discussions is that initially the values were supposed to be precomputed. However at a later point the decision was made in order to support company colour schemes that may not be a11y by default people could choose to manually override the colour schemes to create their own branded themes that obeyed a brand manual that wasn't a11y by default. However for most people the intention was they'd only need to set primary/secondary colour styles |
|
Not sure what you mean about flagging up? Something like https://whocanuse.com/ ? |
|
Yup something exactly like that obviously less items in the list than that to not make the UI too complicated. So by default we're accessible (and can achieve this in JS etc). If people override the schema then we can show them what QA they are/aren't meeting |
|
No idea how to do that but at least I understand what you mean |
|
At some point I saw in my tweeter feed a very nice solution for this exact problem. I just need to find it EDIT: found it: https://twitter.com/kevgski/status/982714455300583424?s=21 |
|
There it is! Spent ages trying to find that |
|
that looks perfect @dgrammatiko |
|
@brianteeman hm, it seems overkill for the task tho. Let me explain it has a hard dependency |
|
D3 is a large library and does enough major version updates could be a bit of a concern :/ However practically speaking we need something that's not going to take forever to implement bearing in mind we have only a handful of quality javascript contributors to the CMS... |
FYI that demo doesn't reflect to a oss repo |
|
The code in the demo is at https://github.com/KevinGutowski/KevinGutowski.github.io As there is no licence listed we cannot use it (unless we ask - which is worth it I think) |
|
I don't care how it is done technically but I am sick of hearing that it can be done better if .... and then it stalls because there is no one with the time/skill/will/energy to do it. |
|
Do I close this? |
|
Let's go for this and use the library @dgrammatiko is suggesting to feedback to users about whether their colours meet a11y requirements |
|
perhaps wait until @angieradtke has finished?? |
|
yes we should wait on that |
If you are gonna merge this, it should probably be done before any major work. My initial reason for this PR was to clean up the atum scss before an attempt to repaint it. |
|
What do you mean exactly with clean up ?
Von meinem iPhone gesendet
… Am 16.02.2020 um 16:30 schrieb Ciaran Walsh ***@***.***>:
perhaps wait until @angieradtke has finished??
If you are gonna merge this, it should probably be done before any major work. My initial reason for this PR was to clean up the atum scss before an attempt to repaint it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
|
Does anybody know why this is so complicated? |
|
Look like it is to apply both an SVG and a gradient to the background. As each use If you are removing either the SVG or gradient in your design then you can remove all this and just apply to |
|
Closing. Now 5 months behind. To much work involved to bring up to date. |
Pull Request for Issue # .
Summary of Changes
atum-bg-darkvariables combined to a singleprimaryvariableTesting Instructions
Apply this patch and run
node build.js --compile-cssandnode build.js --compile-jsto update the changed SCSS and JS. Alternatively, you can run npm i.Navigate to admin template style settings. Check color options. General color check across template.
Documentation Changes Required