Skip to content

Feat: Samples drawn in their references' colours (FR-22.5) - #117

Closed
b-re-w wants to merge 32 commits into
developfrom
feature/samples-complete
Closed

b-re-w wants to merge 32 commits into
developfrom
feature/samples-complete

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 4, 2026

Copy link
Copy Markdown
Member

What it holds

Palette fixes and pinning tests for the unified samples, README updates, calculator menu key fix.

Ahead of develop by 13 commits.

What is unfinished

Behind develop by 224 commits; the samples predate the compose-rust API rewrite (#85), so a rebase is needed.

Linked issue

Part of #2 and #85

Notes

This branch has not been merged with develop and may conflict. It is opened as a draft only so the unmerged design is kept as a PR; it is not ready to merge.

b-re-w added 28 commits October 3, 2026 08:26
A Dock tile, a Start menu tile and a desktop launcher are drawn far larger
than the 64 pixel window icon, and stretching that one is visibly soft. The
icon script now draws every mark a second time at 512 pixels from the same
shapes, and minimal's mark, which was drawn by hand at 128, is described as
shapes too so its large icon comes from the same place. The 64 pixel window
icons are unchanged byte for byte.

Each Dioxus.toml names the large one as its [bundle] icon, which is where dx
bundle and scripts/package-sample.sh read it from.

Covers FR-22.6 acceptance criterion 3 (bundles carry an icon).
…22.6)

The sample release shipped one tar.gz per sample per desktop platform, which
is not something anyone installs. scripts/package-sample.sh turns a built
sample into the platform's own form:

- macOS arm64: a .app with the renderer's lib directory whole in
  Contents/Frameworks/lib, NSHighResolutionCapable set, an .icns, the
  program pointed at the copy by @executable_path and everything signed
  ad hoc, shipped as .app.zip and as a .dmg;
- Windows x64: the renderer's dist kept as it is with the program beside
  the DLL, as a .zip, and the same files as an unsigned .msix whose
  publisher carries the attribute Add-AppxPackage -AllowUnsigned requires;
- Linux x64 and arm64: an AppImage with the renderer in a lib directory
  beside the program and DT_NEEDED and the run path made relative.

Name, identifier, publisher and descriptions are read from each sample's
Dioxus.toml and the version from its Cargo.toml. The workflow fetches a
pinned, digest-checked appimagetool, checksums every file, and the release
notes say how to install the unsigned MSIX or re-sign it.

scripts/tests/package-sample.test.sh lays every sample out for all four
targets on any machine and checks the metadata against Dioxus.toml, then on
macOS and Linux packages a real program linked to a real library by
absolute path, deletes the build tree, and runs the bundled program.

Covers FR-22.6 acceptance criteria 1 to 4; the MSIX install itself stays a
manual check on Windows as the criterion says.
…ata (FR-22.6)

The descriptions a bundle shows were stale. Calculator promised keyboard
input it deliberately does not have, and statistics, podcast and social
still said they were painted in roles after each moved to its reference
picture's own palette. A bundle's description is read from Dioxus.toml, so
these are what an installer would have shown.

Covers FR-22.6 acceptance criterion 3 (bundle metadata matches the sample).
… expression over its answer (FR-22)

Two keys on the face did nothing. Apple's pad clears with AC and the engine
only knew C, so on macOS the calculator could not be cleared. The last key of
the memory row, M with a list mark, was drawn and greyed like the others and
then fell through to nothing; it now opens a sheet listing what the memory
holds, whose line recalls it, the way the Windows reference's memory list
does.

The small line over the answer emptied the moment equals was pressed, so the
screen showed a result with no calculation above it. All three references
keep it there (38,670 / 50,000 over 0.7734), so the engine now remembers the
calculation equals answered and forgets it as soon as the big line holds a
number it did not produce.

Covers FR-22.3 acceptance criterion 1 (expression line, result line, memory
row, keypad; memory keys store and recall).
…s and places answer (FR-22)

Search was a destination only on an expanded window, so on a phone or a
tablet the strip had no search and it was reachable only through the
composer's menu. It is now one of the five places at every width, which is
what the destination set promises for it.

Three more things the screen drew and did not do:

- the composer's + key and the top bar's More key shared one signal, so
  pressing either opened both menus;
- Clear search emptied the query but left the old words in the field,
  because the field keeps its own text; the field is now replaced;
- Images, Videos and Library did nothing when pressed; each now says it is
  not part of this sample.

Tests: search is the second destination on a compact window, typing in the
search sheet filters the conversations and clearing it brings them back with
a fresh field, the composer's menu opens alone, and every place answers. The
desktop search test now finds Search in the first frame.

Covers FR-22.3 acceptance criteria 10 and 11.
Statistics named its reference's colours in a palette module and used them
everywhere, but nothing held the values, so the rule that a unified sample's
palette is pinned by a test was met by six samples and missed by this one.
The palette's eight values are now asserted, and the first screen is checked
for any fill, edge or ink that a design system would pick.

Also corrects two comments that still said the charts and the costs panel
were painted with roles.

Covers FR-22.3 acceptance criteria 12 and 14 for statistics.
…palette (FR-22.5)

The social sample met the palette rule in its screens but not around them:

- its bar was a Navigation, which draws the running design system's
  labelled bar with a selection pill, in one ink for every destination. It
  is now the sample's own row of bare icons, the one you are on in the
  reference's coral;
- the sleep stories are the reference's one dark page inside a light app,
  and they were drawn on the cream like everything else. That destination
  now stands on the reference's navy with light ink;
- nothing held the palette's values. They are pinned now, and the shelves
  are checked for any fill, edge or ink a design system would pick.

The destination tests press the bar's icons, since the bar has no words.

Covers FR-22.3 acceptance criteria 12, 13 and 14 for social.
…wn icon bar (FR-22.5)

The check-in was drawn in the reference's pastels, and everything after it
fell back to the running design system:

- the profile's quote card was a PrimaryContainer panel, which came out as a
  pale lilac the picture does not have; it is now the reference's dark card
  with the quotation mark on a tile of the accent;
- the week's line was drawn in roles, and its test asserted that it was;
  it is now the palette's quiet grey and accent, and the test asserts the
  opposite;
- the worry chips, the session list, the library, the settings and every
  support line used roles or the default Surface; they now use the palette,
  which gains a card colour, a muted ink and names its powder blue as the
  accent;
- the bar was a Navigation with labels in the theme's accent; it is now the
  sample's own row of icons, the one you are on in the accent.

The palette is pinned by a test, every page is checked for a fill, edge or
ink a design system would pick, and the bar's four inks are asserted.

The reference's own bar marks the chosen destination with a pale pill and a
label; this follows FR-22.5's icons-only rule instead.

Covers FR-22.3 acceptance criteria 12, 13 and 14 for self-care.
…on bar (FR-22.5)

The subject grid was in the reference's four colours, and every other page
fell back to the running design system:

- the progress page painted the four subjects with the three accent
  containers and the neutral fill, so a subject that was amber on the grid
  was pale grey on the next page; it now uses the subject's own colour,
  which Tile now answers from the palette instead of from roles;
- lesson cards were surface roles; an open lesson is now the reference's one
  white card with black ink, a locked one a dark card with quiet writing;
- the stage strip, the start key, the progress panel and the headings used
  roles or defaults; they use the palette, which gains the white card, a
  muted ink and the locked card's two colours;
- the bar was a Navigation; it is now the sample's own row of white icons
  with the destination you are on in the design's amber.

The palette test now pins all ten values, every page is checked for a fill,
edge or ink a design system would pick, and the bar is checked for one
amber mark and no Navigation.

The reference's own bar has no accent; this follows FR-22.5's rule that the
destination you are on is drawn in the reference's accent.

Covers FR-22.3 acceptance criteria 12, 13 and 14 for academic.
…-22.5)

Minimal was the one unified sample with no palette at all: every fill, ink
and edge was a role, so the reference's black and white sheet came out in
the running design system's accent and containers, and its colour group laid
out the three accents and three accent containers, a picture of whichever
system was running rather than of this design.

It now has a palette module of the sheet's own colours (paper, three greys,
ink, a red delete and a green switch, plus the hero's pale disc), pinned by a
test. Every card, key, field, separator and line of type names its colour
from it, the hero mark is drawn in it, and the colour group lays out the
sheet's nine colours with the ink each carries. Sizes, corners and gaps stay
roles.

A new test walks all three groups and fails on any fill, edge or ink a design
system would pick, and on a hero command that is not a literal.

Covers FR-22.3 acceptance criteria 12 and 14 for minimal; it has no bottom
bar, so 13 does not apply.
samples-speak-in-roles.test.sh guards the four adaptive samples; nothing
guarded the seven unified ones, which is how five of them drifted back to
roles. This checks each has a palette module, pins it with the palette test,
paints nothing with an accent container and declares no Navigation, comments
exempt. The samples' own tests check the wire.

Covers FR-22.3 acceptance criteria 12, 13 and 14 across all seven.
…-22)

The README said a sample is a main.rs, described statistics as painted in
roles and academic as the place the role vocabulary ran out, and listed four
desktop archives as the release. It now describes the library and one line
binary, the unified samples as drawn in their references' colours, and the
desktop bundles with how to make one and how to install the unsigned MSIX.
Its screenshot example writes inside the repository rather than to /tmp.

The recording comments counted six design systems and thirty-six screens; there
are seven and forty-two.
The menu key at the head of the Windows bar did nothing when pressed. It is
where the reference lists its other modes, and this sample is the standard
calculator only, so it now says that rather than reading as broken.

Covers FR-22.3 acceptance criterion 1 (the calculator's controls work).
The samples were rewritten on the compose-rust API while this branch was open, so the
screens' sources are develop's; the colour and behaviour fixes are ported on top in the
commits that follow. The bundle script follows the single executable: a macOS or Linux
bundle holds the executable, the icon and the metadata, and only Windows still takes a
renderer directory.
Statistics names its reference's colours in a palette module but nothing held the
values. The palette's eight values are now asserted, and the first screen is checked
for any fill, edge or ink that a design system would pick. Covers FR-22.5 for statistics.
…palette (FR-22.5)

The bar was a Navigation, which draws the running design system's labelled bar
with a selection pill. It is now a row of bare icons, the destination you are
on in the reference's coral. The sleep stories stand on the reference's navy
with light ink, and the palette values are pinned by a test, with checks that
nothing on screen is painted or inked by a role. Ported from PR #117 onto the
compose-rust authoring API.
…-22.5)

The playground filled its cards from accent container roles, so under Cupertino they
came out pale lilac and powder blue, none of which is in the reference sheet. Its
colours are now literals named in a palette module: paper, three greys, ink, a red
delete and a green switch. The colour group shows those instead of a role table.

Covers FR-22.5: a test pins the palette values, and another asserts that no fill or
border on any of the three groups is a role.
…s and places answer (FR-22)

Search was a destination only on an expanded window, so on a phone or a
tablet it was reachable only through the composer's menu. It is now one of
the five places at every width.

- the composer's add key and the top bar's more key shared one signal, so
  pressing either opened both menus; each has its own now;
- Clear search emptied the query but left the old words in the field, which
  keeps its own text; the field is replaced;
- Images, Videos and Library did nothing when pressed; each now says it is
  not part of this sample.

The frames recorder's doc comments now count seven design systems.

Tests: search is the second destination at each width class and opens its
sheet, the composer's menu opens alone, and every place answers.
…wn icon bar (FR-22.5)

The check-in was drawn in the reference's pastels and everything after it
fell back to the running design system. The profile's quote card is now the
reference's dark card with the quotation mark on a tile of the accent, the
week's line uses the palette, the worry chips, session lists, library and
settings use the palette (which gains a card colour, a muted ink and names
its powder blue as the accent), and the bar is the sample's own row of icons
with the current destination in the accent instead of a Navigation.

Covers FR-22.5 for self-care: the palette is pinned, nothing on screen is
painted by a role, and the bar marks the destination in the accent.
@b-re-w b-re-w added the run-heavy-ci Run the heavy CI workflows on this pull request's head label Oct 24, 2026
…il the step

ls exits 1 or 2 when a pattern (*.msix) matches nothing, and pipefail turned that into the step's status after every sample had packaged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@b-re-w b-re-w removed the run-heavy-ci Run the heavy CI workflows on this pull request's head label Oct 25, 2026
@b-re-w

b-re-w commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

Handoff (2026-10-25): Branch: feature/samples-complete. State: draft; Build the sample (Android) and Heavy checks are red. Next: merge develop, fix the Android sample build, add the run-heavy-ci label, then mark ready. Blocked on: the heavy run and the Android build fix.

@b-re-w b-re-w added the needs-decision Leader decision needed label Nov 7, 2026
@b-re-w

b-re-w commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Left open on purpose (integration 2026-11-07, #505). Not integrated: it predates the API rewrite and conflicts with the migrated samples. Needs a decision: the palette fixes (FR-22.5) have to be ported by hand.

@b-re-w

b-re-w commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Superseded (pQ): every unified sample has a palette module pinned by a literal+ARGB test (#532 #530 #524 #596 #595, store/podcast in flight), calculator rebuilt to its references in #604, the desktop bundle part replaced by the per-OS packagers and bundle check in #523, README rows rewritten per sample. Nothing from it is still wanted.

@b-re-w b-re-w closed this Nov 13, 2026
@b-re-w
b-re-w deleted the feature/samples-complete branch November 13, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-decision Leader decision needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant