Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(radio-group): hlm-radio component and fix card styles #556

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

marcjulian
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Which package are you modifying?

  • accordion
  • alert
  • alert-dialog
  • aspect-ratio
  • avatar
  • badge
  • button
  • calendar
  • card
  • checkbox
  • collapsible
  • combobox
  • command
  • context-menu
  • data-table
  • date-picker
  • dialog
  • dropdown-menu
  • hover-card
  • icon
  • input
  • label
  • menubar
  • navigation-menu
  • pagination
  • popover
  • progress
  • radio-group
  • scroll-area
  • select
  • separator
  • sheet
  • skeleton
  • slider
  • sonner
  • spinner
  • switch
  • table
  • tabs
  • textarea
  • toast
  • toggle
  • tooltip
  • typography

What is the current behavior?

Closes #246

Card styles are incorrect, because of inline styles on the label in brn-radio

CleanShot 2025-01-13 at 10 55 58

What is the new behavior?

  • Card styles are correctly working with removed inline styles from label.
    CleanShot 2025-01-13 at 10 42 50
  • Replaces hlm-radio.directive.ts with hlm-radio.component.ts
  • Add data-slot to brn-radio to target label and indicator-div with styles
  • Update card styles to use data-slot=label

Does this PR introduce a breaking change?

  • Yes
  • No

Replaces hlm-radio.directive.ts with hlm-radio.component.ts and changes the markup

<hlm-radio-group>
- <brn-radio hlm value="16.1.4">
+ <hlm-radio value="16.1.4">
    <hlm-radio-indicator indicator />
    v16.1.4
- </brn-radio>
+ </hlm-radio>
</hlm-radio-group>

Other information

@goetzrobin
Copy link
Collaborator

I wonder how much effort it would be to write a @ashley-hunter -esque migration for this.
@marcjulian would you be willing to take a shot at that or should I take a look?

@ashley-hunter
Copy link
Collaborator

It should be fairly easy, I believe we had a similar migration for icons, but if anyone wants any help, just let me know!

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.

RFC: Radio Groups as card layouts
3 participants