Closed Bug 1127857 Opened 9 years ago Closed 9 years ago

We should have 2 different thresholds for the minimum font size

Categories

(Firefox OS Graveyard :: Gaia::Components, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.2 fixed, b2g-master fixed)

RESOLVED FIXED
2.2 S6 (20feb)
Tracking Status
b2g-v2.2 --- fixed
b2g-master --- fixed

People

(Reporter: julienw, Assigned: julienw)

References

Details

(Whiteboard: [sms-sprint-2.2S5])

Attachments

(2 files)

Currently, we have the same minimum font size for centered header and uncentered header.

Before the patch in Bug 1112131 we were having a centered header only when the text was fitting with the maximum font size. If the text didn't fit we were falling back to an uncentered header, and here we were reducing the font size to make the text fit in the available space if necessary.

After the patch, we try to reduce the font size to make the text fit centered. However we should not reduce the font size too much, and we should fall back to an uncentered header quicky. That means we should have a different minimum font size threshold whether the header is centered or not.
Asking for blocking status because after bug 1112131 some headers are just too small. (please note that bug 1112131 has not landed yet).

I'll attach some screenshots soon.
Blocks: 1112131
blocking-b2g: --- → 2.2?
Attached image before-after.png
On the left you see the situation before the patch from bug 1112131, while on the right you see the situation after the patch from bug 1112131.

For the top example I think it's ok, the last example I think it's too small, the 2nd example I'm not sure.

I'm not sure that the last example is the smallest font, I think we can have a smaller font.
NI UX for providing thresholds -- or to say we should go back at the previous behavior, which is like having min font size = max font size for the centered text.
Flags: needinfo?(firefoxos-ux-bugzilla)
(Note that I didn't use the right fonts in my examples, please don't pay attention to this :) )
Clearing the ni? based on the last comment. :)
Flags: needinfo?(firefoxos-ux-bugzilla)
Stephany, I meant, please don't pay attention that I didn't add the right fonts, and only pay attention to the font sizes.

(because it was quite long to create these screenshots and I didn't want to redo them when I noticed my error)

We'd need some guidance about the minimum font size for the centered header.
Flags: needinfo?(firefoxos-ux-bugzilla)
Sorry for the misunderstanding! Flagging Przemek on the font question.
Flags: needinfo?(firefoxos-ux-bugzilla) → needinfo?(pabratowski)
The header font size reduction was intended to go from 23px down to 18px.
Flags: needinfo?(pabratowski)
Hi Przemek,

Sorry to bother you, I just want to know if you fully read my question in comment 0 and looked at the screenshots from attachment 8557131 [details].

The font size reduction algorithm is still here, _but_ it's also applied for centered headers, while it was applied for uncentered headers before. I think it's nice to use the algorithm for centered headers, but that the min font size should be higher for centered headers.

That's the purpose of my question here.

Thanks !
Flags: needinfo?(pabratowski)
Let's try 20px for this specific case.
Flags: needinfo?(pabratowski)
Taking because Wilson is busy this week.
Assignee: nobody → felash
Attached file Github PR
hey Wilson,

I adjusted the min/max font-size according to comment 8 and 10.

Tell me what you think :)
Attachment #8559143 - Flags: review?(wilsonpage)
Whiteboard: [sms-sprint-2.2S5]
Comment on attachment 8559143 [details] [review]
Github PR

Looks nice, thanks for taking this. One nit in Github comment. I'm aware that this may need some tweaking if we find cases that don't look quite right, but at least we have the logic in place now :)
Attachment #8559143 - Flags: review?(wilsonpage) → review+
NI Wilson to have a final answer on the PR :)

After I land this I'll do the PR to land the "full" gaia-header to gaia and close all related bugs.
Flags: needinfo?(wilsonpage)
Target Milestone: --- → 2.2 S6 (20feb)
blocking-b2g: 2.2? → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: