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

Fix accordions behavior #420

Merged
merged 2 commits into from
Nov 15, 2023
Merged

Fix accordions behavior #420

merged 2 commits into from
Nov 15, 2023

Conversation

torrocus
Copy link
Member

Pull Request Summary

Recently we have noticed that some accordions are not behaving correctly. @ania-hm discovered that what makes them stand out is that their slug name of projects contain a dot. This allowed us to understand the cause of the problem. Adding a dot to the name meant that data-bs-target and id probably didn't match. We changed our views a bit because a slug containing a dot is valid.

Feedback

N/A

UI Changes

N/A

Bootstrap accordion stops working [1]
if `data-bs-toggle` contains a name with a dot.
Our project slug names contain dots.
However, we don't need to use a slug here.
We have a unique index at our disposal.

Changing data-bs-toggle and id restores accordion functionality.

[1]: https://getbootstrap.com/docs/5.3/components/accordion/
I added these two tests to clearly show
that the Project model will be validable
with slugs both without and with dots.
@torrocus torrocus added the bug Something isn't working label Nov 15, 2023
@torrocus torrocus requested a review from ania-hm November 15, 2023 07:58
@torrocus torrocus merged commit 307a671 into main Nov 15, 2023
11 checks passed
@torrocus torrocus deleted the al-fix-accordions-behavior branch November 15, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants