Closed Bug 1417198 Opened 7 years ago Closed 7 years ago

Migrate statusbarpanel-menu-iconic, statusbarpanel-iconic, statusbarpanel-iconic-text bindings to TB

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 59.0

People

(Reporter: bgrins, Assigned: Paenglab)

References

Details

Attachments

(1 file, 1 obsolete file)

In Bug 1416368 I'm planning to remove statusbarpanel-* bindings and associated CSS from mozilla-central. These are still used in comm-central: https://searchfox.org/comm-central/search?q=statusbarpanel-&path=.
Summary: Migrate statusbarpanel-menu-iconic, statusbarpanel-iconic, statusbarpanel-iconic-text bindings to comm-central if they are stil → Migrate statusbarpanel-menu-iconic, statusbarpanel-iconic, statusbarpanel-iconic-text bindings to comm-central if they are still needed
Attached patch statusbar.patch (obsolete) — Splinter Review
For TB I have already a patch since I saw you want to remove this bindings.

Frg, what do you think for SM? Do you want to do something similar or do you want to implement the bindings in suite?
Flags: needinfo?(frgrahl)
Looks good. I would prefer not to reimplenet anything.

Stefanh do you have probably some time to look into this for suite?
Flags: needinfo?(frgrahl) → needinfo?(stefanh)
Brian, just a question - appreciate some advice from a de-xbl expert here :-)

It looks to me that statusbar and statusbarpanel also will be removed soon. When I look at the statusbar* bindings, wouldn't they be good candidates for converting to Custom Elements? I realize that there might be some work left on Custom Elements, but I'm thinking that the best strategy for comm-central is to just migrate the bindings and then convert them to Custom Elements at a later stage (like in a couple of months).
Flags: needinfo?(bgrinstead)
Actually, suite already has a binding in its general.xml that extends statusbarpanel-iconic-text. So just moving the m-c bindings there would be the best option anyway (doing it the TB way won't work out-of-the-box).
Flags: needinfo?(stefanh)
(In reply to Stefan [:stefanh] from comment #3)
> Brian, just a question - appreciate some advice from a de-xbl expert here :-)
> 
> It looks to me that statusbar and statusbarpanel also will be removed soon.
> When I look at the statusbar* bindings, wouldn't they be good candidates for
> converting to Custom Elements? I realize that there might be some work left
> on Custom Elements, but I'm thinking that the best strategy for comm-central
> is to just migrate the bindings and then convert them to Custom Elements at
> a later stage (like in a couple of months).

Yes, they would be good candidates for Custom Elements (they don't use [implements] or other complex features). This is definitely not final output, but I have a tool that converts XBL:

- https://github.com/bgrins/xbl-analysis/blob/gh-pages/elements/generated/StatusbarpanelIconic.js
- https://github.com/bgrins/xbl-analysis/blob/gh-pages/elements/generated/StatusbarpanelIconicText.js
- https://github.com/bgrins/xbl-analysis/blob/gh-pages/elements/generated/StatusbarpanelMenuIconic.js

In particular, statusbarpanel-menu-iconic would need to use shadow DOM to keep parity (to match "<children />" behavior from XBL).

Custom Element in XUL work is still in progress in Bug 1404420, so in the mean time I've been looking for bindings that are unused.
Flags: needinfo?(bgrinstead)
(In reply to Stefan [:stefanh] from comment #4)
> Actually, suite already has a binding in its general.xml that extends
> statusbarpanel-iconic-text. So just moving the m-c bindings there would be
> the best option anyway (doing it the TB way won't work out-of-the-box).

Makes sense to me. I'll plan on landing the m-c removal and expect that the XML/CSS would move over to c-c.
Thanks Brian. Filed bug 1418094 (have a patch there as well) for the suite part.
(In reply to Brian Grinstead [:bgrins] from comment #5)

> In particular, statusbarpanel-menu-iconic would need to use shadow DOM to
> keep parity (to match "<children />" behavior from XBL).

I can't find any usage of that binding in comm-central, so I guess that makes conversion easier.
Richard - I first had this idea that we could put the bindings in a shared directory, but if the flattening works for TB it makes of course more sense than to keep using xbl bindings.
With the SM specific bug 1418094 I rename this one to TB only.
Summary: Migrate statusbarpanel-menu-iconic, statusbarpanel-iconic, statusbarpanel-iconic-text bindings to comm-central if they are still needed → Migrate statusbarpanel-menu-iconic, statusbarpanel-iconic, statusbarpanel-iconic-text bindings to TB
Comment on attachment 8928283 [details] [diff] [review]
statusbar.patch

Aceman, this patch uses instead of the binding simple XUL plus copies the CSS from global.css to messenger.css.
Attachment #8928283 - Flags: review?(acelists)
Assignee: nobody → richard.marti
Comment on attachment 8928283 [details] [diff] [review]
statusbar.patch

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

I don't understand this patch. You do not just unroll/open-code the contents of the binding to the places where we used it. You only selectively add <image/> somewhere but not all places. Also you do not add class="statusbarpanel-icon" to the images, which the original binding had.
So for the offline icon you use toolbarbutton instead of an image.
(In reply to :aceman from comment #12)
> Comment on attachment 8928283 [details] [diff] [review]
> statusbar.patch
> 
> Review of attachment 8928283 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I don't understand this patch. You do not just unroll/open-code the contents
> of the binding to the places where we used it. You only selectively add
> <image/> somewhere but not all places. 

Which places are missing?

> Also you do not add class="statusbarpanel-icon" to the images, which the
> original binding had.

This class makes no sense as where is no rule for it.

(In reply to :aceman from comment #13)
> So for the offline icon you use toolbarbutton instead of an image.

In reality it's a button (or an area) where you can set the online/offline state. With this the function is clearer.
Comment on attachment 8928283 [details] [diff] [review]
statusbar.patch

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

::: mail/themes/linux/mail/messenger.css
@@ +582,5 @@
>  
>  /* Status panel */
>  
> +.statusbarpanel-iconic,
> +.statusbarpanel-iconic-text {

Where is statusbarpanel-iconic-text used?
(In reply to Richard Marti (:Paenglab) from comment #14)
> > I don't understand this patch. You do not just unroll/open-code the contents
> > of the binding to the places where we used it. You only selectively add
> > <image/> somewhere but not all places. 
> 
> Which places are missing?

I meant the offline icon, but I then saw you just converted it to a button instead of image. OK.
 
> > Also you do not add class="statusbarpanel-icon" to the images, which the
> > original binding had.
> 
> This class makes no sense as where is no rule for it.

OK.
Attached patch statusbar.patchSplinter Review
(In reply to :aceman from comment #15)
> Comment on attachment 8928283 [details] [diff] [review]
> statusbar.patch
> 
> Review of attachment 8928283 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: mail/themes/linux/mail/messenger.css
> @@ +582,5 @@
> >  
> >  /* Status panel */
> >  
> > +.statusbarpanel-iconic,
> > +.statusbarpanel-iconic-text {
> 
> Where is statusbarpanel-iconic-text used?

Good catch, copy/paste from global.css. Removed now because not used.
Attachment #8928283 - Attachment is obsolete: true
Attachment #8928283 - Flags: review?(acelists)
Attachment #8929545 - Flags: review?(acelists)
Comment on attachment 8929545 [details] [diff] [review]
statusbar.patch

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

Thanks.
Attachment #8929545 - Flags: review?(acelists) → review+
Keywords: checkin-needed
Pushed by richard.marti@gmail.com:
https://hg.mozilla.org/comm-central/rev/d342491c066b
Fix TB after landing of bug 1416368: Remove unused statusbarpanel-* bindings. r=jorgk
Status: NEW → RESOLVED
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 59.0
For the record: r=aceman.
Please check "hg out" carefully before pushing.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: