Closed Bug 1448971 Opened 4 years ago Closed 4 years ago

Replace "when Firefox starts" section in about:preferences#general with checkbox


(Firefox :: Preferences, enhancement, P1)




Firefox 61
61.4 - May 7
Tracking Status
firefox60 --- wontfix
firefox61 --- fixed


(Reporter: k88hudson, Assigned: k88hudson)


(Blocks 2 open bugs)


(Whiteboard: [strings m-c needed] [has-pr])

User Story


(1 file)

The "Startup" section should have a checkbox that reads "Restore Previous Session", which should replace the "when firefox starts" section. This is a follow-up to landing the home section in about:preferences.
User Story: (updated)
Blocks: 1432589
Iteration: --- → 61.2 - Apr 9
Bug 1440219 already blocked the meta but was filed under Preferences Component.

I believe we could just have bugzy list the bugs blocking the meta independent of the component?
See Also: → 1440219
Severity: normal → enhancement
Priority: -- → P2
Whiteboard: [strings m-c needed]
Assignee: nobody → khudson
Priority: P2 → P1
Iteration: 61.2 - Apr 9 → 61.3 - Apr 23
Whiteboard: [strings m-c needed] → [strings m-c needed] [has-pr]
I tried to preserve the existing functionality for users/tests that have set to 0 (blank), while introducing the new functionality with browser.startup.homepage (it's possible to have session restore / a custom or blank homepage for every subsequent new window)
Oops, I still need to fix a couple of tests
Attachment #8966280 - Flags: review?(jaws)
Comment on attachment 8966280 [details]
Bug 1448971 - Replace "when Firefox starts" section in about:preferences#general with checkbox

::: browser/components/preferences/in-content/home.js:71
(Diff revision 6)
>     * @param {bool} shouldShow Should the custom UI be shown?
> +   * @param {bool} isControlled Is an extension controlling the home page?
>     */
> -  _renderCustomSettings(shouldShow) {
> +  _renderCustomSettings(shouldShow, isControlled) {

Can you change this to take an options Object argument since one of your callsites is passing `undefined` for the first argument?

_renderCustomSettings({shouldShow, isControlled}) {

::: browser/components/preferences/in-content/home.js:80
(Diff revision 6)
>      const customUrlEl = document.getElementById("homePageUrl");
> -    const isHomepageCustom = !this._isHomePageDefaultValue() && !this._isHomePageBlank();
> +    const homePref = Preferences.get("browser.startup.homepage");
> -    if (typeof shouldShow === "undefined") shouldShow = isHomepageCustom;
> +    const isHomePageCustom = isControlled || (!this._isHomePageDefaultValue() && !this.isHomePageBlank());
> +    if (typeof shouldShow === "undefined") shouldShow = isHomePageCustom;

nit, please put this on two lines. The convention in this file is to also wrap with curly brackets.
Attachment #8966280 - Flags: review?(jaws) → review+
I needed to fix some somewhat unrelated race conditions in tests that got exposed as a result of these changes in the last update
Iteration: 61.3 - Apr 23 → 61.4 - May 7
hg error in cmd: hg push -r tip ssh:// pushing to ssh://
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 7 changes to 7 files
remote: (ftl_check check enabled per config override)
remote: ************************ ERROR *************************
remote: You are trying to commit a change to an FTL file.
remote: At the moment modifying FTL files requires a review from
remote: one of the L10n Drivers.
remote: Please, request review from either:
remote:     - Francesco Lodolo (:flod)
remote:     - Zibi Braniecki (:gandalf)
remote:     - Axel Hecht (:pike)
remote:     - Stas Malolepszy (:stas)
remote: ********************************************************
remote: transaction abort!
remote: rollback completed
remote: pretxnchangegroup.mozhooks hook failed
abort: push failed on remote
Attachment #8966280 - Flags: review?(francesco.lodolo)
Comment on attachment 8966280 [details]
Bug 1448971 - Replace "when Firefox starts" section in about:preferences#general with checkbox
Attachment #8966280 - Flags: review?(francesco.lodolo) → review+
Pushed by
Replace "when Firefox starts" section in about:preferences#general with checkbox r=flod,jaws
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Component: Activity Streams: Newtab → Preferences
See Also: 1440219
Duplicate of this bug: 1440219
Depends on: 1472599
Blocks: 1530536
You need to log in before you can comment on or make changes to this bug.