Native Inserter: Improve ordering of blocks and more#206
Conversation
| * Optimized for mobile usage patterns where users frequently create content | ||
| * with text, media from device cameras, and visual formatting. | ||
| */ | ||
| const MOST_USED_BLOCKS = [ |
There was a problem hiding this comment.
Feedback on MOST_USED_BLOCKS and BLOCK_ORDER_BY_CATEGORY is welcome.
I expect to refine it further in the scope of CMM-915: Add first-class support for Jetpack blocks.
There was a problem hiding this comment.
Thanks for the links!
devOnly( code ), – this could be interesting. I added CMM-917: Show core/code block only for developers.
dcalhoun
left a comment
There was a problem hiding this comment.
Tested well for me. Feels really good.
| * Optimized for mobile usage patterns where users frequently create content | ||
| * with text, media from device cameras, and visual formatting. | ||
| */ | ||
| const MOST_USED_BLOCKS = [ |
| Text(name) | ||
| .font(.headline) | ||
| .foregroundStyle(Color.secondary) | ||
| .padding(.leading, padding) | ||
| .frame(maxWidth: .infinity, alignment: .leading) |
There was a problem hiding this comment.
WDYT about making the semantics of this element a heading? It could be convenient when navigating via VoiceOver.
There was a problem hiding this comment.
I'm going to keep track of accessibly issues in CMM-916: Improve accessibility and address them at the end. Thanks!
* Add support for block variants * Rename BlockType * Capitlize ID * Update src/components/native-block-inserter-button/index.jsx Co-authored-by: David Calhoun <github@davidcalhoun.me> * Native Inserter: Improve ordering of blocks and more (#206) * Add a note about serializeBlocksForNative * Remove now redundant core/missing check * Move ordering to the JS land * Further refactoring * Pass displayName for Text * Localize categories * Extend most used blocks * Add gbk-most-used as a separate section * Add support for disabling blocks * Collapse long sections * Update the order of embeds * Fix linter errors --------- Co-authored-by: David Calhoun <github@davidcalhoun.me>
* Implement block insertion * Load bridge only if enabled * Refactor the component that handles insertion * Fix inserter not working when selected from tilte * Fix an issue with editor not restoring focus when block inserter is dismissed * Fix order of inserts * Native Inserter: Add support for block variants (#204) * Add support for block variants * Rename BlockType * Capitlize ID * Update src/components/native-block-inserter-button/index.jsx Co-authored-by: David Calhoun <github@davidcalhoun.me> * Native Inserter: Improve ordering of blocks and more (#206) * Add a note about serializeBlocksForNative * Remove now redundant core/missing check * Move ordering to the JS land * Further refactoring * Pass displayName for Text * Localize categories * Extend most used blocks * Add gbk-most-used as a separate section * Add support for disabling blocks * Collapse long sections * Update the order of embeds * Fix linter errors --------- Co-authored-by: David Calhoun <github@davidcalhoun.me> --------- Co-authored-by: David Calhoun <github@davidcalhoun.me>
What?
Closes CMM-875: Establish the mobile-specific order for blocks.
How?
isDisabled)core/missingblock support (no longer needed since Native Inserter: Implement block insertion #199)MOST_USED_BLOCKSsection (gbk-most-used)Screenshots or screencast
Note: screenshots are pre #205