Repository navigation
Feat: Add neutral button tiers and destination counts (CR-8a, FR-22.2, FR-21.2.4) - #972
Merged
Merged
Conversation
…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)
(cherry picked from commit 318a360)
….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)
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
ButtonVariantNeutral = 6andNeutralSecondary = 7, drawn by all seven design systems; Material 3's second tier is a state layer (FR-22.2).NavigationItemcarries a count (property 80Count, no new tag), drawn in the drawer, bar, rail and the iOS tab; noCountrecord when none is named (FR-21.2.4).fr14_1_2_a_tinted_button_is_tinted_with_the_accentpins (leader, 2026-11-22). No code change for that.Schema:
ButtonVariantgains tags 6 and 7. No new property, modifier or event tag, no new vector record.Existing tests touched:
generated_protocol.rsfr14_generated_kotlin_carries_the_roles_and_token_tables: theButtonVariantenum line gains the two entries.DesignSystemTest.ktfr14_2_every_variant_is_distinct_within_a_system: also leaves outNeutralandNeutralSecondary, because Material 3, GNOME and Deepin draw a digit as their standard grey button; the newfr22_2_neutral_button_tiers_carry_no_accentcovers 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