bootstrap-ruby / bootstrap_form

Official repository of the bootstrap_form gem, a Rails form builder that makes it super easy to create beautiful-looking forms using Bootstrap 5.
MIT License
1.64k stars 351 forks source link

Fix text alignment in alert message when there is no error summary #634

Closed isaac closed 2 years ago

isaac commented 2 years ago

When there is no error summary the alert message is wrapped in a p tag. This causes the message to be misaligned vertically. In the Bootstrap examples where there is single line of text, the text is not wrapped in a p tag: https://getbootstrap.com/docs/5.0/components/alerts/#examples

Screenshots below illustrate the issue.

Before fix:

Before

After fix:

After
lcreid commented 2 years ago

Thanks for catching this, and thanks for the PR. It looks good, but I'd appreciate it if you can fix the test cases so they all pass. Don't worry about the Danger test failing -- there's an issue with Danger on GitHub that doesn't seem to have a solution, but we haven't disabled Danger yet. Sorry.

UweKubosch commented 2 years ago

@isaac Thanks for the PR! Could you fix the one failing test case and rebase against main?

isaac commented 2 years ago

@lcreid @UweKubosch @donv

Sorry for the slow response!

I couldn't find a failing test case - has this already been fixed somewhere else?

donv commented 2 years ago

@isaac Yes, I fixed it 😄

donv commented 2 years ago

Examples in thre README: https://github.com/bootstrap-ruby/bootstrap_form#alert-messages