User tests: Successful: Unsuccessful:
Pull Request for Issue # .
Just a custom element that creates a spinning logo.
Apply this patch.
Make sure Custom Fields are enabled.
Try to edit an article and change the category
Boom...
Enjoy the infinite loop...
Core.js is just a collection of helper methods, this needs to cleaned up. Eg submit button or submit form is not required unless you already have a form, the spinner is used only in 2-3 pages abut we still load all this things in every page load. This needs to be more efficient, the jQuery days (eg one library has it all) has gone.
Another issue: Custom elements in their previous iteration had encapsulated the css, meaning one http request and you had everything. When discussing CSP @wilsonge, suggested and we implemented the separation of js and css. This is wrong, once your script is in the allowed list (eg your domain) then whatever they do (if not trying to insert a script or css from another domain, which obviously is not the case here and will never be) is ok. So I'm suggesting to go back to encapsulating everything in the js file as we did before.
Yes, although I haven't changed the core.js function this needs to be done and would NOT be B/C because even if we add a simple creator for the element there is another B/C break: you need to manually include the loader element in every page you might want to display it...
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Templates (admin) JavaScript Repository |
Labels |
Added:
?
?
|
There are some additional things to consider here for accessibility
WCAG 2.1 introduces Success Criterion 2.2.9 Animation from Interactions (level AAA), it should be possible to disable the animation. Safari and ios have options that a user can set for this and we can support this with a media query for example.
When I checked with external accessibility experts last week they said the current css throbber was ok but I strongly suspect this heart version will not be
@brianteeman can be patched to meet those requirements
@C-Lodder I don't actually agree, I mean the page is semi transparent and there is a beating thing for me this is a sign that something is happening/loading
I prefer the spinner/throbber as there is more change happening more frequently than with this one especially if it is only on screen for a short time.
as for the accessibility issue the fix would stop it being anything other than a static logo
I prefer the spinner/throbber
I'm not a css magician so ask someone with basic svg animation knowledge to create a codepen with this and then I can change it. Or encode base64 the gif and use that again (not really a 2018 approach)
I'm mocking up some stuff on Codepen as we speak
For reference the media query is something like
+@media screen and (prefers-reduced-motion: reduce) {
+ .progress__bar {
+ -webkit-animation: none;
+ -moz-animation: none;
+ /**
+ * Some browses do to recognise transition: none, so using
+ * transition-duration instead.
+ */
+ -webkit-transition: none;
+ -o-transition: all 0 none;
+ transition: none;
+ }
Right, here's an updated loading icon based on what Dimitris did:
https://codepen.io/anon/pen/XZawzp
@brianteeman Seeing as J4 isn't supporting AAA, is this media query even needed?
While it might not officially support it there is no harm in doing things right ;)
Drupal isnt supporting AAA but they did it - i helped test it (thats how I even knew about it)
Eg submit button or submit form is not required unless you already have a form, the spinner is used only in 2-3 pages abut we still load all this things in every page load. This needs to be more efficient, the jQuery days (eg one library has it all) has gone.
Splitting the thing has also a drawback: you need to keep in the head what the file you need to connect on every page.
Eg submit button or submit form is not required unless you already have a form,
In the backend we have a form on every page, that why submit form in the core.js, and it not a heavy code.
Think about the core.js as an entry point to Joomla! front-end API, not as about jQuery
I think, submit form, JText, scriptOptions, Events, request, extend, renderMessages, and WebComponents should stay in the core.js (if I did not missed something), all else, can be moved somewhere (if people want it).
all else, can be moved somewhere
That was the idea, make another helper and since somehow we're gonna get ES6 code in the repo this can also then combined back to core.js for the old timers...
Category | Administration Templates (admin) JavaScript Repository | ⇒ | Administration com_associations com_categories Templates (admin) JavaScript Repository Installation |
Category | Administration Templates (admin) JavaScript Repository com_associations com_categories Installation | ⇒ | Administration com_associations com_categories JavaScript Repository Installation |
Can you make Hound happy please
Title |
|
Labels |
Removed:
?
|
Category | Administration JavaScript Repository com_associations com_categories Installation | ⇒ | Administration com_associations com_categories com_fields JavaScript Repository Installation |
Category | Administration JavaScript Repository com_associations com_categories Installation com_fields | ⇒ | Administration com_associations com_categories com_fields Templates (admin) JavaScript Repository Installation |
Guess you need to clean up the pr as there are permissions and mail test files touched here.
@laoneo this PR actually does 2 things:
The only reason that these 2 are combined is that the actual build script was needed to change to allow the css encapsulation and as a side effect all the custom elements with css were affected. I don't know if it would make any sense to try to separate those tasks, there are pretty much correlated...
for reference BS have now added support for disabling the animation in some places.
@brianteeman FYI this spinner also supports disabling animations if UA advertises it (it works in safari, I've checked it
Ok, than it is a different story. I'm more the friend of isolated pr's and doing one thing in one pr. But if you say this is connected then we leave it.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-15 10:53:49 |
Closed_By | ⇒ | dgrammatiko |
Definitely for making this a custom element, how I dont not agree with the logo/heart transition. It does not signify a loading state at all. My preference would be a CS version of the current GIF we use