Closed Bug 1323395 Opened 8 years ago Closed 7 years ago

Show warning when disk space available for firefox is not enough

Categories

(Firefox :: Site Permissions, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 54
Tracking Status
firefox54 --- fixed

People

(Reporter: Fischer, Assigned: Fischer)

References

Details

(Whiteboard: [storage-v1])

Attachments

(1 file)

When disk space is full,
- if the firefox-used space < 5GB, then warn user to free some disk space
- if the firefox-used space >= 5GB, then warn user to free some firefox-used space
Depends on: 1294400
No longer depends on: 1312347
(In reply to Fischer [:Fischer] from comment #0)
> When disk space is full,
> - if the firefox-used space < 5GB, then warn user to free some disk space

Why should the browser warn in this case? Isn't the operating system already doing it? (OS X is actually bothering me with this each time I reopen my macbook from sleep).
(In reply to Florian Quèze [:florian] [:flo] from comment #1)
> (In reply to Fischer [:Fischer] from comment #0)
> > When disk space is full,
> > - if the firefox-used space < 5GB, then warn user to free some disk space
> 
> Why should the browser warn in this case? Isn't the operating system already
> doing it? (OS X is actually bothering me with this each time I reopen my
> macbook from sleep).
Actually this means "When disk space available for firefox exceeds limit". The gecko Quota Manager imposes disk usage limit(in proportion of free disk space) on total data stored on firefox by websites.

Why show this warning is for
  1. Not certain of that every OS would alert user for not enough space and our space limit is different from "Total space limit".
  2. 5GB usage of firefox is small and not the main cause for disk space issue. In order to avoid the bad and wrong impression to user that firefox eats much disk space, indicate user to clean up other disk space.

Will update the bug description and the title to make it clearer.
(In reply to Fischer [:Fischer] from comment #0)
Update the bug description:
When disk space available for firefox is not enough,
- if the firefox-used space < 5GB, then warn user to free some disk space
- if the firefox-used space >= 5GB, then warn user to clear some data stored on firefox by websites
Summary: Show warning when disk space is full → Show warning when disk space available for firefox is not enough
Jaws,

I am working on the disk usage alert for the Storage Management project.
Some questions need your feedbacks, thanks:

- The alert dialog [1] has 2 user-defined buttons which is kind of like a "confirmEx" dialog. And now the prompt APIs only provide simple one-button alert dialog. Is there any other utility providing "customisable" alert dialog? Or maybe we could add one more "alertEx" into the APIs since this isn't complex and most codes could be shared with "confirmEx".

- The alert dialog [2] has one "Learn More" link. It looks like no way to insert link into the current standard alert dialog. Do you know other similar case? Or maybe we could replace "Learn More" link with a "Learn More" button.


[1] https://mozilla.invisionapp.com/share/4Y87EJO39#/screens/190771948
[2] https://mozilla.invisionapp.com/share/4Y87EJO39#/screens/179635752
Flags: needinfo?(jaws)
(In reply to Fischer [:Fischer] from comment #4)
> Jaws,
> 
> I am working on the disk usage alert for the Storage Management project.
> Some questions need your feedbacks, thanks:
> 
> - The alert dialog [1] has 2 user-defined buttons which is kind of like a
> "confirmEx" dialog. And now the prompt APIs only provide simple one-button
> alert dialog. Is there any other utility providing "customisable" alert
> dialog? Or maybe we could add one more "alertEx" into the APIs since this
> isn't complex and most codes could be shared with "confirmEx".
> 
> - The alert dialog [2] has one "Learn More" link. It looks like no way to
> insert link into the current standard alert dialog. Do you know other
> similar case? Or maybe we could replace "Learn More" link with a "Learn
> More" button.
> 
> 
> [1] https://mozilla.invisionapp.com/share/4Y87EJO39#/screens/190771948
> [2] https://mozilla.invisionapp.com/share/4Y87EJO39#/screens/179635752

We should not be using modal dialogs for these. This should be done as a global notification bar. The API for the notification bar should be sufficient for what you are asking for. See "high-priority-global-notificationbox" in browser.xul, and look for how that notificationbox is interacted with. For example, http://searchfox.org/mozilla-central/rev/22be34bcc4d5c56b62482a537bba77a6cdce117b/browser/components/nsBrowserGlue.js#2630
Flags: needinfo?(jaws)
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #5)
> We should not be using modal dialogs for these. This should be done as a
> global notification bar. The API for the notification bar should be
> sufficient for what you are asking for. See
> "high-priority-global-notificationbox" in browser.xul, and look for how that
> notificationbox is interacted with. For example,
> http://searchfox.org/mozilla-central/rev/
> 22be34bcc4d5c56b62482a537bba77a6cdce117b/browser/components/nsBrowserGlue.
> js#2630
> 
Jaws, 

The "The space is not enough" warning is important and notification bar is easy to ignore. So prompting a alert dialog is to make sure user receive that warning.

However, alert is annoying. To reach the balance here, the specs is updated as:
1. During one session of using Firefox browser. The alert would ONLY prompt once to alert user. 
2. Then, after user dismisses that alert dialog, a notification bar is present to remind user.
3. Later, another "Not enough space" warning comes, ONLY a notification bar is present to warn user.
4. When Firefox is closed and opened next time, if "Not enough space" warning came, then started from Step #1.

How do you think?
Flags: needinfo?(jaws)
(In reply to Fischer [:Fischer] from comment #6)
> (In reply to Jared Wein [:jaws] (please needinfo? me) from comment #5)
> > We should not be using modal dialogs for these. This should be done as a
> > global notification bar. The API for the notification bar should be
> > sufficient for what you are asking for. See
> > "high-priority-global-notificationbox" in browser.xul, and look for how that
> > notificationbox is interacted with. For example,
> > http://searchfox.org/mozilla-central/rev/
> > 22be34bcc4d5c56b62482a537bba77a6cdce117b/browser/components/nsBrowserGlue.
> > js#2630
> > 
> Jaws, 
> 
> The "The space is not enough" warning is important and notification bar is
> easy to ignore. So prompting a alert dialog is to make sure user receive
> that warning.

The warning is important to you as the developer who is writing the code as well as the person who created the website. However it is unreasonable for us to know if the warning is important for the user.
 
> However, alert is annoying. To reach the balance here, the specs is updated
> as:
> 1. During one session of using Firefox browser. The alert would ONLY prompt
> once to alert user. 
> 2. Then, after user dismisses that alert dialog, a notification bar is
> present to remind user.
> 3. Later, another "Not enough space" warning comes, ONLY a notification bar
> is present to warn user.
> 4. When Firefox is closed and opened next time, if "Not enough space"
> warning came, then started from Step #1.
> 
> How do you think?

It is important for users to have an understanding and expectation of how their software works. Starting with showing an alert modal dialog and then transitioning to showing a notification bar is unpredictable and confusing. Will the user think that the notification bar is less urgent than the modal dialog when presented with both? 

For most users, when Firefox notices the computer is low on space there is not much that Firefox can do for them. We won't know what files on the computer are important to the user, and it may be that Firefox is of least importance to them.

In this case, every time the user launches Firefox they will see an annoying alert dialog. But if they open a different browser they won't see an annoying alert dialog. They will simply stop using Firefox because Firefox is being annoying. Whether their disk is full is not necessarily a problem for this user, to the user it is a problem that Firefox would need to learn to deal with. We are already bordering on being annoying by potentially showing a notification bar that is in-actionable for the majority of computer users.
Flags: needinfo?(jaws)
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #7)
> > The "The space is not enough" warning is important and notification bar is
> > easy to ignore. So prompting a alert dialog is to make sure user receive
> > that warning.
> 
> The warning is important to you as the developer who is writing the code as
> well as the person who created the website. However it is unreasonable for
> us to know if the warning is important for the user.
>  
> > However, alert is annoying. To reach the balance here, the specs is updated
> > as:
> > 1. During one session of using Firefox browser. The alert would ONLY prompt
> > once to alert user. 
> > 2. Then, after user dismisses that alert dialog, a notification bar is
> > present to remind user.
> > 3. Later, another "Not enough space" warning comes, ONLY a notification bar
> > is present to warn user.
> > 4. When Firefox is closed and opened next time, if "Not enough space"
> > warning came, then started from Step #1.
> > 
> > How do you think?
> 
> It is important for users to have an understanding and expectation of how
> their software works. Starting with showing an alert modal dialog and then
> transitioning to showing a notification bar is unpredictable and confusing.
> Will the user think that the notification bar is less urgent than the modal
> dialog when presented with both? 
> 
> For most users, when Firefox notices the computer is low on space there is
> not much that Firefox can do for them. We won't know what files on the
> computer are important to the user, and it may be that Firefox is of least
> importance to them.
> 
> In this case, every time the user launches Firefox they will see an annoying
> alert dialog. But if they open a different browser they won't see an
> annoying alert dialog. They will simply stop using Firefox because Firefox
> is being annoying. Whether their disk is full is not necessarily a problem
> for this user, to the user it is a problem that Firefox would need to learn
> to deal with. We are already bordering on being annoying by potentially
> showing a notification bar that is in-actionable for the majority of
> computer users.

OK, it looks like this is a concern.
Let's put UX team here to have more detailed discussion and to see if any better solution could be reached.
UX team is planing to add telemetry and revise behaviors with data in the future.

@Tina,
We still have some concern about the modal dialog.
Could you please have a look and provide some ideas here?
Thanks.
Flags: needinfo?(thsieh)
@Mark,
Would you please look into the Comment 8 for the space warning modal dialog? thank you.
Flags: needinfo?(thsieh) → needinfo?(mliang)
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #7)
> (In reply to Fischer [:Fischer] from comment #6)
> > (In reply to Jared Wein [:jaws] (please needinfo? me) from comment #5)
> > > We should not be using modal dialogs for these. This should be done as a
> > > global notification bar. The API for the notification bar should be
> > > sufficient for what you are asking for. See
> > > "high-priority-global-notificationbox" in browser.xul, and look for how that
> > > notificationbox is interacted with. For example,
> > > http://searchfox.org/mozilla-central/rev/
> > > 22be34bcc4d5c56b62482a537bba77a6cdce117b/browser/components/nsBrowserGlue.
> > > js#2630
> > > 
> > Jaws, 
> > 
> > The "The space is not enough" warning is important and notification bar is
> > easy to ignore. So prompting a alert dialog is to make sure user receive
> > that warning.
> 
> The warning is important to you as the developer who is writing the code as
> well as the person who created the website. However it is unreasonable for
> us to know if the warning is important for the user.
>  
> > However, alert is annoying. To reach the balance here, the specs is updated
> > as:
> > 1. During one session of using Firefox browser. The alert would ONLY prompt
> > once to alert user. 
> > 2. Then, after user dismisses that alert dialog, a notification bar is
> > present to remind user.
> > 3. Later, another "Not enough space" warning comes, ONLY a notification bar
> > is present to warn user.
> > 4. When Firefox is closed and opened next time, if "Not enough space"
> > warning came, then started from Step #1.
> > 
> > How do you think?
> 
> It is important for users to have an understanding and expectation of how
> their software works. Starting with showing an alert modal dialog and then
> transitioning to showing a notification bar is unpredictable and confusing.
> Will the user think that the notification bar is less urgent than the modal
> dialog when presented with both? 
> 
> For most users, when Firefox notices the computer is low on space there is
> not much that Firefox can do for them. We won't know what files on the
> computer are important to the user, and it may be that Firefox is of least
> importance to them.
> 
> In this case, every time the user launches Firefox they will see an annoying
> alert dialog. But if they open a different browser they won't see an
> annoying alert dialog. They will simply stop using Firefox because Firefox
> is being annoying. Whether their disk is full is not necessarily a problem
> for this user, to the user it is a problem that Firefox would need to learn
> to deal with. We are already bordering on being annoying by potentially
> showing a notification bar that is in-actionable for the majority of
> computer users.

Thanks for the feedback Jared, I agree that the alert dialog could be annoying and confusing for users since most users probably don’t even know browsing websites could take up disk spaces. I guess our initial thought is to use modal alert to force users to take actions.

Here's what I think: maybe for the < 5G situation where there’s not much Firefox can do for them, we could just show a notification bar suggesting that low on space could affect your browsing experience. As for > 5G situation, we could either do the same notification bar but with action button that leads to preferences, or do only the modal alert without confusing the users with both modal alert and notification bar. 

Any thoughts?
Flags: needinfo?(mliang) → needinfo?(jaws)
We've learned over the years that modal alerts don't actually force users to take actions. They just make users annoyed.

What does the "<5G situation" mean? 5 gigabytes is a lot of storage space that we will require to be free. Many sites will never need to use this much storage. What does the ">5G situation" mean? That doesn't seem like the disk is low if there is more than 5 gigabytes available. Perhaps I am misunderstanding you though?
Flags: needinfo?(jaws) → needinfo?(mliang)
So, for "<5G situation", it means that the total storage from different websites that is stored in Firefox is less than 5G, but the disk space on user's computer is running low (which leads to low availability for Firefox). In this case asking a user to clean up the Firefox's storage won't be much of a help.

For ">5G situation" means there's already over 5G data stored in Firefox and cannot store anymore. In this situation, the space available for Firefox is running low (not the disk space) so we will ask the user to open preference to clean up some spaces for Firefox.

We can do the notification bar for both cases and use telemetry to see how users react.
Flags: needinfo?(mliang) → needinfo?(jaws)
Okay, thanks for the clarification. Yes, the notification bar for both cases will be best. Thanks!
Flags: needinfo?(jaws)
Comment on attachment 8830159 [details]
Bug 1323395 - Show warning when disk space available for firefox is not enough,

Hi Jaws,

This patch implements the space pressure notification. The rules are as following:

- it observes the "QuotaManager::StoragePressure" event, which
  - subject is null
  - topic is "QuotaManager::StoragePressure"
  - data is estimated disk space usage in Bytes

- it prompts [1] when usage < 5GB

- it prompts [2] when usage >= 5GB

- only prompts once within 20 mins even there are multiple pressure events observed

2 test cases are added and the try is at [3].


[1] https://mozilla.invisionapp.com/share/4Y87EJO39#/screens/215525524
[2] https://mozilla.invisionapp.com/share/4Y87EJO39#/screens/213203147
[3] https://treeherder.mozilla.org/#/jobs?repo=try&revision=3843c8e1291b157bf19952f89ce8bacac9f72fb8

Thanks
Attachment #8830159 - Flags: review?(jaws)
Assignee: nobody → fliu
Comment on attachment 8830159 [details]
Bug 1323395 - Show warning when disk space available for firefox is not enough,

https://reviewboard.mozilla.org/r/106508/#review108626

::: browser/base/content/browser.js:441
(Diff revision 2)
> +    // Don't display notification twice within the given interval.
> +    // This is because
> +    //   - not to annoy user
> +    //   - give user some time to clean space.
> +    //     Even user sees notification and starts acting, it still takes some time.
> +    const MIN_NOTIFICATION_INTERVAL =

Please include the units on the const name here, so this should become MIN_NOTIFICATION_INTERVAL_MS

::: browser/base/content/browser.js:476
(Diff revision 2)
> +      // The firefox-used space >= 5GB, then guide users to about:preferences
> +      // to clear some data stored on firefox by websites.

This approach is too simple. If a user has a 1TB drive and Firefox is using more than 5GB, then we shouldn't blame Firefox for using too much space. In this case, Firefox is only using .5% of the hard-drive space.

::: browser/locales/en-US/chrome/browser/preferences/preferences.properties:183
(Diff revision 2)
> +spaceAlert.over5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can clear site data in Firefox Preferences to free up to %1$S %2$S of disk space.
> +spaceAlert.under5GB.okButton.label=OK, Got it
> +spaceAlert.under5GB.okButton.accesskey=K
> +spaceAlert.under5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can free disk space by removing files.

The two description texts here are very scary and I'm afraid that they will do more harm than good.

For both descriptions: "Firefox is running out of disk space. Websites may crash if you run out of disk space".

I'm not sure that we ever use the terms "websites may crash" as that's a very non-technical term and is very ambiguous.

For the first description: "You can clear site data in Firefox Preferences to free up to XX XX of disk space"

1, we don't normally refer to the Preferences as "Firefox Preferences", it's just "Preferences", and on OSX it's "Options". 
2, clicking on the button takes the user to the Advanced-network tab, but doesn't actually point the user at anything. The user would have to find the Site Data block at the bottom of this tab, and even then open up the dialog and choose to remove items from that dialog. We should have a better approach than jumping them in to advanced preferences with no guide.

For the second description: "You can free disk space by removing files."

1, This doesn't really help users. Users either may not know which files they can safely remove, or may not want to remove any files. I don't think we should show anything to the user here since providing information that is inactionable would be worse than providing information at all.

::: modules/libpref/init/all.js:5570
(Diff revision 2)
>  
>  // Enable the Storage management in about:preferences and persistent-storage permission request
>  // To enable the DOM implementation, turn on "dom.storageManager.enabled"
>  pref("browser.storageManager.enabled", false);
> +// 20 mins; in ms
> +pref("browser.storageManager.pressureNotification.minInterval", 1200000);

Please include the unit on the pref name, so this would become:
browser.storageManager.pressureNotification.minIntervalMS

::: modules/libpref/init/all.js:5572
(Diff revision 2)
>  // To enable the DOM implementation, turn on "dom.storageManager.enabled"
>  pref("browser.storageManager.enabled", false);
> +// 20 mins; in ms
> +pref("browser.storageManager.pressureNotification.minInterval", 1200000);
> +// 5GB; 5368709120 exceeds the maximum of about:config int type so stored in string type
> +pref("browser.storageManager.pressureNotification.usageThreshold", "5368709120");

Please change this to store the number in GB units so that you can continue to use an int type, and then perform the conversion in JS. This would then become:
browser.storageManager.pressureNotification.usageThresholdGB
Attachment #8830159 - Flags: review?(jaws) → review-
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #17)
> Comment on attachment 8830159 [details]
> Bug 1323395 - Show warning when disk space available for firefox is not
> enough,
> 
> https://reviewboard.mozilla.org/r/106508/#review108626
> 
> ::: browser/base/content/browser.js:476
> (Diff revision 2)
> > +      // The firefox-used space >= 5GB, then guide users to about:preferences
> > +      // to clear some data stored on firefox by websites.
> 
> This approach is too simple. If a user has a 1TB drive and Firefox is using
> more than 5GB, then we shouldn't blame Firefox for using too much space. In
> this case, Firefox is only using .5% of the hard-drive space.
> 
> :::
> browser/locales/en-US/chrome/browser/preferences/preferences.properties:183
> (Diff revision 2)
> > +spaceAlert.over5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can clear site data in Firefox Preferences to free up to %1$S %2$S of disk space.
> > +spaceAlert.under5GB.okButton.label=OK, Got it
> > +spaceAlert.under5GB.okButton.accesskey=K
> > +spaceAlert.under5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can free disk space by removing files.
> 
> The two description texts here are very scary and I'm afraid that they will
> do more harm than good.
> 
> For both descriptions: "Firefox is running out of disk space. Websites may
> crash if you run out of disk space".
> 
> I'm not sure that we ever use the terms "websites may crash" as that's a
> very non-technical term and is very ambiguous.
> 
> For the first description: "You can clear site data in Firefox Preferences
> to free up to XX XX of disk space"
> 
> 1, we don't normally refer to the Preferences as "Firefox Preferences", it's
> just "Preferences", and on OSX it's "Options". 
> 2, clicking on the button takes the user to the Advanced-network tab, but
> doesn't actually point the user at anything. The user would have to find the
> Site Data block at the bottom of this tab, and even then open up the dialog
> and choose to remove items from that dialog. We should have a better
> approach than jumping them in to advanced preferences with no guide.
> 
> For the second description: "You can free disk space by removing files."
> 
> 1, This doesn't really help users. Users either may not know which files
> they can safely remove, or may not want to remove any files. I don't think
> we should show anything to the user here since providing information that is
> inactionable would be worse than providing information at all.
> 
Thanks for the inputs on the descriptions and the 5GB warning policy, will get UX look into these after they are back from the national holidays. Let's see what could be improved.

> 
> ::: browser/base/content/browser.js:441
> > +    const MIN_NOTIFICATION_INTERVAL =
> 
> Please include the units on the const name here, so this should become
> MIN_NOTIFICATION_INTERVAL_MS
> 
> ::: modules/libpref/init/all.js:5570
> > +pref("browser.storageManager.pressureNotification.minInterval", 1200000);
> 
> Please include the unit on the pref name, so this would become:
> browser.storageManager.pressureNotification.minIntervalMS
> 
> ::: modules/libpref/init/all.js:5572
> > +// 5GB; 5368709120 exceeds the maximum of about:config int type so stored in string type
> > +pref("browser.storageManager.pressureNotification.usageThreshold", "5368709120");
> 
> Please change this to store the number in GB units so that you can continue
> to use an int type, and then perform the conversion in JS. This would then
> become:
> browser.storageManager.pressureNotification.usageThresholdGB
OK, will update
Hi Mark,

Could you please look at this 5GB policy?
> https://reviewboard.mozilla.org/r/106508/#review108626
> 
> ::: browser/base/content/browser.js:476
> (Diff revision 2)
> > +      // The firefox-used space >= 5GB, then guide users to about:preferences
> > +      // to clear some data stored on firefox by websites.
> 
> This approach is too simple. If a user has a 1TB drive and Firefox is using
> more than 5GB, then we shouldn't blame Firefox for using too much space. In
> this case, Firefox is only using .5% of the hard-drive space.
> 

And also this strings and behaviors.
> :::
> browser/locales/en-US/chrome/browser/preferences/preferences.properties:183
> (Diff revision 2)
> > +spaceAlert.over5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can clear site data in Firefox Preferences to free up to %1$S %2$S of disk space.
> > +spaceAlert.under5GB.okButton.label=OK, Got it
> > +spaceAlert.under5GB.okButton.accesskey=K
> > +spaceAlert.under5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can free disk space by removing files.
> 
> The two description texts here are very scary and I'm afraid that they will
> do more harm than good.
> 
> For both descriptions: "Firefox is running out of disk space. Websites may
> crash if you run out of disk space".
> 
> I'm not sure that we ever use the terms "websites may crash" as that's a
> very non-technical term and is very ambiguous.
> 
> For the first description: "You can clear site data in Firefox Preferences
> to free up to XX XX of disk space"
> 
> 1, we don't normally refer to the Preferences as "Firefox Preferences", it's
> just "Preferences", and on OSX it's "Options". 
> 2, clicking on the button takes the user to the Advanced-network tab, but
> doesn't actually point the user at anything. The user would have to find the
> Site Data block at the bottom of this tab, and even then open up the dialog
> and choose to remove items from that dialog. We should have a better
> approach than jumping them in to advanced preferences with no guide.
> 
> For the second description: "You can free disk space by removing files."
> 
> 1, This doesn't really help users. Users either may not know which files
> they can safely remove, or may not want to remove any files. I don't think
> we should show anything to the user here since providing information that is
> inactionable would be worse than providing information at all.
Flags: needinfo?(mliang)
(In reply to Fischer [:Fischer] from comment #19)
> Hi Mark,
> 
> Could you please look at this 5GB policy?
> > https://reviewboard.mozilla.org/r/106508/#review108626
> > 
> > ::: browser/base/content/browser.js:476
> > (Diff revision 2)
> > > +      // The firefox-used space >= 5GB, then guide users to about:preferences
> > > +      // to clear some data stored on firefox by websites.
> > 
> > This approach is too simple. If a user has a 1TB drive and Firefox is using
> > more than 5GB, then we shouldn't blame Firefox for using too much space. In
> > this case, Firefox is only using .5% of the hard-drive space.
> > 
> 

We are not blaming Firefox for using too much space. It's just that cleaning up more than 5G could ideally help relieve low disk pressure for users to continue using Firefox to browse websites. 

Also 5GB is just a roughly defined threshold, it's still open for discussion. 

> And also this strings and behaviors.
> > :::
> > browser/locales/en-US/chrome/browser/preferences/preferences.properties:183
> > (Diff revision 2)
> > > +spaceAlert.over5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can clear site data in Firefox Preferences to free up to %1$S %2$S of disk space.
> > > +spaceAlert.under5GB.okButton.label=OK, Got it
> > > +spaceAlert.under5GB.okButton.accesskey=K
> > > +spaceAlert.under5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can free disk space by removing files.
> > 
> > The two description texts here are very scary and I'm afraid that they will
> > do more harm than good.
> > 
> > For both descriptions: "Firefox is running out of disk space. Websites may
> > crash if you run out of disk space".
> > 
> > I'm not sure that we ever use the terms "websites may crash" as that's a
> > very non-technical term and is very ambiguous.
> > 
> > For the first description: "You can clear site data in Firefox Preferences
> > to free up to XX XX of disk space"
> > 
> > 1, we don't normally refer to the Preferences as "Firefox Preferences", it's
> > just "Preferences", and on OSX it's "Options". 
> > 2, clicking on the button takes the user to the Advanced-network tab, but
> > doesn't actually point the user at anything. The user would have to find the
> > Site Data block at the bottom of this tab, and even then open up the dialog
> > and choose to remove items from that dialog. We should have a better
> > approach than jumping them in to advanced preferences with no guide.
> > 
> > For the second description: "You can free disk space by removing files."
> > 
> > 1, This doesn't really help users. Users either may not know which files
> > they can safely remove, or may not want to remove any files. I don't think
> > we should show anything to the user here since providing information that is
> > inactionable would be worse than providing information at all.

We will have more discussion with the copywriter about the terms.
Flags: needinfo?(mliang)
(In reply to Fischer [:Fischer] from comment #19)
> Hi Mark,
> 
> Could you please look at this 5GB policy?
> > https://reviewboard.mozilla.org/r/106508/#review108626
> > 
> > ::: browser/base/content/browser.js:476
> > (Diff revision 2)
> > > +      // The firefox-used space >= 5GB, then guide users to about:preferences
> > > +      // to clear some data stored on firefox by websites.
> > 
> > This approach is too simple. If a user has a 1TB drive and Firefox is using
> > more than 5GB, then we shouldn't blame Firefox for using too much space. In
> > this case, Firefox is only using .5% of the hard-drive space.
> > 
> 
> And also this strings and behaviors.
> > :::
> > browser/locales/en-US/chrome/browser/preferences/preferences.properties:183
> > (Diff revision 2)
> > > +spaceAlert.over5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can clear site data in Firefox Preferences to free up to %1$S %2$S of disk space.
> > > +spaceAlert.under5GB.okButton.label=OK, Got it
> > > +spaceAlert.under5GB.okButton.accesskey=K
> > > +spaceAlert.under5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can free disk space by removing files.
> > 
> > The two description texts here are very scary and I'm afraid that they will
> > do more harm than good.
> > 
> > For both descriptions: "Firefox is running out of disk space. Websites may
> > crash if you run out of disk space".
> > 
> > I'm not sure that we ever use the terms "websites may crash" as that's a
> > very non-technical term and is very ambiguous.
> > 

By the way the current spec has updated this copy, it's now:
"Website contents may not display properly" instead of "Websites may crash"


> > For the first description: "You can clear site data in Firefox Preferences
> > to free up to XX XX of disk space"
> > 
> > 1, we don't normally refer to the Preferences as "Firefox Preferences", it's
> > just "Preferences", and on OSX it's "Options". 
> > 2, clicking on the button takes the user to the Advanced-network tab, but
> > doesn't actually point the user at anything. The user would have to find the
> > Site Data block at the bottom of this tab, and even then open up the dialog
> > and choose to remove items from that dialog. We should have a better
> > approach than jumping them in to advanced preferences with no guide.
> > 
> > For the second description: "You can free disk space by removing files."
> > 
> > 1, This doesn't really help users. Users either may not know which files
> > they can safely remove, or may not want to remove any files. I don't think
> > we should show anything to the user here since providing information that is
> > inactionable would be worse than providing information at all.
(In reply to Mark Liang(:mark_liang) from comment #21)
> (In reply to Fischer [:Fischer] from comment #19)
> > Hi Mark,
> > 
> > Could you please look at this 5GB policy?
> > > https://reviewboard.mozilla.org/r/106508/#review108626
> > > 
> > > ::: browser/base/content/browser.js:476
> > > (Diff revision 2)
> > > > +      // The firefox-used space >= 5GB, then guide users to about:preferences
> > > > +      // to clear some data stored on firefox by websites.
> > > 
> > > This approach is too simple. If a user has a 1TB drive and Firefox is using
> > > more than 5GB, then we shouldn't blame Firefox for using too much space. In
> > > this case, Firefox is only using .5% of the hard-drive space.
> > > 
> > 
> > And also this strings and behaviors.
> > > :::
> > > browser/locales/en-US/chrome/browser/preferences/preferences.properties:183
> > > (Diff revision 2)
> > > > +spaceAlert.over5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can clear site data in Firefox Preferences to free up to %1$S %2$S of disk space.
> > > > +spaceAlert.under5GB.okButton.label=OK, Got it
> > > > +spaceAlert.under5GB.okButton.accesskey=K
> > > > +spaceAlert.under5GB.description=Firefox is running out of disk space. Websites may crash if you run out of disk space. You can free disk space by removing files.
> > > 
> > > The two description texts here are very scary and I'm afraid that they will
> > > do more harm than good.
> > > 
> > > For both descriptions: "Firefox is running out of disk space. Websites may
> > > crash if you run out of disk space".
> > > 
> > > I'm not sure that we ever use the terms "websites may crash" as that's a
> > > very non-technical term and is very ambiguous.
> > > 
> 
> By the way the current spec has updated this copy, it's now:
> "Website contents may not display properly" instead of "Websites may crash"
> 
> 
> > > For the first description: "You can clear site data in Firefox Preferences
> > > to free up to XX XX of disk space"
> > > 
> > > 1, we don't normally refer to the Preferences as "Firefox Preferences", it's
> > > just "Preferences", and on OSX it's "Options". 
> > > 2, clicking on the button takes the user to the Advanced-network tab, but
> > > doesn't actually point the user at anything. The user would have to find the
> > > Site Data block at the bottom of this tab, and even then open up the dialog
> > > and choose to remove items from that dialog. We should have a better
> > > approach than jumping them in to advanced preferences with no guide.
> > > 

I've changed the copy to "You can clear site data in Preferences > Advance > Site Data"
https://mozilla.invisionapp.com/d/main#/console/8352280/213203147/preview


> > > For the second description: "You can free disk space by removing files."
> > > 
> > > 1, This doesn't really help users. Users either may not know which files
> > > they can safely remove, or may not want to remove any files. I don't think
> > > we should show anything to the user here since providing information that is
> > > inactionable would be worse than providing information at all.

Even though this might be inactionable, if we don't show this to users, they might blame Firefox for not running properly and taking disk spaces.

Any other thoughts?
(In reply to Mark Liang(:mark_liang) from comment #22)
> > > > 1, This doesn't really help users. Users either may not know which files
> > > > they can safely remove, or may not want to remove any files. I don't think
> > > > we should show anything to the user here since providing information that is
> > > > inactionable would be worse than providing information at all.
> 
> Even though this might be inactionable, if we don't show this to users, they
> might blame Firefox for not running properly and taking disk spaces.
> 
> Any other thoughts?

We could include a link to SUMO where users can learn more about how Firefox uses their disk and recommended tools/practices for removing files.
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #23)
> (In reply to Mark Liang(:mark_liang) from comment #22)
> > > > > 1, This doesn't really help users. Users either may not know which files
> > > > > they can safely remove, or may not want to remove any files. I don't think
> > > > > we should show anything to the user here since providing information that is
> > > > > inactionable would be worse than providing information at all.
> > 
> > Even though this might be inactionable, if we don't show this to users, they
> > might blame Firefox for not running properly and taking disk spaces.
> > 
> > Any other thoughts?
> 
> We could include a link to SUMO where users can learn more about how Firefox
> uses their disk and recommended tools/practices for removing files.


We already have a "Learn More" button on the far right that links to SUMO page.
https://mozilla.invisionapp.com/d/main#/console/8352280/215525524/preview

I think we could say something like:
Firefox is running out of disk space. Website contents may not display properly. You can visit "Learn More" to help optimize your disk usage for better browsing experience.
Flags: needinfo?(jaws)
(In reply to Mark Liang(:mark_liang) from comment #24)
> (In reply to Jared Wein [:jaws] (please needinfo? me) from comment #23)
> > (In reply to Mark Liang(:mark_liang) from comment #22)
> > > > > > 1, This doesn't really help users. Users either may not know which files
> > > > > > they can safely remove, or may not want to remove any files. I don't think
> > > > > > we should show anything to the user here since providing information that is
> > > > > > inactionable would be worse than providing information at all.
> > > 
> > > Even though this might be inactionable, if we don't show this to users, they
> > > might blame Firefox for not running properly and taking disk spaces.
> > > 
> > > Any other thoughts?
> > 
> > We could include a link to SUMO where users can learn more about how Firefox
> > uses their disk and recommended tools/practices for removing files.
> 
> 
> We already have a "Learn More" button on the far right that links to SUMO
> page.
> https://mozilla.invisionapp.com/d/main#/console/8352280/215525524/preview

Update link: https://mozilla.invisionapp.com/share/RYA4UV1U7

> 
> I think we could say something like:
> Firefox is running out of disk space. Website contents may not display
> properly. You can visit "Learn More" to help optimize your disk usage for
> better browsing experience.
(In reply to Mark Liang(:mark_liang) from comment #20)
> (In reply to Fischer [:Fischer] from comment #19)
> > Hi Mark,
> > 
> > Could you please look at this 5GB policy?
> > > https://reviewboard.mozilla.org/r/106508/#review108626
> > > 
> > > ::: browser/base/content/browser.js:476
> > > (Diff revision 2)
> > > > +      // The firefox-used space >= 5GB, then guide users to about:preferences
> > > > +      // to clear some data stored on firefox by websites.
> > > 
> > > This approach is too simple. If a user has a 1TB drive and Firefox is using
> > > more than 5GB, then we shouldn't blame Firefox for using too much space. In
> > > this case, Firefox is only using .5% of the hard-drive space.
> > > 
> > 
> 
> We are not blaming Firefox for using too much space. It's just that cleaning
> up more than 5G could ideally help relieve low disk pressure for users to
> continue using Firefox to browse websites. 
> 
> Also 5GB is just a roughly defined threshold, it's still open for
> discussion. 
> 

After discussion I think we shouldn't use percentage to determine the message,
If a user has a 1TB drive and has 10GB available space left, the full-disk warning will pop-up if Firefox is using more than 5GB.

If we ask the user to remove their own files, they might think I still got 10GB to use, why should I remove my files? But if we ask the user to relieve the 5GB spaces in Firefox storage, they can do that and continue whatever they are browsing. For users, the only thing they need to know is that Firefox has an upper limit for storing data and if it's full they should clean it up.

We only ask users to clean up Firefox storage when the space they relieve could make a difference, in this case we set it to 5GB, and it shouldn't matter how much space their harddrive have.
Flags: needinfo?(jaws)
Flags: needinfo?(jaws)
The Learn More button in the notification bar is good. I also like the change with the percentage that comment 26 describes. Thanks!
Flags: needinfo?(jaws)
Comment on attachment 8830159 [details]
Bug 1323395 - Show warning when disk space available for firefox is not enough,

Jaws,
Please see the updated patch, thanks.
Attachment #8830159 - Flags: review?(jaws)
Comment on attachment 8830159 [details]
Bug 1323395 - Show warning when disk space available for firefox is not enough,

https://reviewboard.mozilla.org/r/106508/#review112880

::: browser/base/content/browser.js:449
(Diff revisions 2 - 3)
> -    if (duration <= MIN_NOTIFICATION_INTERVAL) {
> +    if (duration <= MIN_NOTIFICATION_INTERVAL_MS) {
>        return;
>      }
>      this._lastNotificationTime = Date.now();
>  
> -    const USAGE_THRESHOLD = parseInt(
> +    const USAGE_THRESHOLD_BYTES = 1073741824 *

Please declare another variable named BYTES_IN_GIGABYTE then use that to do the multiplication, so that this magic number has a name.

::: browser/locales/en-US/chrome/browser/preferences/preferences.properties:181
(Diff revision 3)
> +spaceAlert.over5GB.prefButton.label=Open Preferences
> +spaceAlert.over5GB.prefButton.accesskey=O
> +spaceAlert.over5GB.description=Firefox is running out of disk space. Website contents may not display properly. You can clear stored site data in Preferences > Advanced > Site Data.

On Windows they are actually called "Options" instead of "Preferences", so these strings will need to change based on if the platform is Windows or not.
Attachment #8830159 - Flags: review?(jaws) → review-
Comment on attachment 8830159 [details]
Bug 1323395 - Show warning when disk space available for firefox is not enough,

Hi Jaws,
Please see the updates, thanks.
Attachment #8830159 - Flags: review?(jaws)
Comment on attachment 8830159 [details]
Bug 1323395 - Show warning when disk space available for firefox is not enough,

https://reviewboard.mozilla.org/r/106508/#review113390

r=me with the below spelling error fixed.

::: browser/locales/en-US/chrome/browser/preferences/preferences.properties:188
(Diff revisions 3 - 5)
> +# LOCALIZATION NOTE (spaceAlert.over5GB.prefButtonWin.label): On Windows Preferences is called Options
> +spaceAlert.over5GB.prefButtonWin.label=Open Options
> +spaceAlert.over5GB.prefButtonWin.accesskey=O
>  spaceAlert.over5GB.description=Firefox is running out of disk space. Website contents may not display properly. You can clear stored site data in Preferences > Advanced > Site Data.
> +# LOCALIZATION NOTE (spaceAlert.over5GB.descriptionWin): On Windows Preferences is called Options
> +spaceAlert.over5GB.descriptionWin=Firefox is running out of disk space. Website contents may not display properly. You can clear stored site data in Optioins > Advanced > Site Data.

Options is spelled wrong here.
Attachment #8830159 - Flags: review?(jaws) → review+
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #34)
> browser/locales/en-US/chrome/browser/preferences/preferences.properties:188
> > +spaceAlert.over5GB.descriptionWin=Firefox is running out of disk space. Website contents may not display properly. You can clear stored site data in Optioins > Advanced > Site Data.
> 
> Options is spelled wrong here.
Thanks, updated.
TRY: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6ffd96a3c3c9a8282a65b2af69ccaec38900a372
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/bc92ac281e5e
Show warning when disk space available for firefox is not enough, r=jaws
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/bc92ac281e5e
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
Is it really OK to have hard-coded Firefox instead of a variable replaced by branding in all these strings?
Flags: needinfo?(fliu)
No, it's not OK. Sorry, I missed that in the review. We will need to land new strings and update the string ID for each of these.
Thanks for confirming. Filing a follow-up then.
Flags: needinfo?(fliu)
Depends on: 1340618
Since this fix has automated coverage, I don't think manual testing would be of much help here.

Fischer, if you think Manual QA should instead be looking at this, feel free to flip the qe-verify flag or ni? me directly.
Flags: qe-verify-
Depends on: 1500136
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: