? Pending

User tests: Successful: Unsuccessful:

avatar dgt41
dgt41
14 Feb 2018

Pull Request for Issue # .

Summary of Changes

Just a custom element that creates a spinning logo.

Based on the this codePen: https://codepen.io/nightshiftc/pen/kxmrq?q=Joomla&limit=all&type=type-pens

Testing Instructions

Apply this patch.
Make sure Custom Fields are enabled.
Try to edit an article and change the category
Boom...

Enjoy the infinite loop...

Preview

joomla-loader

RFC part:

Still under discussion

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.

Resolved: we're going back to self encapsulated js files!

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.

Documentation Changes Required

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...

avatar dgt41 dgt41 - open - 14 Feb 2018
avatar dgt41 dgt41 - change - 14 Feb 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2018
Category Administration Templates (admin) JavaScript Repository
avatar dgt41 dgt41 - change - 14 Feb 2018
Labels Added: ? ?
avatar dgt41 dgt41 - change - 14 Feb 2018
The description was changed
avatar dgt41 dgt41 - edited - 14 Feb 2018
avatar C-Lodder
C-Lodder - comment - 14 Feb 2018

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

avatar brianteeman
brianteeman - comment - 14 Feb 2018

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

avatar dgt41
dgt41 - comment - 14 Feb 2018

@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

avatar brianteeman
brianteeman - comment - 14 Feb 2018

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

avatar dgt41
dgt41 - comment - 14 Feb 2018

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)

avatar C-Lodder
C-Lodder - comment - 14 Feb 2018

I'm mocking up some stuff on Codepen as we speak

avatar brianteeman
brianteeman - comment - 14 Feb 2018

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;
+  }
avatar C-Lodder
C-Lodder - comment - 14 Feb 2018

Right, here's an updated loading icon based on what Dimitris did:

https://codepen.io/anon/pen/XZawzp

  • Converted to SCSS
  • Correct colours
  • Improve animation
  • Adjust spacing between elements
avatar C-Lodder
C-Lodder - comment - 14 Feb 2018

@dgt41 - I assume the CSS is being appended as it was quicker for testing purposes and will be moved after?

avatar dgt41
dgt41 - comment - 14 Feb 2018

@C-Lodder read the description, RFC part -> another issue. We're doing it wrong!

avatar dgt41 dgt41 - change - 14 Feb 2018
The description was changed
avatar dgt41 dgt41 - edited - 14 Feb 2018
avatar C-Lodder
C-Lodder - comment - 14 Feb 2018

@brianteeman Seeing as J4 isn't supporting AAA, is this media query even needed?

avatar brianteeman
brianteeman - comment - 14 Feb 2018

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)

avatar Fedik
Fedik - comment - 14 Feb 2018

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).

avatar dgt41
dgt41 - comment - 14 Feb 2018

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...

avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2018
Category Administration Templates (admin) JavaScript Repository Administration com_associations com_categories Templates (admin) JavaScript Repository Installation
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2018
Category Administration Templates (admin) JavaScript Repository com_associations com_categories Installation Administration com_associations com_categories JavaScript Repository Installation
avatar dgt41
dgt41 - comment - 14 Feb 2018

And this is officially the first true web component in joomla! (All 3 technologies used: Custom Elements, Templates, Shadow DOM)
screen shot 2018-02-14 at 21 10 30

Also almost 1/3 of the old image size:
screen shot 2018-02-14 at 21 18 12
screen shot 2018-02-14 at 21 17 29

avatar dgt41
dgt41 - comment - 14 Feb 2018

Of course it's working on all browsers, even if they're not supporting Shadow DOM
screen shot 2018-02-14 at 21 44 55

avatar C-Lodder
C-Lodder - comment - 14 Feb 2018

Can you make Hound happy please

avatar dgt41 dgt41 - change - 15 Feb 2018
Title
[4.0][RFC] Core spinning logo
[4.0] Core spinning logo
avatar dgt41 dgt41 - edited - 15 Feb 2018
avatar dgt41 dgt41 - change - 15 Feb 2018
The description was changed
avatar dgt41 dgt41 - edited - 15 Feb 2018
avatar dgt41 dgt41 - change - 18 Feb 2018
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 18 Feb 2018
Category Administration JavaScript Repository com_associations com_categories Installation Administration com_associations com_categories com_fields JavaScript Repository Installation
1eb6de9 5 Apr 2018 avatar dgrammatiko more
avatar joomla-cms-bot joomla-cms-bot - change - 5 Apr 2018
Category Administration JavaScript Repository com_associations com_categories Installation com_fields Administration com_associations com_categories com_fields Templates (admin) JavaScript Repository Installation
avatar laoneo
laoneo - comment - 5 Apr 2018

Guess you need to clean up the pr as there are permissions and mail test files touched here.

avatar dgt41
dgt41 - comment - 5 Apr 2018

@laoneo this PR actually does 2 things:

  • replaces the spinner with the web component version
  • restores encapsulation for all the custom elements/web components, by reverting #17911

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...

avatar brianteeman
brianteeman - comment - 5 Apr 2018

for reference BS have now added support for disabling the animation in some places.

avatar dgt41
dgt41 - comment - 5 Apr 2018

@brianteeman FYI this spinner also supports disabling animations if UA advertises it (it works in safari, I've checked it ? )

avatar laoneo
laoneo - comment - 5 Apr 2018

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.

avatar dgrammatiko
dgrammatiko - comment - 15 Jul 2018

Closing here please test: #21129

avatar dgrammatiko dgrammatiko - change - 15 Jul 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-07-15 10:53:49
Closed_By dgrammatiko
avatar dgrammatiko dgrammatiko - close - 15 Jul 2018

Add a Comment

Login with GitHub to post a comment