? NPM Resource Changed ? ? ? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
17 Jan 2021

This PR is for the release blocker #30639

image

image

Removes the legacy js and makes the links accessible etc

I have not changed the way the links are activated so you need to test in two places. The first is in the global configuration inline editing select
image

The second is in the modules option to select if the link will open the module edit in the site or admin
image

Modules

  • Site module edit
  • Admin module edit
  • Existing CSS position issues prevent the link being seen on all modules
  • Existing CSS override for the header and footer to change the colour prevents the link being seen on all modules
  • Existing CSS for the tooltip is not correct

Menus

  • Menu item edit links
    - [ ] Existing CSS position issues prevent the link being seen on all menu items (it flickers)
    - [ ] Existing CSS for the tooltip is not correct

As all the css is in a state of uncertainty regarding bs5 that can be addressed in another PR.

Any and all code optimisations welcome

fb1dec1 16 Jan 2021 avatar brianteeman aria
dec0454 17 Jan 2021 avatar brianteeman tip
d224bd5 17 Jan 2021 avatar brianteeman id
74e906d 17 Jan 2021 avatar brianteeman .
avatar brianteeman brianteeman - open - 17 Jan 2021
avatar brianteeman brianteeman - change - 17 Jan 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Jan 2021
Category Administration Language & Strings Repository NPM Change JavaScript Layout Front End Templates (site)
avatar brianteeman brianteeman - change - 17 Jan 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-01-17 11:51:00
Closed_By brianteeman
Labels Added: ? NPM Resource Changed ?
avatar brianteeman brianteeman - close - 17 Jan 2021
avatar brianteeman brianteeman - change - 17 Jan 2021
Status Closed New
Closed_Date 2021-01-17 11:51:00
Closed_By brianteeman
avatar brianteeman brianteeman - change - 17 Jan 2021
Status New Pending
avatar brianteeman brianteeman - reopen - 17 Jan 2021
avatar brianteeman brianteeman - change - 17 Jan 2021
Title
[4.0] Front end editing module and menu [a11y] [nojs]
DRAFT [4.0] Front end editing module and menu [a11y] [nojs]
avatar brianteeman brianteeman - edited - 17 Jan 2021
avatar brianteeman brianteeman - change - 17 Jan 2021
The description was changed
avatar brianteeman brianteeman - edited - 17 Jan 2021
avatar dgrammatiko
dgrammatiko - comment - 17 Jan 2021

@brianteeman is this using only css or also some BS component (tooltip, popover)?

avatar brianteeman
brianteeman - comment - 17 Jan 2021

@dgrammatiko only css - the tooltips are the same as in the admin

avatar dgrammatiko
dgrammatiko - comment - 17 Jan 2021

Noice ?

avatar chmst
chmst - comment - 18 Jan 2021

Related #30639

avatar brianteeman brianteeman - change - 18 Jan 2021
The description was changed
avatar brianteeman brianteeman - edited - 18 Jan 2021
avatar brianteeman brianteeman - change - 18 Jan 2021
Title
DRAFT [4.0] Front end editing module and menu [a11y] [nojs]
[4.0] Front end editing module and menu [a11y] [nojs]
avatar brianteeman brianteeman - edited - 18 Jan 2021
avatar brianteeman
brianteeman - comment - 18 Jan 2021

This is now ready for review
Any and all code optimisations welcome

avatar brianteeman brianteeman - change - 18 Jan 2021
The description was changed
avatar brianteeman brianteeman - edited - 18 Jan 2021
avatar dgrammatiko dgrammatiko - test_item - 19 Jan 2021 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 19 Jan 2021

I have tested this item successfully on bf2a2e8


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32070.

avatar brianteeman
brianteeman - comment - 19 Jan 2021

can someone please add the release blocker tag

avatar brianteeman brianteeman - change - 20 Jan 2021
Labels Added: ?
avatar richard67
richard67 - comment - 20 Jan 2021

As all the css is in a state of uncertainty regarding bs5 that can be addressed in another PR.

Shall we leave the issue #30639 until that has been done?

avatar richard67 richard67 - test_item - 20 Jan 2021 - Tested successfully
avatar richard67
richard67 - comment - 20 Jan 2021

I have tested this item successfully on 4ec5fec

I can confirm that the editing links and and tooltips are right and work as expected, in case od module edit for both settings "Site" and "Admin" in com_module's options, so that all remaining issues are CSS.

Especially for the dropdown menu (metismenu) of the Cassiopeia template it needs fixes, beside what is mentioned in the description of this PR.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32070.

avatar richard67 richard67 - alter_testresult - 20 Jan 2021 - dgrammatiko: Tested successfully
avatar richard67
richard67 - comment - 20 Jan 2021

Last change after @dgrammatiko 's test was only code style for a code comment, so the test is still valid. I've restored the test result in the issue tracker.

avatar richard67 richard67 - change - 20 Jan 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 20 Jan 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32070.

avatar brianteeman brianteeman - change - 20 Jan 2021
Labels Added: ?
avatar richard67 richard67 - alter_testresult - 20 Jan 2021 - dgrammatiko: Tested successfully
avatar richard67 richard67 - alter_testresult - 20 Jan 2021 - richard67: Tested successfully
avatar richard67
richard67 - comment - 20 Jan 2021

Last change again was only code style for a code comment, so previous tests and RTC status are still valid.

avatar bembelimen
bembelimen - comment - 20 Jan 2021

Just to mention, are this (I think valid) points are taken in considerations? #30639 (comment)

avatar brianteeman
brianteeman - comment - 20 Jan 2021

@bembelimen I don't see any way that the imho stupid menu editing will ever be great but at least this is accessible

avatar brianteeman
brianteeman - comment - 20 Jan 2021

The css does need a lot of work but its beyond my skillset and not something that can really be addressed until the bs5 decision is made. Both the menu and module links are not reliably rendered on many templates right now anyway as the template designers rarely take this into consideration

avatar chmst
chmst - comment - 20 Jan 2021

I am not convinced with this solution. I had it too but i gave up. My test looks like this: And some items are not accessible for the mouse ...
menuedit

avatar richard67
richard67 - comment - 20 Jan 2021

Maybe @drmenzelit can help with the CSS?

avatar chmst
chmst - comment - 20 Jan 2021

Maybe we continue the work here but as a DRAFT @brianteeman? The first step with killing the js is done.

avatar richard67 richard67 - test_item - 20 Jan 2021 - Not tested
avatar richard67
richard67 - comment - 20 Jan 2021

I have not tested this item.

It seems I haven't tested well enough with my previous test. I haven't checked accessibility with keyboard. Sorry.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32070.

avatar bembelimen
bembelimen - comment - 20 Jan 2021

@bembelimen I don't see any way that the imho stupid menu editing will ever be great but at least this is accessible

Thanks for saying that, yes that is the biggest problem.

Perhaps there is some designer out there, who could help improving the visible stuff (code looks good).

avatar richard67 richard67 - change - 20 Jan 2021
Status Ready to Commit Pending
avatar richard67
richard67 - comment - 20 Jan 2021

Back to pending.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32070.

avatar brianteeman
brianteeman - comment - 20 Jan 2021

@chmst As i stated several times the css is not correct.

It is easier if the menu link doesn't have any popover at all as I don't see the need for it but my aim was to make the current information accessible - not to remove features - but I am happy to do so.

@richard67 whats wrong with the keyboard?

Even without the menu popover there is still a css issue with the module link placement. (Not related to this PR as the problem existed without this PR)

avatar chmst
chmst - comment - 20 Jan 2021

@brianteeman ist is not about the css, iI don't care about. it is about the popovers. In the right dropdown menu the popvers block the mouse

avatar richard67
richard67 - comment - 20 Jan 2021

@richard67 whats wrong with the keyboard?

Silly me. Was reading the comment above too fast. Was about mouse, not keyboard. I just thought I haven't tested well enough.

avatar brianteeman
brianteeman - comment - 20 Jan 2021

@chmst they are positioned by css ;)

avatar brianteeman brianteeman - change - 20 Jan 2021
Labels Removed: ?
avatar brianteeman
brianteeman - comment - 20 Jan 2021

I have pushed an update which moves the popover into an aria-label. This resolves the mouse issue that @chmst refers to and yet ensure that the links are accessible with unique names

image

image

avatar brianteeman
brianteeman - comment - 20 Jan 2021

Found another bug. The code to detect a module was not correct and it didnt find the search module. I've fixed that now as well - I think there was a previous report about that

avatar dgrammatiko
dgrammatiko - comment - 20 Jan 2021

The code to detect a module was not correct and it didnt find the search module. I've fixed that now as well - I think there was a previous report about that

FWIW the code is unnecessary opinionated with the regex approach. A better approach would be to use DOMDocument to parse and find the needed elements (eg an element could be a custom element with any kind of name like some-name). But let's leave this for another PR. Just wanted to share this here

avatar chmst
chmst - comment - 20 Jan 2021

Maybe I miss something, but could you please make your right navigation module a dropdown module, please? Then the dropdown and the edit button are in clinch and it is not possible to klick the module edit button.

avatar brianteeman
brianteeman - comment - 20 Jan 2021

@dgrammatiko That's the code that was there before - I just made it work correctly

avatar brianteeman
brianteeman - comment - 20 Jan 2021

@chmst like this ??
menu

avatar dgrammatiko
dgrammatiko - comment - 20 Jan 2021

That's the code that was there before - I just made it work correctly

@brianteeman I'm not blaming or even asking for changes here. This was a footnote and mostly a reminder to myself to revisit this code once this PR get's merged

avatar chmst
chmst - comment - 20 Jan 2021

right rop - edit the module,
the edit menuItems are fine without tooltips

avatar brianteeman brianteeman - change - 20 Jan 2021
The description was changed
avatar brianteeman brianteeman - edited - 20 Jan 2021
avatar brianteeman
brianteeman - comment - 20 Jan 2021

For me the outstanding issues are

  1. The css that is placing the links on the page is wrong OR its highlighting an html error as the links for the breadcrumbs are not inside the breadcrumbs but located top right of the page
  2. The css that is placing the tooltip is wrong as its disconnected from the link
avatar chmst
chmst - comment - 20 Jan 2021

editmenu2

Maybe it can resolved with css.

avatar richard67
richard67 - comment - 20 Jan 2021

From my point of view - but that is only my personal taste maybe - the menu item edit icons would look better if there were not appended but prepended to the menu item title, so that (when LTR) both the edit icons and the titles of menu items of the same level would all be left aligned below each other.

This could also make CSS for the menu item edit icons much easier for the dropdown menus, where we have 2 different kinds of parent items, such where the menu item title is a link and the dropdown toggle is a small icon, and such where the whole menu item is the dropdown toggle because there is no link (i.e. headings and separators).

@brianteeman What do you think?

avatar brianteeman
brianteeman - comment - 20 Jan 2021

@brianteeman What do you think?

If it was just the icon then yes - but as its an icon + text then no

At the end of the day I dont see any way this will ever look nice (like language debug) but this should at least make it functional

avatar richard67
richard67 - comment - 20 Jan 2021

As it's mainly a feature used by site admins and not by normal content editors so it can be switched off, I think it doesn't need to look nice, it only has to be functional.

avatar richard67
richard67 - comment - 20 Jan 2021

If it was just the icon then yes - but as its an icon + text then no

And if we put some border around the icon and the "Edit" text so both together look like a button?

avatar brianteeman
brianteeman - comment - 20 Jan 2021

Like I did for the module edit?

avatar richard67
richard67 - comment - 20 Jan 2021

Like I did for the module edit?

I haven't tested yet, but in code it looks like what I have in mind.

avatar richard67
richard67 - comment - 20 Jan 2021

Like I did for the module edit?

I haven't tested yet, but in code it looks like what I have in mind.

Update: I've just tested. Yes, something like that, just a bit smaller.

avatar richard67
richard67 - comment - 20 Jan 2021

@brianteeman Other idea for menu item edit: Just show the icon but not the "Edit" text, i.e. make the "Edit" sr-only, and render icon and (sr-only) text before the menu item title? That would look nice, too.

Update: Or just leave away that "Edit" text at all as we already have an aria-label telling screen readers what it is.

avatar richard67
richard67 - comment - 20 Jan 2021

@brianteeman I would not call it "requested", not even "recommended", but "suggested" ;-)

Anyway, I like it:

2021-01-20_02

What do others think?

avatar richard67
richard67 - comment - 20 Jan 2021

Rest is CSS fine tuning ... maybe a bit padding between the edit icon and the menu item title for thick fingers on touch screens / mobile clients.

avatar brianteeman brianteeman - change - 20 Jan 2021
The description was changed
avatar brianteeman brianteeman - edited - 20 Jan 2021
avatar brianteeman brianteeman - change - 20 Jan 2021
The description was changed
avatar brianteeman brianteeman - edited - 20 Jan 2021
avatar brianteeman brianteeman - change - 20 Jan 2021
The description was changed
avatar brianteeman brianteeman - edited - 20 Jan 2021
avatar brianteeman brianteeman - change - 20 Jan 2021
The description was changed
avatar brianteeman brianteeman - edited - 20 Jan 2021
avatar brianteeman
brianteeman - comment - 20 Jan 2021

Fixed the display of the tooltip for the module.

No idea how to solve the positioning of the module link for the breadcrumbs etc which are showing on the far right of the page

image

avatar richard67
richard67 - comment - 20 Jan 2021

@brianteeman SCSS linter says for file templates/cassiopeia/scss/blocks/_form.scss, line 82: Expected "right" to come before "box-shadow" order/properties-order, see https://ci.joomla.org/joomla/joomla-cms/39355/1/20

avatar brianteeman
brianteeman - comment - 20 Jan 2021

I was waiting for it to finish the run

27bbec1 20 Jan 2021 avatar brianteeman lint
d5ac463 20 Jan 2021 avatar brianteeman css
avatar brianteeman
brianteeman - comment - 20 Jan 2021

new update

image

avatar richard67
richard67 - comment - 20 Jan 2021

@brianteeman I would have preferred the following SCSS:

a.jmenuedit {
  padding-right: .5rem;

  [dir="rtl"] & {
    padding-right: 0;
    padding-left: .5rem;
  }
}

That would not add a padding at the left hand side (when ltr).

But maybe that's a matter of taste.

avatar brianteeman
brianteeman - comment - 20 Jan 2021

As neither of us are frontend designers I suggest leaving it as is until they have any opinion or merge and accept that there may be future pr to tidy up the style

avatar richard67
richard67 - comment - 20 Jan 2021

As neither of us are frontend designers I suggest leaving it as is until they have any opinion or merge and accept that there may be future pr to tidy up the style

For me that's ok. Will test again later. Let's see what others say.

avatar richard67
richard67 - comment - 20 Jan 2021

A few issues are remaining, see red numbered marks in following screenshot:

  1. The padding before the menu item edit icon, see my comment above about how I would fix it.
  2. The position of the module edit button for horizontal menus, i.e. default menu layout in the header area or Cassiopeia's dropdown menu layout in the header area or at other places when horizontal orientation (module class menu-horizontal, as far as I remember).
  3. The known problem with positioning of the module edit button for the breadcrumbs module mentioned above.

2021-01-20_05

But without this PR here, there is also a problem with position of the module edit icon of horizontal menus, see red mark in following screenshot:

2021-01-20_06

And for the breadcrumbs module and the search module in the header, you don't get the icon at all (if not very lucky maybe) without the PR.

So this PR is fine for me, all remaining issues can be fixed with (S)CSS.

We only should keep track of them so they are not forgotten.

avatar richard67 richard67 - test_item - 20 Jan 2021 - Tested successfully
avatar richard67
richard67 - comment - 20 Jan 2021

I have tested this item successfully on d5ac463

Details about my test result see my previous comment.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32070.

avatar brianteeman
brianteeman - comment - 20 Jan 2021

2 and 3 are the same issue

Thanks for testing

avatar gostn gostn - test_item - 22 Jan 2021 - Tested successfully
avatar gostn
gostn - comment - 22 Jan 2021

I have tested this item successfully on d5ac463


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32070.

avatar richard67 richard67 - change - 22 Jan 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 22 Jan 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32070.

avatar infograf768
infograf768 - comment - 22 Jan 2021

RTL: dead fish.

Screen Shot 2021-01-22 at 11 36 25

avatar infograf768
infograf768 - comment - 22 Jan 2021

.btn.jmodedit
should have an RTL equivalent with left: 10px; instead of right.
Also the icon should have a padding-left: 3px;

avatar brianteeman
brianteeman - comment - 22 Jan 2021

@infograf768 is correct that this needs changing for RTL but there is no longer any point in doing that in this PR as with bootstrap 5 we will change to use -start and -end so there will be no need for the separate RTL css but I can't write that until the bs5 stuff is merged so please go ahead and merge this as is and then we can handle all the bs5 css changes later

avatar HLeithner
HLeithner - comment - 22 Jan 2021

@brianteeman can you please solve the merge conflict I expect it's from the bs5 merge

avatar brianteeman brianteeman - change - 22 Jan 2021
Labels Added: ?
avatar brianteeman
brianteeman - comment - 22 Jan 2021

@HLeithner done

avatar HLeithner HLeithner - change - 22 Jan 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-01-22 22:47:41
Closed_By HLeithner
avatar HLeithner HLeithner - close - 22 Jan 2021
avatar HLeithner HLeithner - merge - 22 Jan 2021
avatar HLeithner
HLeithner - comment - 22 Jan 2021

merged it please take care of the rtl topic if needed.

avatar brianteeman
brianteeman - comment - 22 Jan 2021

Thanks - will look at rtl first thing tomorrow

Add a Comment

Login with GitHub to post a comment