Closed Bug 1820744 Opened 1 year ago Closed 1 year ago

Move Thunderbird front-end to modern flexbox.


(Thunderbird :: Upstream Synchronization, task)


(thunderbird_esr102 unaffected)

113 Branch
Tracking Status
thunderbird_esr102 --- unaffected


(Reporter: mkmelin, Assigned: mkmelin)


(Regressed 1 open bug)



(1 file)

+++ This bug was initially created as a clone of Bug #1820534 +++

Conversions are from

* display: -moz-box -> display: flex
* -moz-box-flex: N -> flex-grow: N; flex-shrink: N
* -moz-box-align -> align-items:
*   stretch -> stretch
*   start -> flex-start
*   center -> center
*   baseline -> baseline
*   end -> flex-end
* -moz-box-pack -> justify-content:
*   start -> flex-start
*   center -> center
*   end -> flex-end
*   justify -> space-between
* -moz-box-orient + -moz-box-direction -> flex-direction
*   vertical + normal -> column
*   vertical + reverse -> column-reverse
*   horizontal + normal -> row
*   horizontal + reverse -> row-reverse
* -moz-box-ordinal-group: N -> order: N
# display: -moz-box -> display: flex
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/display: ?-moz-box/display: flex/g" {} \;

# -moz-box-flex: N -> flex-grow: N; flex-shrink: N
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-flex: ?([0-9]+);/flex-grow: \1; flex-shrink: \1;/g" {} \;

# -moz-box-align -> align-items
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-align: start/align-items: flex-start/g" {} \;
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-align: end/align-items: flex-end/g" {} \;
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-align:/align-items:/g" {} \;

# -moz-box-pack -> justify-content:
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-pack: start/justify-content: flex-start/g" {} \;
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-pack: center/justify-content: center/g" {} \;
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-pack: end/justify-content: flex-end/g" {} \;
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-pack: justify/justify-content: space-between/g" {} \;

# -moz-box-orient + -moz-box-direction -> flex-direction
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-orient: vertical/flex-direction: column/g" {} \;
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-orient: horizontal/flex-direction: row/g" {} \;
## + one to manually fix at
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-direction: reverse;/flex-direction: row-reverse/g" {} \;

# -moz-box-ordinal-group: N -> order: N
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-ordinal-group: 0;/order: -1;/g" {} \;
find . -type f -not -path "*.hg/*" -not -path "./suite/*" -regex ".*\.\(html\|xhtml\|js\|css\)$" -exec sed -i -E "s/-moz-box-ordinal-group: ?([0-9]+);/order: \1;/g" {} \;

You also need dipsplay: -moz-inline-box -> display: inline-flex.

Also, fwiw, -moz-box-flex: N can almost always be replaced by flex: N or flex: N N, which is a bit easier to read.

Attachment #9321584 - Attachment description: WIP: Bug 1820744 - Move Thunderbird front-end to modern flexbox. r=#thunderbird-front-end-reviewers → Bug 1820744 - Move Thunderbird front-end to modern flexbox. r=#thunderbird-front-end-reviewers

Pushed by
Move Thunderbird front-end to modern flexbox. r=freaktechnik

Closed: 1 year ago
Resolution: --- → FIXED

Things still broken after the patch:

  • Today pane toggle day alignment is wrong
  • The panel subview header is massive (open any submenu in the app menu)
  • The chat conversation list action buttons are not correctly aligned
  • Chat layout was behaving weird (seems ok atm), but it's been weird since flex emulation, so needs more work anyway
  • Input sizes in chat account settings (authentication settings, default channels) is broken

I expect there's more that I didn't spot.

Blocks: 1821304
No longer blocks: 1821304
Regressions: 1821369
Regressions: 1821435
Target Milestone: --- → 112 Branch
Regressions: 1821304
Regressions: 1821630

Magnus, bug 1820534 was backed out from beta 112 - can we back out this from beta, too?
(Keep on c-c 113 only.)

Flags: needinfo?(mkmelin+mozilla)

Wayne, do you agree to backout from comm-beta 112?

Please also approve backing out the following 4 additional bugs from comm-beta:

Flags: needinfo?(vseerror)

Wayne gave approval on Matrix. I'll push the backout shortly.

Flags: needinfo?(vseerror)
Flags: needinfo?(mkmelin+mozilla)

Thanks for handling!

backed out from 112, only, that is. adjusting milestone to 113.

Regressions: 1829194
Regressions: 1831790
Regressions: 1832369
Regressions: 1836736
Regressions: 1869167
You need to log in before you can comment on or make changes to this bug.