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

Feat: Extra field wrapper attributes #12782

Merged
merged 20 commits into from
May 16, 2024

Conversation

atmonshi
Copy link
Contributor

@atmonshi atmonshi commented May 14, 2024

New Method: extraFieldWrapperAttributes, for more fields customization without the need for publishing the views.

Description

the new method extraFieldWrapperAttributes will allow to add classes to thefield-wrapper. my use case it to highlight some fields by custom CSS.

all other extra*Attributes will only applies to the input itself

Visual changes:

Screenshots:

  • with extra*Attributes:
    Screenshot_2024-05-13_110915

  • with extraFieldWrapperAttributes:
    Screenshot_2024-05-13_105903

Usage:

TextInput::make('name')
    ->extraFieldWrapperAttributes(['class' => 'components-locked'])

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.

@danharrin danharrin added the enhancement New feature or request label May 15, 2024
@danharrin danharrin added this to the v3 milestone May 15, 2024
@danharrin danharrin self-assigned this May 15, 2024
@atmonshi atmonshi requested a review from danharrin May 15, 2024 10:54
Copy link
Member

@danharrin danharrin left a comment

Choose a reason for hiding this comment

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

Please do the same for the infolist entry wrapper, and remove the changes to composer.lock

@atmonshi
Copy link
Contributor Author

Please do the same for the infolist entry wrapper, and remove the changes to composer.lock

all done 👍, and revert composer.lock

@atmonshi atmonshi requested a review from danharrin May 15, 2024 12:30
@danharrin danharrin merged commit e8190c9 into filamentphp:3.x May 16, 2024
5 of 10 checks passed
@danharrin
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants