Closed Bug 1679820 Opened 5 years ago Closed 5 years ago

remove <deck> from lightning-item-iframe.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, 4 obsolete files)

Remove <deck> from https://searchfox.org/comm-central/rev/1fa5ebe1384434e904b33bb7de8f0a3d6e8bfdc5/calendar/lightning/content/lightning-item-iframe.xhtml#437

Two children that can be set hidden/not as appropriate instead of setting selectedIndex on the deck.

Attachment #9190335 - Flags: review?(alessandro)
Status: NEW → ASSIGNED
Comment on attachment 9190335 [details] [diff] [review] Bug-1679820_de-deck-lightning-item-iframe-xhtml-0.patch Review of attachment 9190335 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/lightning/content/lightning-item-iframe.js @@ +1322,1 @@ > if (notCustomRule) { No need to declare a variable for this, just write directly in the condition. ::: calendar/lightning/content/lightning-item-iframe.xhtml @@ +434,4 @@ > value="custom"/> > </menupopup> > </menulist> > + <hbox id="repeat-box"> Do we need this extra container now that the two elements are not dependent by it?
Attachment #9190335 - Flags: review?(alessandro)
Attachment #9190335 - Attachment is obsolete: true
Attachment #9190473 - Flags: review?(alessandro)
Comment on attachment 9190473 [details] [diff] [review] Bug-1679820_de-deck-lightning-item-iframe-xhtml-1.patch Review of attachment 9190473 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/lightning/content/lightning-item-iframe.js @@ +3947,1 @@ > // First of all collapse the details text. If we fail to This whole condition is a bit weird. It seems that we're hiding the "repeat-details" element, but then also collapsing it, and then removing the collapse after some labels have been filled, but then we're once again selecting it to remove the collapse after the else callback. Can you investigate this condition and streamline it a bit?
Attachment #9190473 - Flags: review?(alessandro) → feedback+

I have updated it a bit. Added try and catch to prevent the confusion.

Attachment #9190473 - Attachment is obsolete: true
Attachment #9190647 - Flags: review?(alessandro)
Comment on attachment 9190647 [details] [diff] [review] Bug-1679820_de-deck-lightning-item-iframe-xhtml-2.patch Review of attachment 9190647 [details] [diff] [review]: ----------------------------------------------------------------- ::: calendar/lightning/content/lightning-item-iframe.js @@ +3969,1 @@ > } I'm not sure about the try catch. The failed string generation might happen inside the `recurrenceRule2String` method, which already returns null. And if it returns null we fallback to the "ruleTooComplex" string. I think simply putting `repeatDetails.hidden = false;` after the detailsString variable is ready would be enough. Did you try simulating this scenario where the "ruleTooComplex" string is used?
Attachment #9190647 - Flags: review?(alessandro) → feedback+

Yes, I have tried that. Agree, repeatDetails.hidden = false; should work.

Attachment #9190647 - Attachment is obsolete: true
Attachment #9191274 - Flags: review?(alessandro)
Comment on attachment 9191274 [details] [diff] [review] Bug-1679820_de-deck-lightning-item-iframe-xhtml-3.patch Review of attachment 9191274 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, thanks.
Attachment #9191274 - Flags: review?(alessandro) → review+
Attachment #9191274 - Flags: review+ → review?(geoff)
Comment on attachment 9191274 [details] [diff] [review] Bug-1679820_de-deck-lightning-item-iframe-xhtml-3.patch Review of attachment 9191274 [details] [diff] [review]: ----------------------------------------------------------------- Just a little tidy-up to do. Otherwise LGTM! ::: calendar/lightning/content/lightning-item-iframe.js @@ +2840,3 @@ > > let repeatMenu = document.getElementById("item-repeat"); > let repeatValue = repeatMenu.selectedItem.getAttribute("value"); Let's collect repeat-untilDate and repeat-details here so we don't have to getElementById them in four places in this function. @@ -2847,5 @@ > enableElementWithLock("todo-has-entrydate", "repeat-lock"); > } > } else if (repeatValue == "custom") { > - let lastRepeatDeck = repeatDeck.selectedIndex; > - repeatDeck.selectedIndex = 1; I *think* it's okay to remove this, but I hope you've done some manual checking here.
Attachment #9191274 - Flags: review?(geoff) → review+

(In reply to Geoff Lankow (:darktrojan) from comment #9)

I think it's okay to remove this, but I hope you've done some manual
checking here.

Yes, there is an if-else condition. I have simplified it if the execution goes to if statement, don't do anything and if it goes to else statement, change the visibilities of the respective elements.

Attachment #9191274 - Attachment is obsolete: true
Attachment #9191864 - Flags: review+
Target Milestone: --- → 85 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/92cd2f444d15
remove <deck> XUL element from lightning-item-iframe.xhtml dialog. r=aleca,darktrojan

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

Attachment

General

Created:
Updated:
Size: