?
avatar brianteeman
brianteeman
17 Aug 2020

Steps to reproduce the issue

You can see this for example after applying a patch with com_patchtester

image

Expected result

Something much neater perhaps like
image

avatar brianteeman brianteeman - open - 17 Aug 2020
avatar joomla-cms-bot joomla-cms-bot - change - 17 Aug 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Aug 2020
avatar infograf768
infograf768 - comment - 17 Aug 2020

Not sure we can do as the title can be quite different form one language to the other.

avatar Quy
Quy - comment - 17 Aug 2020

or use icons?

avatar brianteeman
brianteeman - comment - 17 Aug 2020

sure it can be done by setting the width of the alert-heading

avatar chmst
chmst - comment - 29 Aug 2020

I like the idea of having same width and use icons, the text as sr-only.


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

avatar infograf768
infograf768 - comment - 29 Aug 2020

sure it can be done by setting the width of the alert-heading

Some words in some languages are 14-15 (maybe more did not look all possibilities) letters for "Warning" in English which is 7 letters. Russian "предупреждение" is 14 letters. French "Avertissement" is 13, etc.
It would require at least width: 11rem; and we could get rid of

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: center;

Example
Screen Shot 2020-08-29 at 11 02 52

This will give something like this in English

Screen Shot 2020-08-29 at 11 04 12

and in Traditional Chinese
Screen Shot 2020-08-29 at 11 05 13

Therefore it would work, although increasing the heading width in an important way for languages using only short words.
Note: when reducing window size to mobile, using 11rem as width is not enough to keep same size when multiple messages. We would need at least 15rem. I ignore why without further research.

BUT we do have indeed an issue in the present setting for Chinese for example or any language using separate glyphs. Glyphs are displayed vertically as they are separate.

Screen Shot 2020-08-29 at 11 10 25

That is a bug imho.

Therefore why not icons indeed if we agree on which ones to use and test also with Monochrome

For example something like (or variants to fit with with background colors/greys and keep contrast)

Error

Screen Shot 2020-08-29 at 10 41 52

Warning

Screen Shot 2020-08-29 at 10 40 30

Message

Screen Shot 2020-08-29 at 10 46 52

Info

Screen Shot 2020-08-29 at 10 39 48

avatar infograf768
infograf768 - comment - 29 Aug 2020

Remains to find a way to modify the js to use icons and sr-only when the layout is not used.
We have now

if (typeof title !== 'undefined') {
        titleWrapper = document.createElement('div');
        titleWrapper.className = 'alert-heading';
        titleWrapper.innerHTML = Joomla.Text._(type) ? Joomla.Text._(type) : type;
        messagesBox.appendChild(titleWrapper);
      }

In the layout it is easier
I can get for example
Screen Shot 2020-08-29 at 11 55 25

with code produced
Screen Shot 2020-08-29 at 12 03 11

avatar infograf768
infograf768 - comment - 30 Aug 2020

Please test #30516
Closing as we have a patch

avatar infograf768 infograf768 - change - 30 Aug 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-08-30 07:41:35
Closed_By infograf768
avatar infograf768 infograf768 - close - 30 Aug 2020

Add a Comment

Login with GitHub to post a comment