Closed Bug 1680044 Opened 3 years ago Closed 3 years ago

remove <deck> from calendar-tab-panels.inc.xhtml

Categories

(Calendar :: General, task)

Tracking

(thunderbird_esr78 wontfix)

RESOLVED FIXED
85 Branch
Tracking Status
thunderbird_esr78 --- wontfix

People

(Reporter: khushil324, Assigned: khushil324)

References

Details

Attachments

(1 file, 2 obsolete files)

I have removed two functions, I think there is no use for them.

Attachment #9191458 - Flags: review?(alessandro)
Status: NEW → ASSIGNED
Comment on attachment 9191458 [details] [diff] [review]
Bug-1680044_de-deck-calendar-tab-panels-inc-0.patch

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

Bouncing this review to Geoff since it touches some core components of the calendar code, especially the removal of those 2 observers.
Attachment #9191458 - Flags: review?(alessandro) → review?(geoff)
Comment on attachment 9191458 [details] [diff] [review]
Bug-1680044_de-deck-calendar-tab-panels-inc-0.patch

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

I hate how the calendar and task tabs work. One day we will fix this. Today is not that day. :-)

The two functions you're removing appear to be ancient history. They've gone almost untouched since the day this code was imported to HG, and I don't care enough to look back any further. As long as everything works without them, I have no problem removing them.

::: calendar/base/content/calendar-task-view.js
@@ -426,5 @@
> -  }
> -
> -  // In case we find that the task view has been made visible, we refresh the view.
> -  if (deck.selectedPanel && deck.selectedPanel.id == "calendar-task-box") {
> -    taskViewUpdate();

I *think* you're correct in not replacing this. I can't see how calling taskViewUpdate whenever the tasks tab is selected would achieve anything.

::: calendar/base/content/calendar-views-utils.js
@@ +261,5 @@
>    ids.forEach(x => setupViewNode(x, "tooltiptext"));
>  
>    try {
> +    selectedDay = currentView().selectedDay;
> +    currentSelection = currentView().getSelectedItems();

Do currentView() once and use the result twice.

@@ +315,4 @@
>   * @return      The selected calendar view
>   */
>  function currentView() {
> +  for (let element of document.getElementById("view-box").children) {

We can use getViewBox() here.

@@ +466,5 @@
>    let newValue = cmd.getAttribute("checked") == "true" ? "false" : "true";
>    cmd.setAttribute("checked", newValue);
>  
> +  let viewBox = getViewBox();
> +  for (let view of viewBox.children) {

Let's combine these two lines (and in the other functions that look like this one).

::: calendar/lightning/content/calendar-tab-panels.inc.xhtml
@@ +432,4 @@
>        </vbox>
>        <!-- Tasks View -->
>        <vbox id="calendar-task-box" flex="1"
> +            onselect="taskDetailsView.onSelect(event);"

It seems like this event should be somewhere else, like on calendar-task-tree. I don't know why it's up here. Please investigate.
Attachment #9191458 - Flags: review?(geoff) → feedback+
Attachment #9191458 - Attachment is obsolete: true
Attachment #9192197 - Flags: review?(geoff)
Attachment #9192197 - Attachment is obsolete: true
Attachment #9192197 - Flags: review?(geoff)
Attachment #9192520 - Flags: review?(geoff)
Comment on attachment 9192520 [details] [diff] [review]
Bug-1680044_de-deck-calendar-tab-panels-inc-2.patch

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

This is good.

BTW, I've noticed your diffs only have 3 lines of context instead of the usual 8. Could you fix that please? It's so much easier to work out what's going on with more context.
Attachment #9192520 - Flags: review?(geoff) → review+
Target Milestone: --- → 85 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/d32b7dfa99ad
remove <deck> XUL element from calendar-tab-panels.inc.xhtml. r=aleca,darktrojan

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Regressions: 1683245
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: