? ? Success

User tests: Successful: Unsuccessful:

avatar AndySDH
AndySDH
30 Apr 2020

Pull Request for Issue #28883, see that for code details.

Summary of Changes

This fixes the Date of Birth field in User Profile Edit Form that generates a broken html.

The issue is to due the extra info about the date format being added with broken html around it.

Previous result

The previous "hacky" HTML creates an extra control-group, and the actual "controls" is outside of it, so two problems for the price of one.

The goal was to put the info language string on a separate line but I don't think that is worth breaking the HTML structure of the form.

New result

Now the info sits near the label and doesn't break the HTML of the control-group. It does occupy a bit more space (with the default layout) but at least the HTML is correct.

Testing Instructions

Simply see the HTML of the edit form of a user profile page with a DOB field enabled.

Documentation Changes Required

None

avatar AndySDH AndySDH - open - 30 Apr 2020
avatar AndySDH AndySDH - change - 30 Apr 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Apr 2020
Category Layout Front End Plugins
avatar Quy
Quy - comment - 30 Apr 2020

I have tested this item successfully on 5c4aa86


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

avatar Quy Quy - test_item - 30 Apr 2020 - Tested successfully
avatar AndySDH AndySDH - change - 30 Apr 2020
The description was changed
avatar AndySDH AndySDH - edited - 30 Apr 2020
avatar infograf768
infograf768 - comment - 1 May 2020

Although the PR works as intended, I am not sure we should merge it, given the readability results. Screenshots back-end/frontend below.

BEFORE

Screen Shot 2020-05-01 at 08 10 50

Screen Shot 2020-05-01 at 08 10 38

AFTER

Screen Shot 2020-05-01 at 08 09 51

Also Frontend date format is right aligned...
Screen Shot 2020-05-01 at 08 09 35

avatar AndySDH
AndySDH - comment - 1 May 2020

@infograf768 I understand, but at least with this PR the HTML structure is semantically correct.

The current solution is not acceptable either, with a random empty control-group being output, and a controls that sits outside of it.

image

If you a better idea to fix it, please do so...

Maybe by modifying this file in another way?
5c4aa86

The ideal scenario is that, instead of outputting the info tooltip inside the control-label, it should be output inside the controls (input), possibly under it, and that would solve the problem, displaying the info in a new line, without breaking the html.

avatar jwaisner
jwaisner - comment - 1 May 2020

I agree with @infograf768 . If we can avoid breaking something as the result of the PR we will be better off and that is the goal of the PRs. Fix issues and not create them.

I wish I understood how to resolve but I do not.

avatar Formatio-hippocampi Formatio-hippocampi - test_item - 8 Sep 2020 - Tested successfully
avatar ghost
ghost - comment - 8 Sep 2020

I have tested this item successfully on 5c4aa86


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

avatar Quy Quy - change - 8 Sep 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 8 Sep 2020

RTC


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

avatar infograf768
infograf768 - comment - 8 Sep 2020

Sorry, but I disagree with this PR.
I prefer readability to a semantically "pure" html.

avatar HLeithner
HLeithner - comment - 19 Sep 2020

Dump question do we need this text at all? Can't we use a placeholder (YYYY-MM-DD) or reduce the text to "Format: YYYY-MM-DD"

Don't we have tooltips for such help?

avatar AndySDH
AndySDH - comment - 20 Sep 2020

@HLeithner Not a dumb question at all.

This is actually what I've done on my sites too:

image

avatar infograf768
infograf768 - comment - 20 Sep 2020

We could indeed modify the string.
In en-GB

; Adapt the following string to the format you entered in the 'DATE_FORMAT_CALENDAR_DATE'
PLG_USER_PROFILE_SPACER_DOB="Format: Year-Month-Day.<br /> ie 0000-00-00"

in French

; Adapt the following string to the format you entered in the 'DATE_FORMAT_CALENDAR_DATE'
PLG_USER_PROFILE_SPACER_DOB="Format : jour-mois-année.<br />Exemple 05-11-1992"

Screen Shot 2020-09-20 at 18 02 44

Screen Shot 2020-09-20 at 18 01 46

Screen Shot 2020-09-20 at 17 59 51

avatar HLeithner
HLeithner - comment - 20 Sep 2020

Din't we have a description text for such things?

avatar infograf768
infograf768 - comment - 21 Sep 2020

If I remember well info was chosen instead of description in order to display a long piece of information. Was ages ago...
I would not change this now for B/C reasons (older lang packs).

code is specifying this aspect:
// Closing the opening .control-group and .control-label div so we can add our info text on own line

avatar AndySDH
AndySDH - comment - 21 Sep 2020

So what to do?

avatar HLeithner
HLeithner - comment - 21 Sep 2020

Is this addressed in j4?

avatar Quy Quy - change - 6 Oct 2020
Status Ready to Commit Pending
avatar zero-24 zero-24 - change - 12 Jun 2022
Labels Added: ? ?
Removed: ?
avatar zero-24
zero-24 - comment - 12 Jun 2022

So what to do?

please do a new PR against 4.2 changing the place holder. In that case we might should also be able to use the laguage string for that format as provided by the TTs?

avatar zero-24 zero-24 - change - 12 Jun 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-06-12 17:47:07
Closed_By zero-24
avatar zero-24 zero-24 - close - 12 Jun 2022
avatar richard67
richard67 - comment - 12 Jun 2022

please do a new PR against 4.2 changing the place holder. In that case we might should also be able to use the laguage string for that format as provided by the TTs?

@zero-24 Should the issue #28883 be re-opened as long as this hasn't happened yet?

avatar AndySDH
AndySDH - comment - 14 Jun 2022

See PR for 4.2: #38057

Add a Comment

Login with GitHub to post a comment