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

Editor: Add Semantic Headings to the right click menu of Text Elements #12062

Merged
merged 11 commits into from
Aug 8, 2022

Conversation

timarney
Copy link
Contributor

@timarney timarney commented Aug 2, 2022

Context

Within the right click menu of a text element on the page, there should be a new item called Heading Level
This Heading Level item should have a submenu that shows the following properties (along with the one currently selected):

  • Automatic (xyz) (stored as auto)
  • Heading 1 (stored as h1)
  • Heading 2 (stored as h2)
  • Heading 3 (stored as h3)
  • Paragraph (stored as p)

Summary

Adds right click menu for heading level to text elements.

Screen Shot 2022-08-03 at 5 39 10 AM

Relevant Technical Choices

To-do

User-facing changes

Testing Instructions

  • This is a non-user-facing change and requires no QA

This PR can be tested by following these steps:

  1. Add a text element to the canvas
  2. Right click the element
  3. Select Heading Level from the Right Click Menu.
  4. Select a new heading level from the sub menu and note that it gets selected when click
  5. Verify the style panel heading level matches what is selected from the Right Click Menu.
  6. Set the heading level to Automatic - note that the "current" tag name is noted for the "Automatic" option

Reviews

Does this PR have a security-related impact?

Does this PR change what data or activity we track or use?

Does this PR have a legal-related impact?

Checklist

  • This PR addresses an existing issue and I have linked this PR to it in ZenHub
  • I have tested this code to the best of my abilities
  • I have verified accessibility to the best of my abilities (docs)
  • I have verified i18n and l10n (translation, right-to-left layout) to the best of my abilities
  • This code is covered by automated tests (unit, integration, and/or e2e) to verify it works as intended (docs)
  • I have added documentation where necessary
  • I have added a matching Type: XYZ label to the PR

Fixes #11402

@timarney timarney self-assigned this Aug 3, 2022
@timarney timarney added Elements: Text NewsCorp Package: Story Editor /packages/story-editor Type: Enhancement New feature or improvement of an existing feature labels Aug 3, 2022
@timarney timarney marked this pull request as ready for review August 4, 2022 08:49
@timarney timarney requested a review from miina August 4, 2022 08:49
@googleforcreators-bot
Copy link
Collaborator

googleforcreators-bot commented Aug 4, 2022

Plugin builds for ceadaa2 are ready 🛎️!

Copy link
Contributor

@miina miina left a comment

Choose a reason for hiding this comment

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

LGTM!

Would be nice to add this to the Storybook as well for the text element, to keep it up to date.

@timarney
Copy link
Contributor Author

timarney commented Aug 4, 2022

Story added.

Screen Shot 2022-08-04 at 7 36 22 AM

@timarney timarney merged commit 8c5fbd0 into main Aug 8, 2022
@timarney timarney deleted the fix/11402-rcm-heading-levels branch August 8, 2022 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Elements: Text Package: Story Editor /packages/story-editor Type: Enhancement New feature or improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor: Add Semantic Headings to the right click menu of Text Elements
4 participants