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

Added bootstrap5 class form-select #5327

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

makss
Copy link
Contributor

@makss makss commented Sep 27, 2023

WHY

BEFORE - What was wrong? What was happening before this PR?

After switching to bootstrap5, the design of the <select> field was broken.

In the <select> field need to add the form-select class by default. https://getbootstrap.com/docs/5.0/forms/select/

AFTER - What is happening after this PR?

The <select> field design will be restored.

@welcome
Copy link

welcome bot commented Sep 27, 2023

BOOM! Your first PR with us, thank you so much! Someone will take a look at it shortly.

Please keep in mind that:

  • if this constitutes a breaking change, it might take quite a while for this to get merged; we try to emulate the Laravel release cycle as much as possible, so developers can upgrade both software once; this means a new big release every ~6 months;
  • even if it's a non-breaking change, it might take a few days/weeks for the PR to get merged; unless it's a no-brainer, we like to have some community feedback on new features, before we merge them; this leads to higher-quality code, in the end; we learnt this the hard way :-)
  • not all PRs get merged; sometimes we just have to hold out new features, to keep the packages lean; sometimes we don't include features that only apply to niche use cases;
  • we're not perfect; if you think we're wrong, call us out on it; but in a kind way :-) we all make mistakes, best we learn from them and build better software together;

Thank you!

--
Justin Case
The Backpack Robot

@pxpm pxpm added Minor Bug A bug that happens only in a very niche or specific use case. Priority: MUST labels Sep 28, 2023
@pxpm pxpm self-assigned this Sep 28, 2023
@pxpm
Copy link
Contributor

pxpm commented Sep 28, 2023

Hey @makss thanks for the PR, really appreciated.

I could identify the issue, but unfortunately your solution is a breaking change. (it would break BS4 themes, like coreuiv2).

We can make it non-breaking if we provide both classes as defaults: @include('crud::fields.inc.attributes', ['default_class' => 'form-select form-control'])

Willing to do the change or want me to take this to the finish ?

Cheers

@makss
Copy link
Contributor Author

makss commented Sep 28, 2023

I added form-control class to my pull request.

Yesterday I tested it on my modified theme and <select class="form-control form-select" multiple="" ...> did not work correctly. Today I checked on page https://demo.backpackforlaravel.com/admin/article/1022/edit - everything is fine. This means the problem is in my modified theme.

@pxpm pxpm merged commit 87905eb into Laravel-Backpack:main Jan 19, 2024
1 check passed
@pxpm
Copy link
Contributor

pxpm commented Jan 19, 2024

thanks @makss sorry it took me some time to get back here.

Cheers 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Bug A bug that happens only in a very niche or specific use case. Priority: MUST
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants