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

bugfix/KAD-3960 #649

Merged
merged 2 commits into from
Jan 17, 2025
Merged

bugfix/KAD-3960 #649

merged 2 commits into from
Jan 17, 2025

Conversation

gilbert-hernandez
Copy link
Contributor

🎫 #[Jira Ticket]
https://stellarwp.atlassian.net/browse/KAD-3960
...

Checklist

  • I have performed a self-review.
  • No unrelated files are modified.
  • No debugging statements exist (Ex: console.log, error_log).
  • There are no warnings or notices in the wordpress error log.
  • Passes all tests (linting, acceptance, & unit)

Block specific checklist (where relevant)

  • Tested with an existing instance of this block .
  • Tested creating a new instance of this block.
  • Tested with Dynamic content & Elements.

@gilbert-hernandez
Copy link
Contributor Author

WordPress adds the following CSS to the editor through wp-admin/load-styles.php.
:where(.editor-styles-wrapper) ol ul, :where(.editor-styles-wrapper) ul ul { list-style-type: revert; }
This fix adds the CSS to the TOC's style so the submenu list style matches the editor.

Copy link
Contributor

@oakesjosh oakesjosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to avoid changing how content appears for existing blocks if we can.

I think a nice approach would be to change the default editor styles to match the front end. Since the customer is wanting a different style for the bullets, we can add a List style type dropdown in the with some of the common values from here.

@gilbert-hernandez
Copy link
Contributor Author

gilbert-hernandez commented Jan 17, 2025

@oakesjosh
I updated the backend to match the frontend instead. I then realized that there are already options to "Select a List Style" on the block toolbar in Gutenberg. There are settings for "Numbered", "Bullets", and "None". If we wanted to add additional styles, I would need to import one of the Kadence icons like the other options, and add CSS classes for the submenus.

However, the updated changes move the CSS to the editor so that it will display as disc by default instead of reverting. I'm wondering if I should try to add a few more styles (like upper/lower alpha/roman. I think this update solves the issue in the JIRA ticket, so I'm thinking making feature requests for additional styles instead?

@oakesjosh
Copy link
Contributor

@gilbert-hernandez I think that's good to address in a different ticket, if we decide to.

@oakesjosh oakesjosh merged commit a922608 into master Jan 17, 2025
20 checks passed
@oakesjosh oakesjosh deleted the bugfix/KAD-3960 branch January 17, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants