Implement FAQ component

Created on 23 February 2025, about 1 month ago
๐Ÿ“Œ Task
Status

Active

Component

Olivero

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States mherchel Gainesville, FL, US

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @mherchel
  • Working on this at Florida Drupal Camp!

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia pameeela

    Should we call this something generic like Accordion? FAQ seems like a use case rather than a name for the component. But I havenโ€™t checked what is more common.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mherchel Gainesville, FL, US

    Should we call this something generic like Accordion

    makes sense to me! Updating title

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore

    vasantha deepika โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore

    I have created the Accordion component, but a few improvements are still needed. I am actively working on them.
    Please review it and share your suggestions, as they would be very helpful.

    Thanks!

  • Pipeline finished with Success
    about 1 month ago
    Total: 782s
    #435585
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    Using the html element will negate the need for JavaScript to make the accordion work.

    Here is a good blog about it.

    https://developer.mozilla.org/en-US/blog/html-details-exclusive-accordions/

    I assume there is some kind of component is that could be used for the unique name.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore

    Thanks for the feedback Jim Birch!
    Iโ€™ll review the approach using the element and update the component accordingly.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mherchel Gainesville, FL, US

    @grifstuf was working on this at FLDC (see the first comment). I know he had code written, but not sure why it's not pushed.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia pameeela

    Added the design to the IS, note that I've removed the CTA link because this won't work well in XB currently, with the restricted width that we have. So for simplicity let's leave it out for now.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia pameeela

    Wrong file! Actually updated now :)

  • Pipeline finished with Failed
    about 1 month ago
    Total: 893s
    #436393
  • Pipeline finished with Failed
    about 1 month ago
    Total: 765s
    #436433
  • Pipeline finished with Success
    about 1 month ago
    Total: 904s
    #436443
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore

    Thank you for the new design update! I have updated the MR based on the new design. Additionally, @mherchel, I have used the element for the accordion.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    Thanks @vasantha deepika! For future reference, if you'd like someone else to review your work, please change the issue status to "Needs review" -- that'll ensure that other eyes get on it. :)

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    @mherchel What do you think of the approach in:

    https://developer.mozilla.org/en-US/blog/html-details-exclusive-accordions/

    If not, I believe this is going to need JavaScript to work.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia pameeela

    Did a quick review of the actual components and left comments. Note though the CSS also needs a review.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore

    Thank you for the review! I'am currently looking into them and working on fixes.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 844s
    #440420
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore

    I've addressed all the comments and updated the MR accordingly. Moving the issue for review. Let me know if any further changes are needed!

  • Pipeline finished with Canceled
    about 1 month ago
    Total: 182s
    #440449
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 71s
    #440453
  • Pipeline finished with Canceled
    about 1 month ago
    Total: 3249s
    #440454
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1155s
    #440492
  • Pipeline finished with Success
    about 1 month ago
    Total: 873s
    #440529
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States phenaproxima Massachusetts

    Assigning to @pameeela for review.

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia rikki_iki Melbourne
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore
  • Pipeline finished with Failed
    20 days ago
    Total: 420s
    #450328
  • Pipeline finished with Canceled
    20 days ago
    Total: 226s
    #450336
  • Pipeline finished with Failed
    20 days ago
    Total: 1009s
    #450339
  • Pipeline finished with Failed
    19 days ago
    Total: 915s
    #450861
  • Pipeline finished with Failed
    19 days ago
    Total: 670s
    #450886
  • Pipeline finished with Failed
    19 days ago
    Total: 1078s
    #450924
  • Pipeline finished with Failed
    19 days ago
    Total: 911s
    #451030
  • Pipeline finished with Failed
    19 days ago
    Total: 558s
    #451043
  • Pipeline finished with Canceled
    18 days ago
    Total: 573s
    #452234
  • Pipeline finished with Failed
    18 days ago
    Total: 615s
    #452239
  • Pipeline finished with Failed
    13 days ago
    Total: 311s
    #455864
  • Pipeline finished with Failed
    13 days ago
    Total: 989s
    #455871
  • Pipeline finished with Success
    13 days ago
    Total: 1133s
    #455908
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vasantha deepika Coimbatore

    hi @rikki_iki,

    I've reviewed all the commands you added in the Merge Request and resolved them accordingly. The MR has been updated and is now ready for review. Please let me know if any further changes are required.

    Thanks!

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States thejimbirch Cape Cod, Massachusetts

    This looks good to me today and all comments resolved. Marking as RTBC.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mherchel Gainesville, FL, US

    Overall this is looking good. There's a couple issues:

    1. The content area within the accordion items should be a slot, since it will accept arbitrary markup (and possibly other components)
    2. We should be using CSS nesting
    3. Need to use CSS logical properties for proper RTL support

    I'm in the DrupalCon contrib room right now, so going to work on this.

  • Pipeline finished with Failed
    11 days ago
    Total: 392s
    #458120
  • Pipeline finished with Failed
    11 days ago
    Total: 889s
    #458134
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mherchel Gainesville, FL, US

    This should be good to go!

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mherchel Gainesville, FL, US

    I tested this by using the following snippet in the page.html.twig

                  {% embed 'drupal_cms_olivero:accordion' with {
                    title: 'This is the main heading',
                    description: 'This is a long description.This is a long description.This is a long description.This is a long description. ',
                  } only %}
                    {% block items %}
                      {% embed 'drupal_cms_olivero:accordion-item' with {
                        title: 'Accordion item headingAccordion item headingAccordion item headingAccordion item headingAccordion item heading',
                      } only %}
                        {% block accordion_content %}
                        Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam, veniam, sint facilis pariatur hic iste dignissimos rerum possimus, totam architecto qui quos molestiae incidunt voluptatibus fugiat omnis nihil rem eum!
                        {% endblock %}
                      {% endembed %}
    
                      {% embed 'drupal_cms_olivero:accordion-item' with {
                        title: 'Accordion item heading',
                      } only %}
                        {% block accordion_content %}
                        Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam, veniam, sint facilis pariatur hic iste dignissimos rerum possimus, totam architecto qui quos molestiae incidunt voluptatibus fugiat omnis nihil rem eum!
                        {% endblock %}
                      {% endembed %}
    
                      {% embed 'drupal_cms_olivero:accordion-item' with {
                        title: 'Accordion item heading',
                      } only %}
                        {% block accordion_content %}
                        Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam, veniam, sint facilis pariatur hic iste dignissimos rerum possimus, totam architecto qui quos molestiae incidunt voluptatibus fugiat omnis nihil rem eum!
                        {% endblock %}
                      {% endembed %}
    
                      {% embed 'drupal_cms_olivero:accordion-item' with {
                        title: 'Accordion item heading',
                      } only %}
                        {% block accordion_content %}
                        Lorem ipsum dolor sit amet consectetur adipisicing elit. Nam, veniam, sint facilis pariatur hic iste dignissimos rerum possimus, totam architecto qui quos molestiae incidunt voluptatibus fugiat omnis nihil rem eum!
                        {% endblock %}
                      {% endembed %}
    
                    {% endblock %}
                  {% endembed %}
    
  • Pipeline finished with Failed
    11 days ago
    #458147
  • I think this is fine, I tested in my local and it works, although I had to tweak the example above a bit. In a future iteration it should be polished and CSS hardcoded values replaced by variables. I also tested with VoiceOver and elements are announced correctly.

    Screenshot attached.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States kwiseman

    Added Atlanta2025 tag and parent issue like other component implementation issues.

  • @pdureau left some feedback at #3515766 ๐Ÿ“Œ Create "statistics" component for Olivero in Drupal CMS Active that's also relevant for this component, I can help adjusting this component as well, let me know if I should work on this too.

Production build 0.71.5 2024