Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Quickicon improvements #362

Merged
merged 27 commits into from
Jul 15, 2019
Merged

Quickicon improvements #362

merged 27 commits into from
Jul 15, 2019

Conversation

chmst
Copy link
Contributor

@chmst chmst commented Jul 8, 2019

Pull Request for Issue #258 .

Summary of Changes

  1. Fixed: Button MenuItems

  2. Numbers on icons can be useful and important but sometimes are useless, asdescribe in the issues.
    We have expanded module parameters so the administrator can choose if she want to see the number or only the button.

  3. If a number is displayed, both the number and component name have attribute "aria-hidden", but a sr-only text is added which gives information in a sentence.

MOD_QUICKICON_GLOBAL_CONFIGURATION="Global Configuration"
MOD_QUICKICON_GROUP_DESC="The group of this module (this value is compared with the group value used in <strong>Quick Icons</strong> plugins to inject icons). The 'mod_quickicon' group always displays the Joomla! core icons."
MOD_QUICKICON_GROUP_LABEL="Group"
MOD_QUICKICON_HEADER_ICON_LABEL="Header Icon"
MOD_QUICKICON_INSTALL_EXTENSIONS="Install Extensions"
MOD_QUICKICON_LANGUAGE_MANAGER="Languages"
MOD_QUICKICON_LOAD_PLUGINS_LABEL="Load 3rd party plugins"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plugins? do you mean extensions? Is this even used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have icons for languages and extensions. So better delete the language keys

@brianteeman
Copy link
Contributor

Made some comments inline

Someone else will have to check that the pluralisation is correct in the code to allow for languages that have more complex pluralisation rules - maybe @infograf768 can check this

@chmst
Copy link
Contributor Author

chmst commented Jul 11, 2019

The Plural forms do this:

  1. for sighted users

quickicons-singular

  1. For blind users the Screen Reader says for example:

Users: One User is activated.

Articles: No article is available

Modules: Three modules are available

Global Checkin: No Items are locked.

Cache: The Cache is empty

We have adopted this from the joomla update plugins. In case of many different plural forms we could add more strings.

@brianteeman
Copy link
Contributor

In case of many different plural forms we could add more strings.

That's the whole point - we can not. The current system used throughout joomla is that the TT add them if they need to

@bembelimen
Copy link
Contributor

@infograf768 you're right, we have to take care for the pluralism form. Do you have an JS example where this happen in Joomla!?

@infograf768
Copy link
Member

@infograf768
Copy link
Member

@chmst
Please use the normalized string constants for plural forms.
I mean adding the _N_ in the constant. For example:
COM_CATEGORIES_QUICKICON_N_SRONLY

@chmst
Copy link
Contributor Author

chmst commented Jul 13, 2019

Thank ou, @infograf768.
I did the normalization but was not successful with the RTL. Will try again when I have some spare time.

@infograf768
Copy link
Member

RTL: will test a new install of your branch and see what I can do.

@infograf768
Copy link
Member

RTL: the problem with the Cache value display is the JsonResponse.
It does not accept htmlentities in general and even if it was, this specific one should not be decoded anyway as it is a pure unicode &#x200E; = \u200E

For example if I use
$result['amount'] = json_encode('&#x200E;' . $mb);
I get the correct LTR but with the htmlentity
Screen Shot 2019-07-13 at 19 48 11

@infograf768
Copy link
Member

@chmst
RTL: found a solution in quickicon.es6.js
Change
counter.textContent = response.data.amount;
to
counter.textContent = '\u200E' + response.data.amount;

Screen Shot 2019-07-14 at 12 07 45

Same for sronly
sronly.textContent = '\u200E' + response.data.sronly;

provided that RTL TT creates a string formatted such:
COM_CACHE_QUICKICON_SRONLY= "%s حجم کش است"

Screen Shot 2019-07-14 at 12 25 45

@bembelimen bembelimen merged commit 0c52cdf into release Jul 15, 2019
@bembelimen bembelimen deleted the quickicon-improvements branch July 15, 2019 09:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants