Closed Bug 1538485 Opened 5 years ago Closed 5 years ago

Remove the <grid> from the calendar's preferences

Categories

(Calendar :: Preferences, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Paenglab, Assigned: Paenglab)

References

Details

Attachments

(1 file, 3 obsolete files)

See bug 1521483 why this needs to be removed.

Attached patch 1538485-no-grid-calendar-prefs.patch (obsolete) — — Splinter Review

Whoever is first. One review is enough.

Attachment #9053056 - Flags: review?(philipp)
Attachment #9053056 - Flags: review?(makemyday)
Comment on attachment 9053056 [details] [diff] [review]
1538485-no-grid-calendar-prefs.patch

Yep, whoever is first :-)
Attachment #9053056 - Flags: review?(geoff)
Status: NEW → ASSIGNED
Comment on attachment 9053056 [details] [diff] [review]
1538485-no-grid-calendar-prefs.patch

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

Mixing XUL and HTML like this is something I am really not a fan of but I guess we do not really have a choice.

::: calendar/base/content/preferences/alarms.xul
@@ +27,5 @@
>  
>          <groupbox>
>              <label><html:h2>&pref.alarmgoesoff.label;</html:h2></label>
> +            <hbox id="alarm-sound-box">
> +                <vbox align="top">

"top" isn't a valid value for align. I think what you're trying to do is pack="start", which is unnecessary anyway.

@@ +33,5 @@
> +                              preference="calendar.alarms.playsound"
> +                              label="&pref.playasound;"
> +                              accesskey="&pref.calendar.alarms.playsound.accessKey;"/>
> +                </vbox>
> +                <vbox id="alarm-sound-table" align="top">

Same here.

::: calendar/base/content/preferences/general.xul
@@ +66,5 @@
>          </groupbox>
>  
>          <groupbox id="defaults-itemtype-groupbox">
>              <label><html:h2 id="defaults-itemtype-caption">&pref.defaults.label;</html:h2></label>
> +            <vbox id="defaults-itemtype-box" align="top">

Why are we switching to vbox? In fact, it's not your fault, but I dislike this whole section. Can we not have UI that depends on the state of a menulist? Maybe a job for another bug.

(Also you want align="start", the existing code is also wrong.)

@@ +80,5 @@
>                      </menupopup>
>                  </menulist>
>                  <spacer id="defaults-itemtype-spacer" flex="1"/>
> +                <deck id="defaults-itemtype-deck" class="indent">
> +                    <hbox id="defaults-event-grid" align="top">

align="start"

::: calendar/base/themes/common/calendar-preferences.css
@@ +32,5 @@
> +
> +#eventdefalarm,
> +#tododefalarm,
> +#alarmSoundFileField {
> +  width: calc(100% - 8px); /* 8px is the sum of the element margins. */

The devtools say the margin is 12px for the menulists, but this does work so let's just ignore it.
Attachment #9053056 - Flags: review?(philipp)
Attachment #9053056 - Flags: review?(makemyday)
Attachment #9053056 - Flags: review?(geoff)
Attachment #9053056 - Flags: review+
Attached patch 1538485-no-grid-calendar-prefs.patch (obsolete) — — Splinter Review

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

Comment on attachment 9053056 [details] [diff] [review]
1538485-no-grid-calendar-prefs.patch

Review of attachment 9053056 [details] [diff] [review]:

Mixing XUL and HTML like this is something I am really not a fan of but I
guess we do not really have a choice.

Me too. It makes a lot of flexing issues.

::: calendar/base/content/preferences/alarms.xul
@@ +27,5 @@

     <groupbox>
         <label><html:h2>&pref.alarmgoesoff.label;</html:h2></label>
  •        <hbox id="alarm-sound-box">
    
  •            <vbox align="top">
    

"top" isn't a valid value for align. I think what you're trying to do is
pack="start", which is unnecessary anyway.

Wasn't needed here, removed.

@@ +33,5 @@

  •                          preference="calendar.alarms.playsound"
    
  •                          label="&pref.playasound;"
    
  •                          accesskey="&pref.calendar.alarms.playsound.accessKey;"/>
    
  •            </vbox>
    
  •            <vbox id="alarm-sound-table" align="top">
    

Same here.

Same here, removed.

::: calendar/base/content/preferences/general.xul
@@ +66,5 @@

     </groupbox>

     <groupbox id="defaults-itemtype-groupbox">
         <label><html:h2 id="defaults-itemtype-caption">&pref.defaults.label;</html:h2></label>
  •        <vbox id="defaults-itemtype-box" align="top">
    

Why are we switching to vbox? In fact, it's not your fault, but I dislike
this whole section. Can we not have UI that depends on the state of a
menulist? Maybe a job for another bug.

I had flexing and aligning issues when it was a hbox.
And yes, for another bug.

(Also you want align="start", the existing code is also wrong.)

Fixed.

@@ +80,5 @@

                 </menupopup>
             </menulist>
             <spacer id="defaults-itemtype-spacer" flex="1"/>
  •            <deck id="defaults-itemtype-deck" class="indent">
    
  •                <hbox id="defaults-event-grid" align="top">
    

align="start"

Fixed.

Attachment #9053056 - Attachment is obsolete: true
Attachment #9053508 - Flags: review?(geoff)
Comment on attachment 9053508 [details] [diff] [review]
1538485-no-grid-calendar-prefs.patch

Nice. Please file the follow-up so that we don't forget to do it.
Attachment #9053508 - Flags: review?(geoff) → review+
Attached patch 1538485-no-grid-calendar-prefs-variant.patch (obsolete) — — Splinter Review

During writing the new bug I had an idea. What do you think about showing the options always? With the in-content prefs we have enough space.

Attachment #9053513 - Flags: review?(geoff)
Comment on attachment 9053513 [details] [diff] [review]
1538485-no-grid-calendar-prefs-variant.patch

That's pretty much what I had in mind. I think it looks better without the indent.

While we're here, the `<table>`s have a default cell spacing of 2, which I think is unwanted. Let's get rid of that, in aboutPreferences.css, I guess.
Attachment #9053513 - Flags: review?(geoff) → review+

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

Comment on attachment 9053513 [details] [diff] [review]
1538485-no-grid-calendar-prefs-variant.patch

That's pretty much what I had in mind. I think it looks better without the
indent.

Removed the indent.

While we're here, the <table>s have a default cell spacing of 2, which I
think is unwanted. Let's get rid of that, in aboutPreferences.css, I guess.

I had it already with the border-spacing: 0; in calendar-preferences.css.

Attachment #9053508 - Attachment is obsolete: true
Attachment #9053513 - Attachment is obsolete: true
Attachment #9053525 - Flags: review+

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

Comment on attachment 9053513 [details] [diff] [review]
1538485-no-grid-calendar-prefs-variant.patch

That's pretty much what I had in mind. I think it looks better without the
indent.

While we're here, the <table>s have a default cell spacing of 2, which I
think is unwanted. Let's get rid of that, in aboutPreferences.css, I guess.

Keywords: checkin-needed

I had it already with the border-spacing: 0; in calendar-preferences.css.

My build was missing the new file. I'd already fallen for that once today.

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/187544e30b40
Remove grid usage from calendar's preferences. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 7.0
Version: unspecified → Trunk
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: