User tests: Successful: Unsuccessful:
Pull Request for Issue #29411 .
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.
Access the backend interface with any modern browser that defaults to a base font size of 16px.
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%.
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 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.
The translation string COM_USERS_USER_FIELD_BACKEND_FONTSIZE_LABEL
was added to the backend com_users.ini
file.
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.
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.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_users Language & Strings Templates (admin) |
@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:
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.
No objection just raising awareness
@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.
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.
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.
@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.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-08-22 14:02:00 |
Closed_By | ⇒ | nikosdion | |
Labels |
Added:
?
?
|
@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.
No, it's not you, Richard. I just honestly don't have time for bikeshedding. Sorry.
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!
Worth reading this https://css-tricks.com/accessible-font-sizing-explained/