Skip to content

Make hint work like label and input#21

Merged
koppen merged 5 commits intomainfrom
hint
Aug 15, 2025
Merged

Make hint work like label and input#21
koppen merged 5 commits intomainfrom
hint

Conversation

@koppen
Copy link
Copy Markdown
Member

@koppen koppen commented Aug 15, 2025

No description provided.

koppen added 4 commits August 15, 2025 14:13
This brings Flowbite::Input::Hint in line with how
Flowbite::Input::Label works.
This changes the behavior and implementation of
Flowbite::InputField#hint to be in line with #label and #input.
This is simpler and more consistent with the naming conventions we use
in the other components.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the hint component to work more consistently with label and input components by accepting content through a block rather than a parameter, and standardizing how options are passed.

  • Refactored Flowbite::Input::Hint to accept content through a block instead of a hint parameter
  • Updated all hint usage across input field components to use the new hash-based format with {content: "text"}
  • Standardized options passing from hint_attributes to options parameter

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/components/flowbite/input/hint.rb Core hint component refactored to accept content via block and use options parameter
app/components/flowbite/input_field.rb Updated to use new hint format with content extraction and options merging
app/components/flowbite/input_field/checkbox.rb Updated hint rendering to use new component API
app/components/flowbite/input_field/radio_button.rb Updated hint rendering to use new component API
test/components/input/hint_test.rb Updated tests to use block-based content and new options parameter
test/components/flowbite/input_field_test.rb Updated tests to use new hash-based hint format
test/components/input_field/*.rb Updated test files to use new hint format
demo/test/components/previews/input_field_preview.rb Updated preview to use new hint format

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@koppen koppen requested review from RasmusDWN and olepalm August 15, 2025 12:17
@koppen koppen merged commit 8d3dbc8 into main Aug 15, 2025
5 checks passed
@koppen koppen deleted the hint branch August 15, 2025 13:02
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.

3 participants