Closed Bug 2068781 Opened 3 months ago Closed 2 months ago

Migrate address book to use new "grid-lanes" syntax instead of "masonry"

Categories

(Thunderbird :: Address Book, task)

task

Tracking

(thunderbird_esr153 unaffected, thunderbird158 unaffected)

RESOLVED FIXED
159 Branch
Tracking Status
thunderbird_esr153 --- unaffected
thunderbird158 --- unaffected

People

(Reporter: dholbert, Assigned: emilio)

References

Details

Attachments

(1 external file)

In bug 1995348, we're adding experimental support for the new CSS grid-lanes keyword, which is the new name for "masonry-style" grids.

Thunderbird uses this feature (using the old syntax) in several spots, having to do with the address-book & contact-cards:
https://searchfox.org/comm-central/rev/df8755cac96bdc606d7da2736354b0522ac0db99/mail/themes/shared/mail/aboutAddressBook.css#670
https://searchfox.org/comm-central/rev/df8755cac96bdc606d7da2736354b0522ac0db99/mail/themes/shared/mail/vcard.css#53

And Thunderbird opted in to the old feature -- which was otherwise off-by-default -- here:
https://searchfox.org/comm-central/source/mail/app/profile/all-thunderbird.js#1482

I'm filing this bug on migrating this thunderbird code to use the new grid-lanes syntax, since the masonry syntax will be un-supported at some point.

Pref flipping there exposes masonry/grid-lanes code paths to HTML email. Maybe we don't need to be too concerned about that but it would be preferable to only enable the properties Thunderbird needs in chrome.

A couple of things to note about the new behaviour:

The spec has a new tolerance concept that defaults to 1em. However, we don't yet implement that property, or the default 1em handling. The Thunderbird CSS could pre-emptively add flow-tolerance: 0 to make sure it's behaviour remains unchanged, if anyone thinks the change would be undesirable.

The spec's placement rule breaks exact ties differently from today. Currently we use the leftmost tied column. The spec says among tied columns to use the first one at or after the previous card's column, wrapping round. So in principle the order could change, although I doubt anyone is likely to care even if this were to happen.

(In reply to Jonathan Watt [:jwatt] from comment #1)

Pref flipping there exposes masonry/grid-lanes code paths to HTML email. Maybe we don't need to be too concerned about that

Not saying it's great, but also: this it the exact same situation we've been in for ages with the proof-of-concept masonry implementation, I think.

(Though I suppose one could make the case that the new grid-lanes syntax is the standardized thing, and so it's a bit more likely that we'll actually encounter it in a real HTML email, as compared to encountering the now-nonstandard masonry syntax.)

but it would be preferable to only enable the properties Thunderbird needs in chrome.

Agreed, ideally it would be good to have this turned off for web content (in Thunderbird) until it's ready to ship for web content in Firefox.

(In reply to Jonathan Watt [:jwatt] from comment #2)

A couple of things to note about the new behaviour:

The spec has a new tolerance concept that defaults to 1em. However, we don't yet implement that property, or the default 1em handling. The Thunderbird CSS could pre-emptively add flow-tolerance: 0 to make sure it's behaviour remains unchanged, if anyone thinks the change would be undesirable.

Good observation. I don't think that's necessary though; I think the default flow-tolerance behavior (when implemented) should generally be an improvement for layouts like Thunderbird's (and if we find that it's not an improvement, we should bring that to the CSSWG as a possible reason to object to that being the default).

The spec's placement rule breaks exact ties differently from today. Currently we use the leftmost tied column. The spec says among tied columns to use the first one at or after the previous card's column, wrapping round. So in principle the order could change, although I doubt anyone is likely to care even if this were to happen.

Agreed, I don't think anyone is likely to care.

See Also: → 2077170
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Attachment #9651196 - Attachment description: Bug 2068781 - Use grid-lanes rather than grid-template-columns for the address book and vcard layouts. r=mkmelin → Bug 2068781 - Use grid-lanes rather than grid-template-rows for the address book and vcard layouts. r=mkmelin

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/a8825e8d769d
Use grid-lanes rather than grid-template-rows for the address book and vcard layouts. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 159 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: