? ? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
17 Jul 2021

Pull Request for many Issues originating from the tabs script

fixes:
#33229
#34492
#31583

This should be a Release Blocker

Summary of Changes

  • The logic was rewritten from scratch
  • Same funtionality
  • Better code
  • Support for dynamically added tabs
  • A11y fixes (based on the WAI-ARIA recommendations)

Changes of the source js/css can be found: joomla-projects/custom-elements#180

Testing Instructions

Test each and every form in the backend that has tabs

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Tabs View:
Screenshot 2021-07-17 at 14 06 02

Screenshot 2021-07-17 at 14 06 14

Shrink to accordion:
Screenshot 2021-07-17 at 14 07 03

Screenshot 2021-07-17 at 14 07 03

Documentation Changes Required

  • Added the recall and breakpoint attributes to the expected values for the creation of the tabs (UiTabs::)
  • The section element (the tab content) is renamed to joomla-tab-element
avatar dgrammatiko dgrammatiko - open - 17 Jul 2021
avatar dgrammatiko dgrammatiko - change - 17 Jul 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Jul 2021
Category Administration com_admin com_banners com_categories com_config com_contact com_content com_fields com_finder com_installer com_languages com_media com_menus com_modules com_newsfeeds com_plugins com_redirect com_tags com_templates com_users com_workflow
avatar dgrammatiko dgrammatiko - change - 17 Jul 2021
Labels Added: ?
avatar richard67
richard67 - comment - 17 Jul 2021

@dgrammatiko Now PHPCS is fine, but npm is failing in Drone. Could that be the same problem as with your other PR?

https://ci.joomla.org/joomla/joomla-cms/45867/1/1

npm ci --unsafe-perm
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -2
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/joomla-projects/custom-elements.git
npm ERR! enoent 
npm ERR! enoent 
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
avatar dgrammatiko
dgrammatiko - comment - 17 Jul 2021

Could that be the same problem as with your other PR?

Yes, it's exactly the same issue: the node alpine container doesn't have the git installed.
I guess this limits the testers to only the ones that can git pull, etc (pretty sure also the created packages are broken)

avatar richard67
richard67 - comment - 17 Jul 2021

I guess this limits the testers to only the ones that can git pull, etc (pretty sure also the created packages are broken)

@dgrammatiko Correct.

avatar dgrammatiko dgrammatiko - change - 17 Jul 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 17 Jul 2021
avatar Quy
Quy - comment - 17 Jul 2021

This displays quickly then disappears.

joomla-stats

avatar Quy
Quy - comment - 17 Jul 2021

Text should be left-aligned.

permissions

avatar dgrammatiko
dgrammatiko - comment - 17 Jul 2021

This displays quickly then disappears.

did you test the #34781 before? Sounds like this is comming from there

avatar Quy
Quy - comment - 17 Jul 2021

This is a clean install from the download page of this PR.

avatar dgrammatiko
dgrammatiko - comment - 17 Jul 2021

This is a clean install from the download page of this PR.

Ahh, forgot that George already merged a PR for alerts that wasn't quite ready, treat anything alerts related here as irrelevant

avatar Quy
Quy - comment - 17 Jul 2021

Permissions is selected.

global-configuration-permissions

Go to a component. No tab is selected by default.

global-configuration

avatar dgrammatiko
dgrammatiko - comment - 17 Jul 2021

@Quy should ok now
Screenshot 2021-07-17 at 20 09 02

avatar Quy
Quy - comment - 17 Jul 2021

Go to Global Configuration.
Click on one of the components.
Styling issue on the first tab.

tab-style

avatar Quy
Quy - comment - 17 Jul 2021

In mobile view, text should be left-aligned. The vertical ellipse is not visible against the blue background.

tab-mobile

avatar Quy
Quy - comment - 17 Jul 2021

Go to System > Administrator Templates > Atum Details and Files

tab-editor

tab-create-overrides

avatar dgrammatiko dgrammatiko - change - 17 Jul 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 17 Jul 2021
avatar Quy
Quy - comment - 17 Jul 2021

Edit an article.
Hover over a tab.
The label becomes bold causing words/tabs to the right of this tab to shift.

avatar Quy
Quy - comment - 17 Jul 2021

Will PR #31419 be obsolete because of this PR?

avatar dgrammatiko dgrammatiko - change - 17 Jul 2021
Labels Added: ?
avatar dgrammatiko
dgrammatiko - comment - 17 Jul 2021

The label becomes bold causing words/tabs to the right of this tab to shift.

Fixed

avatar dgrammatiko
dgrammatiko - comment - 17 Jul 2021

Will PR #31419 be obsolete because of this PR?

With the provided code (modified to use more attributes):

<?= HTMLHelper::_('uitab.startTabset', 'tabs1', ['active' => 'tabA', 'view' => 'tabs', 'orientation' => 'horizontal']) ?>
<?= HTMLHelper::_('uitab.addTab', 'tabs1', 'tabs11', 'tabs11') ?>
Horizontal tab 1

<?= HTMLHelper::_('uitab.startTabset', 'tabs2', ['active' => 'tabs21', 'view' => 'tabs', 'orientation' => 'vertical']) ?>
<?= HTMLHelper::_('uitab.addTab', 'tabs2', 'tabs21', 'tabs21') ?>
Horizontal &gt; Vertical tab 1

<?= HTMLHelper::_('uitab.startTabset', 'tabs3', ['active' => 'tabs31', 'view' => 'tabs', 'orientation' => 'horizontal']) ?>
<?= HTMLHelper::_('uitab.addTab', 'tabs3', 'tabs31', 'tabs31') ?>
Horizontal &gt; Vertical &gt; Horizontal tab 1
<?= HTMLHelper::_('uitab.endTab') ?>
<?= HTMLHelper::_('uitab.addTab', 'tabs3', 'tabs32', 'tabs32') ?>
Horizontal &gt; Vertical &gt; Horizontal tab 2
<?= HTMLHelper::_('uitab.endTab') ?>
<?= HTMLHelper::_('uitab.endTabset') ?>

<?= HTMLHelper::_('uitab.endTab') ?>

<?= HTMLHelper::_('uitab.addTab', 'tabs2', 'tabs22', 'tabs22') ?>
Horizontal &gt; Vertical tab 2
<?= HTMLHelper::_('uitab.endTab') ?>

<?= HTMLHelper::_('uitab.endTabset') ?>

<?= HTMLHelper::_('uitab.endTab') ?>

<?= HTMLHelper::_('uitab.addTab', 'tabs1', 'tabs12', 'tabs12') ?>
Horizontal tab 2
<?= HTMLHelper::_('uitab.endTab') ?>

<?= HTMLHelper::_('uitab.endTabset') ?>

I get:
Screenshot 2021-07-17 at 23 12 14

(which is the expected output)

avatar brianteeman
brianteeman - comment - 18 Jul 2021

testing the changing of permissions for an article. After each change there is the following javascript error twice

joomla-tab.min.js?0.0.44:1 
Uncaught TypeError: t.getAttribute is not a function
    at HTMLElement.removeNavs (joomla-tab.min.js?0.0.44:1)
    at joomla-tab.min.js?0.0.44:1
    at Array.map (<anonymous>)
    at HTMLElement.onMutation (joomla-tab.min.js?0.0.44:1)
avatar brianteeman brianteeman - test_item - 18 Jul 2021 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 18 Jul 2021

I have tested this item ? unsuccessfully on 4f0407c


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

avatar dgrammatiko dgrammatiko - change - 18 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 18 Jul 2021

@brianteeman was it only these console errors or there are more bugs?

btw I already pushed some fixes

avatar brianteeman
brianteeman - comment - 18 Jul 2021

Yes - I stopped at that point to do other stuff. retesting now

avatar brianteeman
brianteeman - comment - 18 Jul 2021

js issue is fixed.

there is however a css issue

before this PR
image

with this PR
image

avatar dgrammatiko dgrammatiko - change - 18 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 18 Jul 2021

there is however a css issue

@brianteeman should be ok now

avatar brianteeman
brianteeman - comment - 18 Jul 2021

confirm that the tree is fixed now.

Spotted something different not which I think is something to do with focus-visible
tabs

avatar dgrammatiko dgrammatiko - change - 18 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 18 Jul 2021

Spotted something different not which I think is something to do with focus-visible

The focus should work as expected now

avatar brianteeman
brianteeman - comment - 18 Jul 2021

The focus should work as expected now

Still needs fixing here
image

avatar Quy
Quy - comment - 18 Jul 2021

No background color on the active tab. Padding is reduced.

BEFORE PR:
34813-tinymce-before

AFTER PR:
34813-tinymce-after

avatar dgrammatiko dgrammatiko - change - 18 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 18 Jul 2021

Still needs fixing here

That was another logic, should be ok now, also fixes another bug with image editing

avatar dgrammatiko dgrammatiko - change - 18 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 18 Jul 2021

@Quy done

avatar Quy
Quy - comment - 18 Jul 2021

34821-permissions

avatar Quy
Quy - comment - 18 Jul 2021

When editing/closing an image.

34821-undefined

34821-media-js

avatar Quy
Quy - comment - 18 Jul 2021

Edit an article. See padding less with PR.

BEFORE:
34821-content-pre
34821-images-pre

AFTER:
34821-content-after
34821-images-after

avatar dgrammatiko dgrammatiko - change - 18 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 18 Jul 2021

When editing/closing an image.

Fixed.

Reviewing all the padding/margin values

avatar dgrammatiko dgrammatiko - change - 19 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko dgrammatiko - change - 22 Jul 2021
Labels Added: ?
Removed: ?
e106ee9 22 Jul 2021 avatar dgrammatiko fixes
dd3c08e 22 Jul 2021 avatar dgrammatiko CS
d508b65 22 Jul 2021 avatar dgrammatiko fixes
avatar dgrammatiko dgrammatiko - change - 23 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 23 Jul 2021

A note here for testers:

The image editing is broken here but there's a new PR for that: #34885

avatar dgrammatiko dgrammatiko - change - 23 Jul 2021
Labels Added: ?
Removed: ?
avatar Quy
Quy - comment - 23 Jul 2021

Click User Menu > Accessibility Settings
The Accessibility Settings tab is not selected.

avatar dgrammatiko dgrammatiko - change - 23 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 23 Jul 2021

The Accessibility Settings tab is not selected.

Good catch, fixed with bae7dfe

avatar Quy
Quy - comment - 23 Jul 2021

Click User Menu > Accessibility Settings
Accessibility Settings tab is selected.
Click Close button.
Click User Menu > Accessibility Settings
Tab outlined. Click anywhere on the screen to refresh/fix the outline.

Firefox:
34813-firefox

Chrome:
34813-chrome

avatar brianteeman
brianteeman - comment - 23 Jul 2021

didnt i report that before?

avatar dgrammatiko dgrammatiko - change - 23 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 23 Jul 2021

didnt i report that before?

You did and I fixed it, but I added the hash activation part that I forgot and I forgot to pass the false param.
Anyways it's fixed with cbce7b1

avatar dgrammatiko dgrammatiko - change - 23 Jul 2021
Labels Added: ?
Removed: ?
avatar Quy Quy - test_item - 23 Jul 2021 - Tested successfully
avatar Quy
Quy - comment - 23 Jul 2021

I have tested this item successfully on 8f79a32

THANK YOU!!!!


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

avatar dgrammatiko
dgrammatiko - comment - 23 Jul 2021

@Quy thank you for all the tests here ?

avatar ceford ceford - test_item - 24 Jul 2021 - Tested successfully
avatar ceford
ceford - comment - 24 Jul 2021

I have tested this item successfully on 8f79a32

Went through most of the edit form and did not find any problems.


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

avatar richard67
richard67 - comment - 24 Jul 2021

Maintainers please note that this PR should not be merged as it is. It needs to merge the corresponding upstream PR and make a new tag or release upstream and then change here to let npm use that. It will not need new tests after that if the new upstream tag or release point to the same upstream commit as used by this PR here now.

avatar dgrammatiko
dgrammatiko - comment - 24 Jul 2021

There's one more step, so, here's the whole procedure:

  • on the Custom Elements Repo the joomla-projects/custom-elements#180 needs to be merged
  • A new patch version (0.2.0) needs to be released
  • This PR needs to update the package.json and package.lock
  • The PR #34885 needs to merge immediately after (assuming that what I did there is acceptable)

But since this PR is using the commit hash no further tests will be needed if the PR joomla-projects/custom-elements#180 is merged without any changes, that was the reason I used the commit hashes here in the first place. Anyways these are @wilsonge's problems ?

avatar ceford
ceford - comment - 24 Jul 2021

Something I neglected to check: the Article edit form has 12 html validation errors.


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

avatar dgrammatiko
dgrammatiko - comment - 24 Jul 2021

Something I neglected to check: the Article edit form has 12 html validation errors.

Can you post the report here?

avatar dgrammatiko dgrammatiko - change - 24 Jul 2021
Labels Added: ?
Removed: ?
avatar ceford
ceford - comment - 24 Jul 2021

Something I neglected to check: the Article edit form has 12 html validation errors.

Can you post the report here?

It is probably best to paste the page source into the w3C validator:

https://validator.w3.org/#validate_by_input

30 Errors on the article edit page. It is not easy to copy them into a message.

avatar dgrammatiko
dgrammatiko - comment - 24 Jul 2021

@ceford you're validating as HTML5, right?
Screenshot 2021-07-24 at 14 28 10

avatar ceford
ceford - comment - 24 Jul 2021

Yes - I use the Firefox Web Developer plugin. It is just two clicks to invoke the w3c validator with default settings. I get 30 Errors for the Article edit page with no patches applied. It returns a blank page if I have Joomla debug enabled.

avatar dgrammatiko
dgrammatiko - comment - 24 Jul 2021

I get 30 Errors for the Article edit page with no patches applied

Yes, I could see also the errors but none of them is about tabs

It returns a blank page if I have Joomla debug enabled.

Probably because the page is extremely heavy with debug on (too many elements)

avatar wilsonge
wilsonge - comment - 24 Jul 2021

@dgrammatiko i've released the custom elements repo. If you could use the tagged version here then one last test by someone just to do final validation would be excellent.

avatar dgrammatiko dgrammatiko - change - 24 Jul 2021
Labels Added: ?
Removed: ?
avatar dgrammatiko
dgrammatiko - comment - 25 Jul 2021

Tests should be ok with joomla-projects/joomla-browser#219 (run fine loacally)

avatar wilsonge
wilsonge - comment - 25 Jul 2021

OK Can we have one final test of the code here now we're pulling in the stable custom elements repo and I'll get everything merged through.

avatar richard67
richard67 - comment - 25 Jul 2021

OK Can we have one final test of the code here now we're pulling in the stable custom elements repo and I'll get everything merged through.

@wilsonge And what about failing system tests?

avatar wilsonge
wilsonge - comment - 25 Jul 2021

The PR above needs to be merged according to @dgrammatiko - that would make the 4.0-dev fail if i merged that first - so i'll merge both at the same time and should be fine. I can debug further if anything else still fails.

avatar richard67
richard67 - comment - 25 Jul 2021

It's late here already and I'm tired. Maybe @Quy can test again?

avatar Quy
Quy - comment - 25 Jul 2021

Border thickness is thinner.

Before PR:
34813-before

After PR (thickness difference between first row and second row):
34813-after

34813-after-2nd-row

avatar dgrammatiko
dgrammatiko - comment - 25 Jul 2021

@Quy pixel restored

avatar Quy
Quy - comment - 26 Jul 2021

There is a large gap at the bottom of the tab.

Before PR:
34813-global-before

After PR:
34813-global-after

avatar Quy
Quy - comment - 26 Jul 2021

Fieldset left/right borders missing.

Before PR:
34813-messages-before

After PR:
34813-messages-after

avatar dgrammatiko
dgrammatiko - comment - 26 Jul 2021

@Quy should be ok now

avatar Quy Quy - test_item - 26 Jul 2021 - Tested successfully
avatar Quy
Quy - comment - 26 Jul 2021

I have tested this item successfully on c75abd1

THANK YOU AGAIN!!!


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

avatar Quy
Quy - comment - 26 Jul 2021

I don't see errors in the Console.

System > Install > Extensions > Install from Web

34813-install

avatar richard67
richard67 - comment - 26 Jul 2021
avatar dgrammatiko
dgrammatiko - comment - 26 Jul 2021

System > Install > Extensions > Install from Web

Web Installer fixed

SCSS style linter complains: https://ci.joomla.org/joomla/joomla-cms/46132/1/20

CS fixed

avatar Quy Quy - test_item - 26 Jul 2021 - Tested successfully
avatar Quy
Quy - comment - 26 Jul 2021

I have tested this item successfully on c75abd1


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

avatar wilsonge wilsonge - change - 26 Jul 2021
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-07-26 18:41:17
Closed_By wilsonge
avatar wilsonge wilsonge - close - 26 Jul 2021
avatar wilsonge wilsonge - merge - 26 Jul 2021
avatar wilsonge
wilsonge - comment - 26 Jul 2021

Thanks!

avatar dgrammatiko
dgrammatiko - comment - 26 Jul 2021

Thanks!

avatar dgrammatiko
dgrammatiko - comment - 26 Jul 2021

@wilsonge you need to merge the joomla-projects/joomla-browser#219 and also the #34885

The joomla-projects/joomla-browser#219 will fix the failing tests

Add a Comment

Login with GitHub to post a comment