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

Feature: Allow TextColumn size property to apply when badge() is used #15490

Closed

Conversation

moaazmf90
Copy link

Description

TextColumn's size() property was not taking effect when badge() was applied. This happened because badge() and size() are handled as different components.

Now, the size() property will correctly apply, even when badge() is used. the extras TextColumnSize::ExtraSmall is set as default as it is right now with one size.

      Tables\Columns\TextColumn::make('priority.name')
                    ->badge()
                    ->color(fn($record) => Color::hex($record->priority->color))
                    ->size(TextColumnSize::Large)

Visual changes

Screenshot 2025-01-30 033235

Functional changes

  • ✅ Code style has been fixed by running the composer cs command.
  • ✅ Changes have been tested to not break existing functionality.
  • ❌ Documentation is up-to-date.

TextColumn's `size()` property was not taking effect when `badge()` was applied.
This happened because `badge()` and `size()` are handled as different components.

Now, the `size()` property will correctly apply, even when `badge()` is used.
the extras TextColumnSize::ExtraSmall is set as default as it is right now with one size.
@moaazmf90 moaazmf90 changed the title Fix: TextColumn size property not applying when badge() is used Feature: TextColumn size property not applying when badge() is used Jan 31, 2025
@moaazmf90 moaazmf90 changed the title Feature: TextColumn size property not applying when badge() is used Feature: Allow TextColumn size property to apply when badge() is used Jan 31, 2025
@danharrin
Copy link
Member

Hi, please check out our contributing guide which talks about proposing the feature before submitting the PR, to ensure you aren't spending time building something that we won't merge.

This change to make badge font sizes larger does not currently fit with our design system. However, you can change this with CSS in your theme file. Sorry!

@danharrin danharrin closed this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants