-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Create accordion.html.twig #103
Conversation
I did not expect this to happen... ;-) I assume this is because of the added lock files from the last commit. same goes for the other PR I suggested #104 |
Nah. My mistake. I committed composer.lock which was created with PHP 8.1 - I'll check that tomorrow |
Sorry for that, can you please merge master into your branches |
Done |
And one last sorry for forgetting to come back to this PR. |
Sorry for the long delay. I have added the required docs. |
Updated docs for this PR too. |
I was about to do it, need that component 👍 |
@cavasinf the best review is using the component, could you give it a try already? |
Co-authored-by: Kevin Papst <kevinpapst@users.noreply.github.com>
Co-authored-by: Kevin Papst <kevinpapst@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tweaking+ Reformatting the doc
<button class="accordion-button {% if loop.first == false %}collapsed{% endif %}" | ||
type="button" data-bs-toggle="collapse" data-bs-target="#{{ _id_collapse }}" | ||
aria-expanded="true"> | ||
{% if _raw == true %}{{ item.title | raw }}{% else %}{{ item.title }}{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wucherpfennig what's happening if there is no title
with the item ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not check for that as a accordion without a title
is kind of useless ;-)
we could "normalize" the title in order to have always some content (either the content or some "dummy title")
{% set _item_body_extraClass = item.options.body_extraClass ?? '' %} | ||
<div class="accordion-item {{ _item_extraClass }}"> | ||
<div class="accordion-header {{ _item_title_extraClass }}" id="{{ _id }}-heading-{{ loop.index }}"> | ||
<button class="accordion-button {% if loop.first == false %}collapsed{% endif %}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is item open
should be an item option, not if not first loop.
Examples:
- I want to have the second accordion item to be opened when arriving in the page.
- Or none of them
@kevinpapst I'm in holidays RN, only thing I can do is "check by eye" and test it next Monday. |
Co-authored-by: CavasinF <cavasinf.info@gmail.com>
Co-authored-by: CavasinF <cavasinf.info@gmail.com>
I did some minor updates, especially changing underscore to camelcase and reformatting of the markdown table and examples |
I've already suggested a DOC update, but it is outdated now 😢 |
I've seen that (thanks 😄 ) - but it was impossible to read, as it was so long and Github rendered it awfully, no chance to understand changes. |
Hey guys what do I need to do to help you? (Writing better code in the first place is not an option 😉) |
@wucherpfennig you could update to use my latest changes and then check the comments by @cavasinf I haven't done a demo implementation yet, I will do that soon and provide feedback afterwards. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Oh come on... tbh I do not know what else I should do ;-) |
LGTM now 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll merge, add a demo page and check if everything works as expected.
Thanks @wucherpfennig 😄
Description
Add accordion component. see #99
Types of changes
Checklist