Skip to content

feat: allow hiding the floating label - #90

Merged
paodb merged 2 commits into
masterfrom
feat-89
Sep 1, 2026
Merged

feat: allow hiding the floating label#90
paodb merged 2 commits into
masterfrom
feat-89

Conversation

@javier-godoy

@javier-godoy javier-godoy commented Aug 31, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added support for keeping ChipField labels from floating when the field contains a value.
    • Added controls to enable and check this label behavior programmatically.
    • Added a demonstration view comparing floating and non-floating labels.
  • Chores

    • Updated the project version to 2.8.0-SNAPSHOT.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 872bcf9b-e791-4e2f-bdca-4fb531582274

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f1d8c42-6123-4c76-9ae6-e23d19573f35

📥 Commits

Reviewing files that changed from the base of the PR and between 6f39f8b and e50d93e.

📒 Files selected for processing (5)
  • pom.xml
  • src/main/java/com/flowingcode/vaadin/addons/chipfield/ChipField.java
  • src/main/resources/META-INF/frontend/paper-chip-input-autocomplete.js
  • src/test/java/com/flowingcode/vaadin/addons/chipfield/ChipfieldDemoView.java
  • src/test/java/com/flowingcode/vaadin/addons/chipfield/NoLabelFloatDemo.java

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

Changes

No-label-float feature

Layer / File(s) Summary
Public API and frontend label behavior
src/main/java/com/flowingcode/vaadin/addons/chipfield/ChipField.java, src/main/resources/META-INF/frontend/paper-chip-input-autocomplete.js, pom.xml
ChipField exposes setNoLabelFloat and isNoLabelFloat. The frontend forwards noLabelFloat to paper-input. The project version changes to 2.8.0-SNAPSHOT.
Demo registration and presentation
src/test/java/com/flowingcode/vaadin/addons/chipfield/NoLabelFloatDemo.java, src/test/java/com/flowingcode/vaadin/addons/chipfield/ChipfieldDemoView.java
A routed demo displays ChipField instances with and without floating labels. The demo is registered in ChipfieldDemoView.

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

Merge Risk: ⚪ Minimal · up to e50d9

The PR adds an opt-in option to keep the floating label from moving while preserving existing behavior by default. No actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: scardanzan, paodb

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. (1 skipped: 1… 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.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: adding support to hide the floating label in ChipField.
Full details: Docstring Coverage

Explanation

Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 4 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-89

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.

@javier-godoy
javier-godoy marked this pull request as ready for review August 31, 2026 17:22
@javier-godoy
javier-godoy marked this pull request as draft August 31, 2026 17:44
@javier-godoy

Copy link
Copy Markdown
Member Author

Code review (low effort) — no findings

Reviewed the noLabelFloat property (Polymer element + paper-input binding), the ChipField accessors, and NoLabelFloatDemo. No correctness or cleanup issues found; the change follows the existing conventions in the repo:

  • ChipField.setNoLabelFloat / isNoLabelFloat use the same setProperty(...) / getProperty(name, false) pair as closable, disabled and additionalItems.
  • no-label-float$="[[noLabelFloat]]" uses the same $= attribute-binding form as disabled$ / readonly$ / required$. Polymer serializes boolean false to undefined and removes the attribute, so the default behavior is correct.
  • NoLabelFloatDemo mirrors ReadonlyDemo / StyledDemo (route prefix, @DemoSource, @SuppressWarnings("serial"), VerticalLayout) and is registered in ChipfieldDemoView.
  • The pom.xml 2.8.0-SNAPSHOT hunk only reflects the older merge-base; that bump is already on master.

Non-blocking observation (not a defect in this change): paper-input-container hides the non-floating label based on the input text only, not on the presence of chips, so a non-empty label combined with pre-existing chips can overlay the chip prefix until the user types. The demo sidesteps this by using an empty label and letting the FormLayout form item carry it, and the javadoc describes the behavior accurately, so this appears intentional.

🤖 Generated with Claude Code

@javier-godoy

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@javier-godoy
javier-godoy marked this pull request as ready for review August 31, 2026 17:52
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@paodb paodb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paodb
paodb merged commit ed0bcca into master Sep 1, 2026
6 of 7 checks passed
@paodb
paodb deleted the feat-89 branch September 1, 2026 12:54
@github-project-automation github-project-automation Bot moved this from To Do to Pending release in Flowing Code Addons Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending release

Development

Successfully merging this pull request may close these issues.

2 participants