? NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
15 Sep 2020

Summary of Changes

Displaying the list of contacts in a table, using a similar default display as List Articles in a Category menu item

Testing Instructions

Create a Contact Category.
Create contacts, some with parameters, some without.
Also test Unpublishing a contact, Setting published up the future, Settings publish down to a date in the past, Trash contact
Create a List Contacts in a Category menu item.
Display this menu item in frontend.

Actual result BEFORE applying this Pull Request

listcontacts_before

Expected result AFTER applying this Pull Request

listcontacts

When using custom field after title
Screen Shot 2020-09-15 at 17 47 17

Documentation Changes Required

Maybe, because of the new placing of the events.

avatar infograf768 infograf768 - open - 15 Sep 2020
avatar infograf768 infograf768 - change - 15 Sep 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 15 Sep 2020
Category Front End com_contact Language & Strings
avatar brianteeman
brianteeman - comment - 15 Sep 2020

Could you please look at how the tables in the admin list view are created so that this new table is also accessible

avatar infograf768
infograf768 - comment - 15 Sep 2020

Could you please look at how the tables in the admin list view are created so that this new table is also accessible

I am not a specialist of accessibility.
This PR is based on the List Articles in a Category display, thus why it may miss that aspect.

Do you mean adding scope="row", scope="col"? What else?

also a caption like ?

						<caption id="captionTable" class="sr-only">
							<?php echo Text::_('COM_CONTACT_TABLE_CAPTION'); ?>,
							<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
							<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>
						</caption>
avatar brianteeman
brianteeman - comment - 15 Sep 2020

Its not about being a specialist its just about following the good examples and ignoring the bad example ;)

adding scope and caption
reviewing useless headers and if necessary removing id

avatar infograf768
infograf768 - comment - 15 Sep 2020

I welcome a PR to my branch as It would be easier this way.

avatar Formatio-hippocampi Formatio-hippocampi - test_item - 16 Sep 2020 - Tested successfully
avatar Formatio-hippocampi
Formatio-hippocampi - comment - 16 Sep 2020

I have tested this item successfully on 4192e52


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

595f907 16 Sep 2020 avatar infograf768 a11y
avatar infograf768 infograf768 - change - 16 Sep 2020
Labels Added: ? ?
avatar infograf768
infograf768 - comment - 16 Sep 2020

Corrections done for a11y (as much as I did know).
Left some ids as I have no idea if they are or not useful.
Did not add under caption

<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>

Because we do not use searchtools.sort here but grid.sort.

Corrected also alpha sorting for Title as it was a bad copy paste.

avatar Formatio-hippocampi Formatio-hippocampi - test_item - 16 Sep 2020 - Tested unsuccessfully
avatar Formatio-hippocampi
Formatio-hippocampi - comment - 16 Sep 2020

I have tested this item ? unsuccessfully on 595f907

com_field-Label and Value have same style.

Screenshot_2020-09-16 Category


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30648.
avatar infograf768
infograf768 - comment - 16 Sep 2020

@Formatio-hippocampi
This is due to the change from td to th to mimic admin table in:
<th scope="row" class="list-title">

I am not sure this should have been done. If it should we can solve by a css modification. If not I can modify back.
@brianteeman
@zwiastunsw

avatar joomla-cms-bot joomla-cms-bot - change - 16 Sep 2020
Category Front End com_contact Language & Strings Front End com_contact Language & Strings Templates (site) NPM Change
avatar infograf768
infograf768 - comment - 16 Sep 2020

@Formatio-hippocampi
I added a css for <dd>

can you test again? Needs npm to test.

avatar Formatio-hippocampi
Formatio-hippocampi - comment - 16 Sep 2020

test only by Patchtester.

avatar hans2103
hans2103 - comment - 17 Sep 2020

Tested, didn't run npm run build:css.
On my screenshot there is no need to add the css change for <dd>.
Schermafbeelding 2020-09-17 om 09 54 30

Schermafbeelding 2020-09-17 om 09 54 09

To prevent the first column to stretch you might consider the following css:

.list-title {
    white-space: nowrap;
    width: 1%;

    vertical-align: top;
}

Schermafbeelding 2020-09-17 om 10 00 49

I see that the Details are just rendered with a <br/>
Is it an idea toe render them in a list <dl> or <ul>?

avatar infograf768
infograf768 - comment - 17 Sep 2020

@hans2103
Indeed no need for dd new css for Details because Details are displayed via <td> and not <th>
<th> is only used for the title and there one needs the new css. The custom field is rendered after title.

The main question here is
Do we need a <th> or not for title?
Is the Caption enough

				<caption id="captionTable" class="sr-only">
					<?php echo Text::_('COM_CONTACT_TABLE_CAPTION'); ?>,
				</caption>

as we can't use

<span id="orderedBy"><?php echo Text::_('JGLOBAL_SORTED_BY'); ?> </span>,
<span id="filteredBy"><?php echo Text::_('JGLOBAL_FILTERED_BY'); ?></span>

using br or ul/li is not the main matter. We can do both.
Will test

.list-title {
    white-space: nowrap;
    width: 1%;

    vertical-align: top;
}
avatar hans2103
hans2103 - comment - 17 Sep 2020

We do need the th element in the rows.
The name of each contact can be seen as a header.
see: https://www.w3.org/WAI/tutorials/tables/two-headers/

avatar hans2103
hans2103 - comment - 17 Sep 2020

The caption element indicates the title of the table. That one is needed too.
(actually for all tables in Joomla)

avatar hans2103
hans2103 - comment - 17 Sep 2020

It would be great if <span id="orderedBy and <span id="filteredBy could be added to the <caption> too. But that is out of scope for this PR. Frontend is using grid.sort while backend uses searchtools.sort. A new PR should be added to find a way to change the innerHTML using grid.sort.

avatar hans2103
hans2103 - comment - 17 Sep 2020

The PR is a11y fine if we assume backend similar tables are fine.

avatar infograf768
infograf768 - comment - 17 Sep 2020

as .list-title is also used for newsfeeds and tags, in a weird way, I prefer not touch at that now. It would be for another PR where all occurences are taken care of.

avatar infograf768 infograf768 - change - 17 Sep 2020
Labels Added: NPM Resource Changed
avatar infograf768
infograf768 - comment - 17 Sep 2020

OK, after this small change for the dd css, it looks that this PR is OK to go.
remains, for future PRs, to deal with

  1. grid.sort
  2. .list-title or other depending on future modifications for articles, newsfeeds, tags category display in frontend.
avatar hans2103 hans2103 - test_item - 17 Sep 2020 - Tested successfully
avatar hans2103
hans2103 - comment - 17 Sep 2020

I have tested this item successfully on 7214004


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

avatar BertaOctech BertaOctech - test_item - 17 Sep 2020 - Tested successfully
avatar BertaOctech
BertaOctech - comment - 17 Sep 2020

I have tested this item successfully on 7214004

For me it worked as described.


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

avatar infograf768 infograf768 - change - 18 Sep 2020
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 18 Sep 2020

RTC. Thanks for testing.


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

avatar rdeutz rdeutz - change - 18 Sep 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-09-18 10:01:02
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 18 Sep 2020
avatar rdeutz rdeutz - merge - 18 Sep 2020

Add a Comment

Login with GitHub to post a comment