Skip to content

Moved anonymous box blade components into their own directory#18471

Merged
snipe merged 1 commit intodevelopfrom
move-box-blades-into-own-directory
Jan 22, 2026
Merged

Moved anonymous box blade components into their own directory#18471
snipe merged 1 commit intodevelopfrom
move-box-blades-into-own-directory

Conversation

@snipe
Copy link
Copy Markdown
Member

@snipe snipe commented Jan 22, 2026

This just moves the blade components that handle bootstrap boxes into their own directory.

@snipe snipe added the 🤜💥🤛 code-improvements Code structure improvements that should not change functionality label Jan 22, 2026
@snipe snipe merged commit 7f67f8c into develop Jan 22, 2026
8 checks passed
@snipe snipe deleted the move-box-blades-into-own-directory branch January 22, 2026 15:44
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

FWIW, naming this file index.blade.php would clean up the usage. Instead of remembering that the word "container" is the wrapper that has to be used in markup (<x-box.container>) devs would use <x-box> like we had before.

https://laravel.com/docs/11.x/blade#index-components

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's not really an index though, so it sort of doesn't make sense to call it that

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

(The whole point of these changes is that we shouldn't have to remember what the class markups are called.)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"index" is the naming convention Laravel uses for the entry point of the component. (I think something like _.blade.php would make that clearer but they went with index)

Using their example of a card component, by following the convention and having an card/index.blade.php instead of card/card.blade.php devs are able to use <x-card> instead of <x-card.card> which is equivalent to <x-box> instead of <x-box.container> in our application.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I get that, but I still don't like it, since it doesn't really make sense, and I prefer things that are clearer versus magically knowing conventions (which Laravel can decide to change at any point). It's not really important though. I'll fix it at some point later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤜💥🤛 code-improvements Code structure improvements that should not change functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants