? ? Pending

User tests: Successful: Unsuccessful:

avatar nikosdion
nikosdion
21 Aug 2020

Pull Request for Issue #29411 .

Summary of Changes

Adds a user option called “Backend base font size (em)“ which allows per-user base font size for the backend (Atum) template.

This option is hidden and not taken into consideration when the “Increase Font Size” in the Accessibility tab is enabled.

Testing Instructions

Access the backend interface with any modern browser that defaults to a base font size of 16px.

Actual result BEFORE applying this Pull Request

The interface looks uncomfortably big on small laptop displays, e.g. my two year old 13" ZenBook which has a default Windows (and Linux) zoom level of 120%.

Expected result AFTER applying this Pull Request

Edit the user options. Set the “Backend base font size (em)“ to 0.85. Now the backend displays more comfortably. Each column in the users list displays more than three characters at a time. Yay! I can use Joomla again.

Documentation Changes Required

Documentation for the “Backend base font size (em)“ option:

This options allows you to shrink or enlarge text by setting the base font size of the administrator template in “em“ units. Use the value 1.0 to use the base font size defined in your browser (most browsers default to 16px). Use a value lower than 1.0 to shrink the base font size. For example, 0.85 makes the text 15% smaller which is roughly the same font size used by Joomla 3 and earlier. Use a value greater than 1.0 to enlarge the text. For example, 1.5 makes the text 50% bigger which may be required by some users for accessibility reasons. This option will be hidden and has no effect when the “Increase Font Size” option in the Accessibility tab is enabled.

Translation strings

The translation string COM_USERS_USER_FIELD_BACKEND_FONTSIZE_LABEL was added to the backend com_users.ini file.

Backwards compatibility

No effect. The default setting for this option is blank which has absolutely no effect. This uses Atum's default base font size which at the time of this writing defaults to the browser's inherited font size.

While this option improves on the “Increase Font Size” option of the Accessibility tab it does not override / supersede it on purpose. Using the “Increase Font Size” option hides and effectively disables the “Backend base font size (em)“ option. Users already making use of the the aforementioned accessibility setting can continue using it without adverse effects.

Further notes

The value of this field is constrained to values between 0.1 and 8.0. The are deliberately extremely small and extremely big. I've struggled in the past with varying degrees of HiDPI support on Linux, something which may necessitate extreme values near 0.25 and 4.0 on the monitors I've worked with. I thought I'd give some more leeway in case someone has the same problem AND wants to do a presentation using a larger base font size.

avatar nikosdion nikosdion - open - 21 Aug 2020
avatar nikosdion nikosdion - change - 21 Aug 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Aug 2020
Category Administration com_users Language & Strings Templates (admin)
avatar brianteeman
brianteeman - comment - 21 Aug 2020
avatar nikosdion
nikosdion - comment - 21 Aug 2020

@brianteeman Yeah, I understand that the base font size should be something the user sets in the browser. However, most people don't know they even can, let alone where to find it. Even if they do, changing the font size breaks all other sites which use relative font sizes on the assumption that the base font size in the browser is 16px. I've been there. I had to switch my browser back.

Anyway, I don't see where your objection is. The default setting for all existing and new users is blank which falls back to the existing behaviour. The existing behaviour is the BS4 default behaviour, i.e. use the browser's base font size which is what the article says is the correct solution. Everything else in the article is not only enforcing a fixed base size, it also requires massive changes to Bootstrap 4 itself. I don't see the reason for that.

Anyway, if you guys don't want to merge this PR, please do remember that this is what I see when I install Joomla 4 and try to list the users on the site:

Στιγμιότυπο 2020-08-21, 11 37 06

If I were a user evaluating Joomla and Wordpress to decide upon which one to use for my site I'd go with the CMS that doesn't look like a clown car fell into an alphabet soup and that CMS ain't Joomla 4 at the moment.

avatar brianteeman
brianteeman - comment - 21 Aug 2020

No objection just raising awareness

avatar richard67
richard67 - comment - 21 Aug 2020

@nikosdion Woult this PR here which uses "em" fit e.g. to #30436 or to a current work in progress here joomla/cassiopeia#38 , which both use "rem"? Forgive me if it's a silly question, but I am really not a css expert. I can look up what they mean of course, "em" and "rem", but then I'm still not sure how it would work together. Am just curious.

avatar ceford
ceford - comment - 22 Aug 2020

Don't make the minimum size less than 0.25. I tried 0.1 and could not see the field up/down arrows. Don't make the maximum size bigger than 4. I tried 8 and tool bar completely covered the screen and hid the form. I had to go into the database to fix it. Is there a way to set a -Use Default- as for the other fields in this form?

I looked for this field in User Menu -> Edit Account (top right of every page) and it is not there. I also noticed that the User Menu -> Edit Account and User Menu -> Accessibility Settings lead to the same form. Something wrong there!

It works as advertised - but needs some tweeks.


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

avatar brianteeman
brianteeman - comment - 22 Aug 2020

@ceford Yes that is broken by #29251 but no one is interested in fixing it #30217 :(

avatar ceford
ceford - comment - 22 Aug 2020

On reflection, I suggest a drop-down list with values -Use default-, 0.5, 0.6, 0.7, 0.8, 0.9, 1(?), 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2, 2.5, 3, 3.5, 4.


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

avatar nikosdion
nikosdion - comment - 22 Aug 2020

@richard67 I am not a CSS expert either. The way I understand it reading this is that in this particular use case it doesn't matter. The unit rem is relative to the font size in html but I am setting the font size in html. So using either rem or em is a relative font size to the same parent, the browser's base font size. The only case where it would make sense to use rem is if I were using a CSS class which could be used out of the context of the root html element which is, obviously, not the case.

@ceford This option is a numeric value. It's not supposed to have discrete steps. In fact, discrete steps are imposing someone's arbitrary decision on what is a subjective preference. There's no reason to do this. You chose arbitrary discrete values you thought are fine. My subjective experience is that neither 0.8 nor 0.9 look correct on my monitor. I prefer 0.85. There is no technical reason to forbid that.

Also about your comments regarding the limits, you seem to conflate "it works for me" with "it must be designed in a way that works for everybody". Just because YOU found some values to work best on YOUR hardware doesn't mean it's the absolute truth. Your subjective usable range is 0.5 to 6.0. My subjective usable range is 0.25 to 4.0. I understand that neither of these ranges is correct which is why I extended them to what looks ridiculously small and unusably large to me. I am pretty sure someone DOES have a use case for values near the extremes.

To all: this has been a waste of my time. I am closing the PR. I see no point wasting 2+ hours on a PR that took 5' to author. I can make (and have made) a plugin with this trivial code as I've already said. No need to beat a dead horse, I can just publish my plugin.

avatar nikosdion nikosdion - close - 22 Aug 2020
avatar nikosdion nikosdion - change - 22 Aug 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-08-22 14:02:00
Closed_By nikosdion
Labels Added: ? ?
avatar richard67
richard67 - comment - 22 Aug 2020

@nikosdion Thanks for the explanations. I was meanwhile reading a bit docs about css size units, so sorry for having pinged you for nothing. I hope it was not (partly) my fault that you've closed this PR.

avatar nikosdion
nikosdion - comment - 22 Aug 2020

No, it's not you, Richard. I just honestly don't have time for bikeshedding. Sorry.

avatar ceford
ceford - comment - 22 Aug 2020

Even as a plugin, there is a possibility that someone will try an extreme value that immediately results in no way back to the default, and a usable site, other than editing the user record in the database. My suggestion was just a suggestion!

Add a Comment

Login with GitHub to post a comment