Skip to content

Add keyed chip text field state - #199

Merged
dokar3 merged 1 commit into
mainfrom
add-keyed-state-remembering
Jul 22, 2026
Merged

Add keyed chip text field state#199
dokar3 merged 1 commit into
mainfrom
add-keyed-state-remembering

Conversation

@dokar3

@dokar3 dokar3 commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Close #198

Summary by CodeRabbit

  • New Features
    • Added an optional key to chip text field state creation.
    • State is now recreated when the supplied key changes, enabling controlled resets while preserving existing default behavior.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 093d655e-8828-47aa-9b1e-110cffe18477

📥 Commits

Reviewing files that changed from the base of the PR and between 25908ef and 3f409d7.

📒 Files selected for processing (1)
  • chiptextfield-core/src/commonMain/kotlin/com/dokar/chiptextfield/ChipTextFieldState.kt

📝 Walkthrough

Walkthrough

rememberChipTextFieldState now accepts an optional key and recreates its remembered ChipTextFieldState when that key changes. Existing default chip initialization remains unchanged.

Changes

Chip text field state

Layer / File(s) Summary
Keyed state remembering
chiptextfield-core/src/commonMain/kotlin/com/dokar/chiptextfield/ChipTextFieldState.kt
rememberChipTextFieldState adds an optional key parameter and switches to keyed Compose remembering; the file-ending brace placement is adjusted without functional impact.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding keyed state support to chip text field state.
Linked Issues check ✅ Passed The PR adds a key parameter and uses it to recreate state, matching issue #198's requirement.
Out of Scope Changes check ✅ Passed No unrelated code changes are indicated beyond a minor brace alignment adjustment.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-keyed-state-remembering

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dokar3
dokar3 merged commit dcfe69b into main Jul 22, 2026
2 checks passed
@dokar3
dokar3 deleted the add-keyed-state-remembering branch July 22, 2026 08:54
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.

Missing key for trigger recomposition for the state

1 participant