Closed Bug 1684581 Opened 3 years ago Closed 3 years ago

Calendar views not resizing correctly

Categories

(Calendar :: Calendar Frontend, defect)

defect

Tracking

(thunderbird_esr78+ fixed)

RESOLVED FIXED
86 Branch
Tracking Status
thunderbird_esr78 + fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

References

(Regression)

Details

Attachments

(3 files)

I've had the week view open lately (instead of multi-week) and I noticed that when starting Thunderbird with the calendar tab selected it doesn't lay out correctly straight away. Investigating this I noticed it doesn't take any notice of the window size changing.

Once I fixed that I noticed that when onResize runs on all of the views in most cases, which is pointless for views that aren't visible because onResize is called when the view changes.

I also noticed that toggling the unifinder doesn't cause the views to lay out.

Simplifies the "viewresized" event. Fires the event when the unifinder size changes. Only runs onResized() on the current view.

Target Milestone: --- → 86 Branch

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/dade8e2a6fab
Fix and tidy up resizing of calendar views. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

I think this is causing the bct1 failures "TEST-UNEXPECTED-FAIL | comm/mail/base/test/performance/browser_preferences_usage.js | intl.regional_prefs.use_os_locales should be accessed at most 120 times. - 134 <= 120 - JS frame :: chrome://mochitests/content/browser/comm/mail/base/test/performance/browser_preferences_usage.js :: checkPrefGetters :: line 63"

... due to more access after the fix.

You're right, but why? Investigating…

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

If the calendar tab is not shown, or a viewresize event happens but the current view is still the same size, we can avoid doing any layout calculation.

This fixes the failing test but still performs the layout operation when the calendar tab becomes selected.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/85c460d4e446
follow-up - Avoid resizing calendar views where possible. r=mkmelin

Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED

[Approval Request Comment]
User impact if declined: calendar views aren't expanded/contracted to fit the space available in some situations
Testing completed (on c-c, etc.): in beta 86
Risk to taking this patch (and alternatives if risky): I don't think so

(This rebased patch and the follow-up which doesn't need rebasing.)

Attachment #9205349 - Flags: approval-comm-esr78?

Comment on attachment 9205349 [details] [diff] [review]
1684581-resize-calendar-views-esr78.diff

[Triage Comment]
Approved for esr78

Attachment #9205349 - Flags: approval-comm-esr78? → approval-comm-esr78+

The follow-up patch was supposed to be uplifted too, I must not have made that clear enough. However I've just discovered it is faulty, so not being uplifted was a good thing.

Regressions: 1710964
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: