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

FAQ Block Patterns: Reevaluating the Use of Vanilla JS Assets #7

Open
alexdeborba opened this issue Oct 15, 2023 · 0 comments
Open
Assignees
Labels
[Component] Block Patterns Issues related to pre-designed content sections. [Type] Enhancement Suggested improvements or new features.

Comments

@alexdeborba
Copy link
Collaborator

Describe the bug

The recent Vanilla JS update in the Alpha 2 version has led to the FAQs accordion displaying in an expanded state, negating its collapsible functionality. While I would not label this as a bug, given our ongoing theme refinements, the FAQs Block Pattern does necessitate a unique method for its Vanilla JS assets loading.

To Reproduce

Steps to reproduce the behavior:

  1. In the admin dashboard, navigate to and open any pre-existing template page.
  2. In the admin dashboard, click on the + icon located on the left side of the top bar. From the dropdown, select Patterns.
  3. Choose the FAQ category and click on the desired pattern to insert it into your template page.
  4. After inserting the pattern, make sure to save the page.
  5. Once saved, view it on the frontend. You will notice that the accordion functionality is not working as expected.

Expected behavior

The anticipated behavior would be for the accordion to load in a closed state, giving users the option to click and expand its content. However, this functionality seems to have been disrupted and is not operating as intended.

Screenshots

FAQs Pattern

Additional context

I recommend that we closely monitor the ongoing issue in the Gutenberg repository. Once the native Accordion Block is integrated into the WordPress Core, it will be prudent for us to reassess our approach to the FAQs Block Patterns. By leveraging the core's built-in Accordion Block, we can align our theme more closely with core functionalities, eliminating the need to load our own JavaScript asset for this specific feature.

@alexdeborba alexdeborba added [Type] Enhancement Suggested improvements or new features. [Component] Block Patterns Issues related to pre-designed content sections. labels Oct 15, 2023
@alexdeborba alexdeborba added this to the 1.0.0-pre-alpha.2 milestone Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Block Patterns Issues related to pre-designed content sections. [Type] Enhancement Suggested improvements or new features.
Projects
None yet
Development

No branches or pull requests

3 participants