-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Rich text: only consider a format active if active at every selected index #48789
Conversation
Size Change: +267 B (0%) Total Size: 1.34 MB
ℹ️ View Unchanged
|
Flaky tests detected in 42c8102. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4346189616
|
I will have to review |
I tested this change in the native version and works as expected. However, I'm not sure if I'm covering all the functionality. @ellatrix I'm wondering if we could add instructions to the Testing Instructions section , WDYT? Sharing a video capture of the test I did on an iOS simulator. Observe the format active in the toolbar at the bottom when selecting text.
|
@fluiddot Added instructions. Idk, it's good to play around with formatting and check if everything works as expected. Recordings are looking great. |
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 tested this and it preserved the original work on core/link
and also covers the other scenarios I tested with bold and italic. I even tried mixing up links, bold, italic and cross selecting. All worked as I would expect. Thank you.
@ellatrix This looks good to go no? |
Yes, sorry, was AFK. |
What?
Currently we consider all formats at the start index as active formats. It seems to make more sense to check if it's active at every selected index, which is why an exception was made for link. This PR changes it for all other formats.
The current behaviour we have was taken directly from TinyMCE and CKEditor, while this new behaviour is what Google Docs does.
Why?
To remove inconsistencies and exceptions for the link format.
How?
Testing Instructions
Generally make sure formatting works as expected.
Testing Instructions for Keyboard
Screenshots or screencast