Redefine date/time input related preferences

RESOLVED FIXED in Firefox 55

Status

()

enhancement
P2
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jessica, Assigned: jessica)

Tracking

(Blocks 1 bug)

Trunk
mozilla55
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox54 wontfix, firefox55 fixed)

Details

Attachments

(2 attachments, 2 obsolete attachments)

We now have the following prefs:
- "dom.forms.datetime": for all five types date time input types, that is, date, time, week, month and datetime-local on desktop
- "dom.forms.datepicker": for picker for input type=date on desktop, but using OS native date picker
- "dom.experimental_forms": used to be for new experimental html forms, but now we only use it for input type=date and input=time on mobile (Fennec and B2G). Note that date and time input types show as a single line text box and uses native OS picker.

I think "dom.forms.datepicker" and related code can be removed, since after our DateTime Input project, we're using our custom date/time picker across all platforms.

We may need a pref for only input type=date and type=time on desktop though, as we plan to ship only type=date and type=time first in our DateTime Input project.

In conclusion, we need:
- a pref for input date and time on mobile: We can use the existing "dom.experimental_forms" or maybe rename it to "dom.forms.mobile.experimental"
- a pref for input date and time on desktop: maybe "dom.forms.datetime"?
- a pref for input week, month and datetime-local on desktop: "dom.forms.datetime.others"?
Priority: -- → P2
Assignee: nobody → jjong
This basically reverts Bug 825294.
Now, `dom.forms.datetime` is for input type=date and time only, and `dom.forms.datetime.others` is for input type=week, month and datetime-local.

This is because we plan to ship input type=date and time first, so we need a separate pref.
Attachment #8847883 - Flags: review?(bugs)
Attachment #8847885 - Flags: review?(bugs)
Attachment #8847883 - Flags: review?(bugs) → review+
Comment on attachment 8847885 [details] [diff] [review]
Part 2: add a new pref for input type=week, month a datetime-local.

>         newType = aResult.GetEnumValue();
>-        if ((IsExperimentalMobileType(newType) &&
>-             !IsExperimentalFormsEnabled()) ||
>-            (newType == NS_FORM_INPUT_NUMBER && !IsInputNumberEnabled()) ||
>+        if ((newType == NS_FORM_INPUT_NUMBER && !IsInputNumberEnabled()) ||
>             (newType == NS_FORM_INPUT_COLOR && !IsInputColorEnabled()) ||
>             (IsDateTimeInputType(newType) &&
>              !IsDateTimeTypeSupported(newType))) {

ok, you can remove the IsExperimental* since IsDateTime* covers that already.
Attachment #8847885 - Flags: review?(bugs) → review+
(In reply to Olli Pettay [:smaug] from comment #3)
> Comment on attachment 8847885 [details] [diff] [review]
> Part 2: add a new pref for input type=week, month a datetime-local.
> 
> >         newType = aResult.GetEnumValue();
> >-        if ((IsExperimentalMobileType(newType) &&
> >-             !IsExperimentalFormsEnabled()) ||
> >-            (newType == NS_FORM_INPUT_NUMBER && !IsInputNumberEnabled()) ||
> >+        if ((newType == NS_FORM_INPUT_NUMBER && !IsInputNumberEnabled()) ||
> >             (newType == NS_FORM_INPUT_COLOR && !IsInputColorEnabled()) ||
> >             (IsDateTimeInputType(newType) &&
> >              !IsDateTimeTypeSupported(newType))) {
> 
> ok, you can remove the IsExperimental* since IsDateTime* covers that already.

Exactly, thanks!
rebased on top of bug 1347640, carrying r+.
Attachment #8847883 - Attachment is obsolete: true
Attachment #8848394 - Flags: review+
rebased on top of bug 1347640, carrying r+.
Attachment #8847885 - Attachment is obsolete: true
Attachment #8848396 - Flags: review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ece6f82b4de3
Part 1: Cleanup dom.forms.datepicker related code. r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/8603d4d348a4
Part 2: Add a new pref for input type=week, month and datetime-local. r=smaug
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ece6f82b4de3
https://hg.mozilla.org/mozilla-central/rev/8603d4d348a4
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.