Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions change-logs/1.28.0/changesets/web-page-loading-bar-flat.md

This file was deleted.

22 changes: 22 additions & 0 deletions change-logs/1.28.0/changesets/web-page-loading-line.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
type: improved
area: navigation
platforms:
- android
- ios
- desktop
pull_request: 5172
rollout: full
---

## zh-CN

App 内网页(应用内浏览器、设置里的网页)加载时,顶部的进度条改为贴着上边缘的一条细线,两端平直,不再是圆角的胶囊形,也不再来回滑动。页面还没有进度时,细线停在左侧一小段不动;有进度后跟着页面向前走,不会倒退;加载完成时走到头再淡出,加载失败时立即消失。很快就加载完的页面不再闪出这条线。打开系统的“减少动态效果”后,细线不做动画。

## en

While a web page loads in the app (the in-app browser and the settings web pages), the progress bar is now a thin line flush with the top edge, with square ends, instead of a rounded pill, and it no longer sweeps back and forth. Before the page reports progress, the line rests as a short still segment; it then follows the page forward and never moves back. When the page finishes, the line runs to the end and fades out; when the page fails, it disappears at once. A page that loads very quickly no longer flashes the line. With the system's reduced motion setting on, the line does not animate.

## ja

アプリ内の Web ページ(アプリ内ブラウザ、設定の Web ページ)の読み込み中に表示される進捗バーが、上端に沿った細い線になりました。両端は角のない直線で、角丸のピル形ではなくなり、左右に往復する動きもなくなりました。ページの進捗がまだないときは、短い線が動かずに表示されます。進捗が届くとページに合わせて前に進み、後ろには戻りません。読み込みが終わると線は端まで進んでからフェードアウトし、失敗したときはすぐに消えます。すぐに読み込みが終わるページでは、線は表示されません。システムの「視差効果を減らす」などの動きを減らす設定がオンのときは、線はアニメーションしません。
13 changes: 9 additions & 4 deletions compose/designsystem/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Other checks:
| `RaftSkeleton`, `RaftSkeletonList`, `rememberRaftSkeletonDelayPassed` | Skeleton, InboxItemSkeletonList `delay` | Done | Line, block, square; pulse (all in phase, one shared frame loop per theme), or still for screenshots / reduced motion. A list skeleton waits `RaftListSkeletonDelayMillis` (1s, raft-ui 0.22.1 #720) before it shows, so a fast load doesn't flash it: `RaftSkeletonList` wraps the rows, `rememberRaftSkeletonDelayPassed(loading)` gates lazy rows. `delayMillis = 0` or `LocalRaftListSkeletonDelayMillis provides 0L` shows them at once (screenshot fixtures). A single `RaftSkeleton` is not delayed |
| `RaftLocatedState`, `Modifier.raftLocated`, `raftLocatedStrength` | located (`useLocated`, `LOCATED_MS`) | Done | raft-ui 0.22.1 #719: the item a jump took someone to shows `info-soft` at once, held 1.2s, then an ease-out fade, gone at 2s (`RaftLocatedMillis`); reduced motion holds it still for 2s, then off. `locate(key)` once the item is on screen (a new call restarts it); `raftLocated` paints it over the item's fill in its shape (draw phase only); `raftLocatedStrength(active)` for a row that lays it in its own fill (a message). A stronger mark (selected, menu open, search match, checked) wins: don't paint it there. Used by the thread jump, the search return row and Activity's unread jump |
| `RaftProgressBar` | Progress | Done | `fill-muted` track (sticker radius), `info` fill with the 1.5dp `sticker-ink` inset edge; sm / md / lg (6 / 8 / 10dp); primary and warning; complete turns `success`; optional header (label, mono value); indeterminate half-width sweep (`animated = false` freezes it); progress-bar semantics |
| `RaftPageLoadingBar` | — (mobile; a browser's load line) | Done | The load line on the top edge of a loading page (in-app web pages): a flat 2dp (`RaftStroke.Strong`) line in the Progress `info` fill, square ends, edge to edge, no track, no radius, no ink edge; determinate, or the Progress indeterminate half-width sweep (`animated = false` freezes it); progress-bar semantics. Progress inside a page stays `RaftProgressBar` |
| `RaftPageLoadingBar`, `RaftPageLoadState` | PageLoadingLine (being added to raft-design to match) | Done | The load line on the top edge of a loading page (in-app web pages): a flat 2dp (`RaftStroke.Strong`) line in the Progress `info` fill, square ends, from the start edge, no track, no radius, no ink edge. It stays composed and is told the load (`RaftPageLoadState`: `Idle`, `Loading(progress?, load)`, `Finished`, `Failed`); it owns the rest: it first shows 200ms into a load (a faster page draws no line; `appearDelayMillis = 0` for screenshots), rests still at 8% with no progress, then follows the page forward only, each change over 200ms `ease-out`, up to 95% while the load runs (a new load, named by the host changing `load`, never guessed from the progress, starts again from the beginning; a line already up stays up); `Finished` runs it to the end and fades it out over 200ms, `Failed` / `Idle` drop it at once; reduced motion jumps the width and drops a finished line at once. No room and no semantics while nothing is drawn, progress-bar semantics while it is. Where a placeholder gives way to the page, the container that swaps them owns the one line (the app's `RaftWebPageLoadLineHost`), so it stays up across the swap. Progress inside a page stays `RaftProgressBar`; screenshot `page_loading_bar`, timing in `RaftPageLoadingBarUiTest` |
| `RaftSlider` | (none) | Done | No raft-ui counterpart yet: built from Progress and Switch parts. Progress header row (label, mono value), 6dp `fill-muted` track with the `selected` fill and its 1.5dp `sticker-ink` inset edge up to the thumb, the Switch knob (22dp `sticker-paper`, 1.5dp ink ring) as thumb; 44dp touch target; drag, tap, arrow / Home / End keys, `setProgress`; disabled greys it. Used by Share preview's custom width |
| `RaftSteps`, `RaftStep`, `RaftStepStatus` | Steps (0.24, `vertical`) | Done | A short flow of 3 to 5 steps in a column: 20dp square markers (sticker radius) with the number in Space Mono 12 bold, the title `text-footnote` semibold 8dp after it, an optional `text-caption` description, 16dp between steps and a 1dp `line-seam` from 4dp under each marker to 4dp above the next. Ahead (`wait`): seam outline, hint ink; current (`process`): the yellow `brand-400` sticker with a 1.5dp ink edge; done (`finish`): solid ink with a paper check; failed (`error`): the orange sticker with a cross. A step's `icon` replaces its number while waiting or in progress (a `RaftSpinner` for the step running now). Each step is one screen-reader item, its title then the finish / error label. Not ported: the row layout and clickable steps |
| `RaftOtterIndicator`, `RaftOtterIndicatorDefaults` | OtterIndicator (steps) | Done | Ottie, one pose per `RaftStepStatus`: resting (`wait`), typing (`process`), a head tilt with a question mark (`error`), after its hop (`finish`); 40dp by default, never smaller. Decorative (no semantics): the status is said in text beside it. raft-ui's own WebP sheets (`composeResources/drawable/ottie_*.webp`, 256px a frame), fixed brand art in light and dark. Not ported: the motion (breathing, the typing loop, the one-time tilt and hop); every pose is the still raft-ui shows with reduced motion |
Expand Down Expand Up @@ -490,9 +490,14 @@ Checked with `git diff v0.7.1 v0.8.0` in raft-design:
toolbar's (raft-design responsive.md), so a page can't reorder the steps. It has no
arrow-key roving focus (each control is its own focus stop), the scrolling filter line has
no edge fade, and a split button's pair has no `role="group"` name.
- **Page loading bar.** raft-ui has no page load line; `RaftPageLoadingBar` is the Progress
`info` fill as a flat 2dp line without the track, the sticker radius and the ink edge, so
it reads as a browser's load line on the top edge of an in-app web page.
- **Page loading bar.** raft-ui has no page load line yet; a raft-design `PageLoadingLine` is
being added upstream to match `RaftPageLoadingBar` (2dp, square ends, edge to edge, `info`;
an 8% rest, forward-only progress over 200ms `ease-out`, a 200ms delay before it shows, a
run to the end and a 200ms fade when the load finishes, at once when it fails or with
reduced motion at the end). Until it ships, the numbers here are the approved spec, not
raft-ui tokens. One mobile addition to check against it: while the load still runs the line
stops at 95% (`RaftPageLoadingBarLoadingMaxFraction`), because web engines report 100% some
time before the load ends and the full line is kept for the finish.
- **Slider.** raft-ui has no slider; `RaftSlider` (Share preview's custom image width) is
assembled from the Progress track and fill and the Switch knob until raft-ui designs one.
- **Sheet actions side by side.** raft-ui's DrawerActions stack in a bottom sheet; the web
Expand Down
Binary file modified compose/designsystem/screenshots/page_loading_bar_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified compose/designsystem/screenshots/page_loading_bar_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading