Blame hig/C/progress-bars.page

Packit 1470ea
Packit 1470ea
      xmlns:uix="http://projectmallard.org/experimental/ui/"
Packit 1470ea
      type="topic"
Packit 1470ea
      id="progress-bars">
Packit 1470ea
Packit 1470ea
  <info>
Packit 1470ea
    <credit type="author">
Packit 1470ea
      <name>Allan Day</name>
Packit 1470ea
      <email>aday@gnome.org</email>
Packit 1470ea
    </credit>
Packit 1470ea
    <credit>
Packit 1470ea
      <name>Calum Benson</name>
Packit 1470ea
    </credit>
Packit 1470ea
    <credit>
Packit 1470ea
      <name>Adam Elman</name>
Packit 1470ea
    </credit>
Packit 1470ea
    <credit>
Packit 1470ea
      <name>Seth Nickell</name>
Packit 1470ea
    </credit>
Packit 1470ea
    <credit>
Packit 1470ea
      <name>Colin Robertson</name>
Packit 1470ea
    </credit>
Packit 1470ea
Packit 1470ea
    <link type="guide" xref="ui-elements"/>
Packit 1470ea
    <uix:thumb mime="image/svg" src="figures/ui-elements/progress-bars.svg"/>
Packit 1470ea
Packit 1470ea
    <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
Packit 1470ea
  </info>
Packit 1470ea
Packit 1470ea
<title>Progress bars</title>
Packit 1470ea
Packit 1470ea

Progress bars indicate that a task is being carried out, along with how much progress has been made through the task.

Packit 1470ea
Packit 1470ea
<media type="image" mime="image/svg" src="figures/ui-elements/progress-bars.svg"/>
Packit 1470ea
Packit 1470ea
<section id="when-to-use">
Packit 1470ea
<title>When to use</title>
Packit 1470ea
Packit 1470ea

It is usually necessary to indicate that progress is taking place whenever an operation takes more than around three seconds. This ensures that users understand that they have to wait, and that an error has not occurred.

Packit 1470ea
Packit 1470ea

When indicating progress, the primary choice is between a progress bar or a <link xref="progress-spinners">progress spinner</link>. Progress bars indicate how much of a task has been completed. They are therefore useful for tasks that take a long time. As a rule of thumb, only use a progress bar for tasks that take over 30 seconds. For tasks that have shorter periods, <link xref="progress-spinners">progress spinners</link> are often a better choice.

Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="types">
Packit 1470ea
<title>Types</title>
Packit 1470ea
Packit 1470ea

There are three types of progress bar:

Packit 1470ea
Packit 1470ea
<list>
Packit 1470ea
<item>

Time-remaining: these indicate how much time remains in an operation.

</item>
Packit 1470ea
<item>

Typical-time: these indicate how much time remains, based on an estimate of the expected duration.

</item>
Packit 1470ea
<item>

Indeterminate: these only indicate that an operation is ongoing, not how long it will take.

</item>
Packit 1470ea
</list>
Packit 1470ea
Packit 1470ea

Accuracy is preferable for progress bars. Where possible, use a time-remaining progress bar, followed by typical-time. Try to avoid using indeterminate progress bars.

Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="progress-text">
Packit 1470ea
<title>Progress text</title>
Packit 1470ea
Packit 1470ea

Each progress bar can include a text description. This text should provide an idea of how much of the task has been completed. When deciding on progress text:

Packit 1470ea
Packit 1470ea
<list>
Packit 1470ea
<item>

Always consider what is most relevant and interesting for the user.

</item>
Packit 1470ea
<item>

It is often better to provide specific information rather than a unitless percentage. For example, <gui>13 of 19 images rotated</gui> or <gui>12.1 of 30 MB downloaded</gui> rather than <gui>13% complete</gui>.

</item>
Packit 1470ea
<item>

For long-running tasks, it can be desirable to show an estimate of the time remaining in the progress bar text. If other relevant information isn't available, this can be shown on its own. Alternatively, it can appear alongside text about task progress; however, be careful not to overwhelm the user with too much information when doing this, and use <link xref="typography">typographic conventions</link> to differentiate the most useful information.

</item>
Packit 1470ea
<item>

If the time remaining is an estimate, use the word <gui>about</gui>. For example: <gui>About 3 minutes left</gui>.

</item>
Packit 1470ea
</list>
Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="task-stages">
Packit 1470ea
<title>Task stages</title>
Packit 1470ea
Packit 1470ea

Some tasks can be made up of a sequential series of stages, each of which have different options for time estimation. It might be possible to estimate the time remaining for part of a task, but not another part, for example. In these situations:

Packit 1470ea
Packit 1470ea
<list>
Packit 1470ea
<item>

Only communicate the different stages in a task when they are relevant to a user. Generally speaking, this will not be required, and it is not necessary or desirable to communicate separate stages in a task.

</item>
Packit 1470ea
<item>

If a task includes time-remaining and typical-time stages, try to create a single composite typical-time progress bar.

</item>
Packit 1470ea
<item>

If a task includes an indeterminate progress stage, the progress bar can show indeterminate progress for part of the task. However, you should avoid showing indeterminate progress bars for long periods of time, and should attempt to keep the number of progress bar mode changes to an absolute minimum. Avoid indeterminate progress wherever possible.

</item>
Packit 1470ea
</list>
Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="sub-tasks">
Packit 1470ea
<title>Sub-tasks</title>
Packit 1470ea
Packit 1470ea

If a task is comprised of multiple sub-tasks (such as downloading several files simultaneously), it is generally advisable to show a single progress bar which indicates composite progress for the overall task. However, there are some situations where this might not be the case:

Packit 1470ea
Packit 1470ea
<list>
Packit 1470ea
<item>

If it is genuinely useful for the user to know progress within each individual sub-task. (As an alternative, completion of each sub-task can be indicated with progress text.)

</item>
Packit 1470ea
<item>

If it might be necessary to pause or stop a sub-task (see the <link xref="#general-guidelines">general guidelines</link> on this, below).

</item>
Packit 1470ea
<item>

If sub-tasks are already indicated in your application's user interface. In this case, it can be less disruptive to show a progress for each item inline.

</item>
Packit 1470ea
</list>
Packit 1470ea
Packit 1470ea

When showing progress bars for sub-tasks:

Packit 1470ea
Packit 1470ea
<list>
Packit 1470ea
<item>

Each sub-task should conform to the usage guidelines for progress bars (see <link xref="#when-to-use">when to use</link>, above).

</item>
Packit 1470ea
<item>

Generally speaking, it is not necessary to show a progress bar for overall progress through the set of tasks.

</item>
Packit 1470ea
</list>
Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="progress-windows">
Packit 1470ea
<title>Progress windows</title>
Packit 1470ea
Packit 1470ea

In the past, progress windows were a popular way to present progress bars. These secondary windows would appear for the duration of a task, and would contain one or more progress bars. In general, progress windows are not recommended, since the consequence of closing the window can be unclear and they can obscure useful controls and content.

Packit 1470ea
Packit 1470ea

Where possible, progress bars should be displayed inline, and should have a close visual relationship with the content items or controls which represent the ongoing task.

Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="general-guidelines">
Packit 1470ea
<title>General guidelines</title>
Packit 1470ea
Packit 1470ea
<list>
Packit 1470ea
<item>

If the operation in progress is potentially destructive or resource intensive, consider placing a pause and/or cancel button close to the progress bar.

</item>
Packit 1470ea
<item>

Ensure that time-remaining and typical-time progress bars measure an operation’s total time or total work, not just that of a single step.

</item>
Packit 1470ea
<item>

Update time-remaining progress bars when changes occur that will cause the operation to finish more quickly or more slowly.

</item>
Packit 1470ea
<item>

When using a typical-time progress bar, if your application overestimates the completed amount of work, the length of the bar can indicate <gui>almost complete</gui> until the operation is complete. If your application underestimates how much work is complete, fill the remaining portion of the bar when the operation is complete.

</item>
Packit 1470ea
</list>
Packit 1470ea
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
<section id="api-reference">
Packit 1470ea
<title>API reference</title>
Packit 1470ea
Packit 1470ea
<list>
Packit 1470ea
<item>

<link href="https://developer.gnome.org/gtk3/stable/GtkProgressBar.html">GtkProgressBar</link>

</item>
Packit 1470ea
</list>
Packit 1470ea
</section>
Packit 1470ea
Packit 1470ea
</page>