Closed Bug 1345949 Opened 3 years ago Closed 3 years ago

modal is a little too narrow, and we shouldn't mix px and em

Categories

(bugzilla.mozilla.org :: General, enhancement)

Production
enhancement
Not set

Tracking

()

VERIFIED FIXED

People

(Reporter: dylan, Assigned: dylan)

References

Details

Attachments

(1 file)

In bug 1343663 we made the comments more narrow (down from 1200px) and also switched to em. Mixing em and px is bad for getting a consistent "look" on different devices.

Meanwhile, the rest of the sizing in modal was based around a width of 1024,
with each module side taking 1/2 - a margin of that. Thus I am reverting to the original width, but still centered.
Attached patch 1345949_1.patchSplinter Review
Attachment #8845550 - Flags: review?(glob)
I've never had any problems with getting consistent looks with em and px.  One is just a multiplier of the other, but whatever.  :)

78.77em (1024px) wide is a strange width to use; it's not as if 1024px has any special meaning.  Perhaps we could make this configurable?

What exactly is the problem that you're running into?
Comment on attachment 8845550 [details] [diff] [review]
1345949_1.patch

Review of attachment 8845550 [details] [diff] [review]:
-----------------------------------------------------------------

r=glob
Attachment #8845550 - Flags: review?(glob) → review+
(In reply to April King [:April] from comment #2)
> I've never had any problems with getting consistent looks with em and px. 
> One is just a multiplier of the other, but whatever.  :)

unlike px, em is not an absolute unit - it's relative to the chosen font size (1em = ${font_size}px).
#bugzilla-body has a font size of "small", so different devices may choose different sizes, and therefore widths.

> 78.77em (1024px) wide is a strange width to use; it's not as if 1024px has
> any special meaning.  Perhaps we could make this configurable?

i think it would be a mistake to make this configurable - it would add an unwarranted amount of complexity.
(In reply to April King [:April] from comment #2)
> I've never had any problems with getting consistent looks with em and px. 
> One is just a multiplier of the other, but whatever.  :)
> 
> 78.77em (1024px) wide is a strange width to use; it's not as if 1024px has
> any special meaning.  Perhaps we could make this configurable?
> 
> What exactly is the problem that you're running into?

Mostly the number of users with names that are so long as to need truncation in the assignee field.
(and this is about the width of the main box). I think we can later move the controls to the left/right of the comment box and make it a bit smaller. 

As for the em/px thing -- this is a case where I have no strong opinion but there seems to be general support
for it: https://benfrain.com/just-use-pixels/
To be clear, right now we equate the width of comments with the width of the whole thing,
but we don't need to do that forever. 1024px is good for now, because splitting that in half is good for the modules on the top.
To git@github.com:mozilla-bteam/bmo.git
   f25ef8d..f543680  master -> master
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
happy enough with this for now.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.