Skip to content

Feat: Add neutral button tiers and destination counts (CR-8a, FR-22.2, FR-21.2.4) - #972

Merged
b-re-w merged 18 commits into
developfrom
feat/cr8a-neutral-buttons-counts
Nov 26, 2026
Merged

b-re-w merged 18 commits into
developfrom
feat/cr8a-neutral-buttons-counts

Conversation

@b-re-w

@b-re-w b-re-w commented Nov 22, 2026

Copy link
Copy Markdown
Member

First of two stacked pull requests split from #966 (3816 lines, over the 2000 line limit). The animation half stays in #966, based on this branch.

  • ButtonVariant Neutral = 6 and NeutralSecondary = 7, drawn by all seven design systems; Material 3's second tier is a state layer (FR-22.2).
  • NavigationItem carries a count (property 80 Count, no new tag), drawn in the drawer, bar, rail and the iOS tab; no Count record when none is named (FR-21.2.4).
  • Calculator digits and function keys use the neutral tiers; the todo sidebar carries its counts on its destinations.
  • SPEC: 0de4205 proposes both halves in one commit, so the Spring and 3D matrix text is here too, still Draft. 21.2.4 is marked Agreed.
  • SPEC 14.1-4 criterion 9 and 14.2 now say the Liquid Glass tonal button is the accent at low opacity, which is what the code has drawn since b34e074 and what fr14_1_2_a_tinted_button_is_tinted_with_the_accent pins (leader, 2026-11-22). No code change for that.

Schema: ButtonVariant gains tags 6 and 7. No new property, modifier or event tag, no new vector record.

Existing tests touched:

  • generated_protocol.rs fr14_generated_kotlin_carries_the_roles_and_token_tables: the ButtonVariant enum line gains the two entries.
  • DesignSystemTest.kt fr14_2_every_variant_is_distinct_within_a_system: also leaves out Neutral and NeutralSecondary, because Material 3, GNOME and Deepin draw a digit as their standard grey button; the new fr22_2_neutral_button_tiers_carry_no_accent covers them.
  • fr39_widget_functions_overlays.rs: passes the new count argument.

New tests: fr21_destination_count.rs, NavigationCountTest.kt, fr21_2_4_the_shell_badges_a_destination_with_its_count, fr22_2_neutral_button_tiers_carry_no_accent.

Not ready to merge yet: the generated files (both Protocol.gen.kt, schema-hash.txt, vectors.json) are still at the base state. They are regenerated, and the full gate run, when this pull request takes the schema LOCK after develop is merged in. The result goes here.

Left open: calculator captures on macOS, Windows and Deepin (22.3-13) through the samples capture CI.

Closes #600
Closes #631
Refs #966

…s and destination counts (FR-41.2, FR-41.2.1, FR-22.2, FR-21.2.4)

Proposal for package CR-8a (#552, #600, #631, dioxus-compose#46), waiting
for the leader's agreement before code lands:
- TimingKind::Spring = 4 (p1 stiffness, p2 damping ratio), a normalised
  easing over the existing duration; AnimationSpec::spring fills the
  duration with the settle time.
- AnimatedProperty::Transform3D = 6 with a 4x4 matrix keyframe (88 bytes),
  CSS Transforms 2 matrix interpolation; FR-41.2.1 gets its criteria.
- ButtonVariant Neutral = 6, NeutralSecondary = 7, one row per design system.
- NavigationItem accepts the existing Count (property 80), no new tag.
Two filled button tiers that carry no accent in the fill, the ink, the
line or any pressed state, answered by all seven design systems per the
FR-22.2 table. The existing five variants are unchanged.

Covers FR-22.3 criterion 13 (renderer half) with
fr22_2_neutral_button_tiers_carry_no_accent, in light and dark.
fr14_2_every_variant_is_distinct_within_a_system leaves the calculator
tiers out, since the table draws the digit tier as the standard grey
button in Material 3, GNOME and Deepin.
…FR-22.2, #600)

Digits use Neutral and function keys NeutralSecondary, and the sample no
longer paints its keys' labels OnSurface to hide an accent-tinted Tonal.

Covers FR-22.3 criterion 13 (sample half) with
fr22_calculator_digits_and_functions_use_neutral_tiers;
fr22_every_key_is_a_filled_key now expects the two tiers in place of
Tonal.
NavigationItem! takes an optional count: u32 and sends it as the badge's
Count property (80) on the destination's node; left out, nothing is sent,
and 0 is sent as a count of nothing. No new tag.

Covers FR-21.2.4 (Host half of criteria 1-3) with
fr21_2_4_navigation_item_count_writes_the_count_property and
fr21_2_4_a_changed_count_writes_only_its_destination. The fr39
navigation_item call-macro tests now pass count as well.
NavigationItem accepts Count. A drawer or sidebar sets it at the end of
the row in a new NavigationStyle count ink that all seven systems answer
(readable on the selected row); a bar or rail badges the icon with the
Badge widget's own layout, mark and shortening, now shared from
HostBadge. The iOS platform tab bar gets it as the tab's badgeValue.

Covers FR-21.2.4 criteria 1-3 with
fr21_2_4_drawer_destination_draws_its_count,
fr21_2_4_bar_and_rail_destination_badges_its_count,
fr21_2_4_a_changed_count_recomposes_only_its_destination and
fr21_2_4_the_shell_badges_a_destination_with_its_count.
…631)

The filter and list destinations carry the same counts the narrow list
of lists shows beside them.

Covers FR-21.2.4 criterion 4 with
fr21_2_4_sidebar_destinations_carry_the_counts_the_list_of_lists_shows.
The UI half's part of 02ef897. Its animation.rs and schema.rs hunks format the Spring code and stay with the animation half.
…(FR-21.2.4)

An absent Count was written as a clear on a freshly created node, and a count of 0 is a count, so Count gets its own tracking bit: only None is neutral.

(cherry picked from commit 415aca7)
….2.4)

The fixture replied to every event, including the reports the Renderer sends at start, so the count had already changed before the test took its baseline.

(cherry picked from commit fc9d9d4)
…OutlineVariant (FR-22.2)

OutlineVariant equals SurfaceVariant in Material's dark scheme, so it cannot
separate the two tiers.

(cherry picked from commit 2321316)
…600)

OutlineVariant equals SurfaceVariant in Material's dark scheme, so the two
tiers came out the same grey and fr22_2_neutral_button_tiers_carry_no_accent
failed.

(cherry picked from commit 2cece20)
The destination count's line of 14456b2. The spring segment and the 3D matrix animation keep their marks in the animation half.
… counts

scripts/stage-android-kotlin.sh. The protocol, schema hash and vectors are not regenerated here: that takes the codegen binary.
…-14.1, FR-14.2)

The code has drawn it that way since b34e074 and a test pins it; the text still described the first black or white fill. Leader's decision, 2026-11-22.
…uttons-counts

# Conflicts:
#	compose-rust/src/writer.rs
develop's ButtonKind and CR-8a's Count both took bit 62 of the writer's
sent-property mask, which the turn-2 merge resolved by moving Count to 61.
A node that wrote one would have seen the other as already sent. No widget
takes both today; the test keeps the bits distinct and checks that one
never clears the other.
b-re-w added a commit that referenced this pull request Nov 25, 2026
, #972, #966, #1057)

One regeneration over develop with the six PRs merged. Schema hash
0x048ae5f51d77b280; 162 properties; tables_hash 0xec93_c466_6e16_7d5e; the
event vector is 55 records, 2062 bytes.
@b-re-w
b-re-w merged commit 1c4dd7a into develop Nov 26, 2026
1 of 2 checks passed
@b-re-w
b-re-w deleted the feat/cr8a-neutral-buttons-counts branch November 26, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant