? ? ? Pending

User tests: Successful: Unsuccessful:

avatar Scrabble96
Scrabble96
18 Sep 2020

Pull Request for Issue #30678 .

Summary of Changes

cardGrey and default chromes add the module Id to the header only with a corresponding "aria-labelledby" followed by the same mod Id, e.g. aria-labelledby="mod-16"

If the module header (title) is not shown, then neither is the id and the module outer now contains a different label. e.g. aria-label="module name".

If there was an id for all modules (it won't work where the module position in index.php says "style=none") then these ids could be used for hyperlink anchors, e.g. /mypage#mod-16

Testing Instructions

  1. Create a new new mod chrome with this code
  2. Assign that chrome to a style for a module position in the Cassiopeia template's index.php
  3. Create a module and assign it to that module position
  4. Check the html with the browser inspector with header set to both Show and Hide

There is also a NEW chrome, called noTitle.php which can be applied where it is not usual to have a title showing, e.g. the main menu or search module. This can be used as "style=noTitle" in place of "style=none" which will also allow for custom css styling if a module class is added. At the moment, module class is ignored if the style is 'none'.

Actual result BEFORE applying this Pull Request

cardGrey.php and default.php chromes only applied the mod-id to the header (title) so if the header is not shown, then neither is the mod-id.

Expected result AFTER applying this Pull Request

By using the two changed files and using the noTitle chrome instead of none, all modules will have their ids applied, which is useful for link anchors and all modules can have module class suffix applied. On the front end, there is no change to a visitor's view of the site.

Documentation Changes Required

Comments to say that:

  1. module ids can be used as anchors.
  2. all modules can be assigned a css class if style=none is changed to style=noTitle
avatar Scrabble96 Scrabble96 - open - 18 Sep 2020
avatar Scrabble96 Scrabble96 - change - 18 Sep 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Sep 2020
Category Front End Templates (site)
avatar Scrabble96 Scrabble96 - change - 19 Sep 2020
Labels Added: ? ? ?
avatar chmst
chmst - comment - 19 Sep 2020

@Scrabble96 I have labelled your PR with two labels and we will take it with priority in the Template working group.

As I see that you are new to github and the whole process, may I explain?

Reviewers can see violations of the coding standard, for example spaces where the rules require a tab, then the reviewer can edit your code on github and make a suggestion.
If you see a suggestion of a reviewer, the simplest way is, to accept it.
If you accept, your code is changed and you find can click ont "Resolve conversation". Then the small dialogue is closed.
Now the code is changed in github but not yet in your local repo.
So you have to pull these changes into your own repo.

Reviewers also can write comments if something is not clear as the comments of @SharkyKZ. This means that you should check your code - and in general you will accept the comment and change your code on your own repo. You then can commit your changes and push them.
If this is done, the recommendation or question of the reviewer is resolved and you close the dialogue (resolve conversation).
Or, if you think that the reviewer is wrong, of course you can answer and add your arguments.

I hope this helps - starting in github is a challenge. You can ping me, if you want, with a mention: write @chmst and I get an e-mail.

avatar Scrabble96 Scrabble96 - change - 19 Sep 2020
Labels Added: ?
Removed: ?
avatar Scrabble96
Scrabble96 - comment - 19 Sep 2020

@Scrabble96 I have labelled your PR with two labels and we will take it with priority in the Template working group.

Reviewers also can write comments if something is not clear as the comments of @SharkyKZ. This means that you should check your code - and in general you will accept the comment and change your code on your own repo. You then can commit your changes and push them.

I made a change to cardGrey.php in this branch and committed the changes, but they don't seem to be showing up here. How do I add it to this PR?

I see it says 'Pending - Build is running'. Can that be stopped? If the change to cardGrey.php is ok I need to change the other two files as well.

I hope this helps - starting in github is a challenge. You can ping me, if you want, with a mention: write @chmst and I get an e-mail.

Many thanks. I may well ping you at some point.

avatar chmst
chmst - comment - 19 Sep 2020

I made a change to cardGrey.php in this branch and committed the changes, but they don't seem to be showing up here. How do I add it to this PR?

You must then push your commit into the repo. Commit is only locally - it is useful, as you can commit every step of development and add a comment what has been done. Then you push it and it is transferred.

I see it says 'Pending - Build is running'. Can that be stopped? If the change to cardGrey.php is ok I need to change the other two files as well.

These automatic tests cannot be stopped, they need their time (Joomla is huge).

avatar Scrabble96
Scrabble96 - comment - 19 Sep 2020

You must then push your commit into the repo. Commit is only locally - it is useful, as you can commit every step of development and add a comment what has been done. Then you push it and it is transferred.

Push? I am using github online, not locally. I can't work out GitHub desktop.

avatar Scrabble96 Scrabble96 - change - 19 Sep 2020
Labels Added: ?
Removed: ?
avatar Scrabble96
Scrabble96 - comment - 21 Sep 2020

Sorry, but I can't make head nor tail of how to push new commits into this PR. I have installed git (git bash?) for Windows 10 and Github desktop. I notice it says at the top that I want to merge 11 commits. But I only made 3 changes, so I don't know what the other 8 are.

I might be easier if I delete this PR and just start again with the correct code.

Any other suggestions? Humble thanks

avatar richard67
richard67 - comment - 21 Sep 2020

I might be easier if I delete this PR and just start again with the correct code.

If that is easier for you then do so.

But make sure your 4.0-dev branch is up to date with the 4.0-dev branch of the CMS and does not contain any other changes. Then when creating the new branch for the new PR, make sure it is created based on the 4.0-dev branch. This can be done in GitHub desktop by first selecting the 4.0-dev branch as current branch, then creating a new branch, and then select the current 4.0-dev branch and not staging in the choice for the base branch of that new branch.

avatar Scrabble96
Scrabble96 - comment - 21 Sep 2020

I've just found git bash on my desktop, which I see is different from git

But all the tutorials I can find only show how to commit to my branch on my own repo only but not how to push them to this PR.

avatar Scrabble96
Scrabble96 - comment - 21 Sep 2020

Closing this PR to start again.

avatar Scrabble96 Scrabble96 - change - 21 Sep 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-09-21 10:42:54
Closed_By Scrabble96
Labels Added: ?
Removed: ?
avatar Scrabble96 Scrabble96 - close - 21 Sep 2020

Add a Comment

Login with GitHub to post a comment