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

Show insertion point after the last block in a container #28418

Merged
merged 4 commits into from
Jan 27, 2021

Conversation

youknowriad
Copy link
Contributor

@youknowriad youknowriad commented Jan 22, 2021

follow-up to #27860 (merge in the same changelog entry)
closes #28381

After #27860 the insertion point (in between inserter) only shows up between two blocks due to a complex positioning logic (center it properly between blocks both vertically and horizontally), this had the side effect of removing the possibility to show at the end of the block list (for instance by selecting the last block, opening the inserter and hovering a block type).

This PR solves that by considering a potential nullable next element.

There was also another issue where the hovering a block type in the inserter was showing the wrong insertion point indicator.

@youknowriad youknowriad added [Type] Bug An existing feature does not function as intended [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels Jan 22, 2021
@youknowriad youknowriad requested a review from ellatrix as a code owner January 22, 2021 11:32
@youknowriad youknowriad self-assigned this Jan 22, 2021
@github-actions
Copy link

github-actions bot commented Jan 22, 2021

Size Change: -21 kB (-2%)

Total Size: 1.37 MB

Filename Size Change
build/a11y/index.js 1.14 kB -1 B (0%)
build/annotations/index.js 3.77 kB -1 B (0%)
build/autop/index.js 2.83 kB -2 B (0%)
build/block-directory/index.js 9.08 kB -1 B (0%)
build/block-editor/index.js 123 kB +305 B (0%)
build/block-library/blocks/archives/editor-rtl.css 61 B -135 B (-69%) 🏆
build/block-library/blocks/archives/editor.css 60 B -136 B (-69%) 🏆
build/block-library/blocks/audio/editor-rtl.css 58 B -136 B (-70%) 🏆
build/block-library/blocks/audio/editor.css 58 B -136 B (-70%) 🏆
build/block-library/blocks/audio/style-rtl.css 103 B -122 B (-54%) 🏆
build/block-library/blocks/audio/style.css 103 B -122 B (-54%) 🏆
build/block-library/blocks/block/editor-rtl.css 161 B -122 B (-43%) 🎉
build/block-library/blocks/block/editor.css 161 B -122 B (-43%) 🎉
build/block-library/blocks/button/editor-rtl.css 475 B -101 B (-18%) 👏
build/block-library/blocks/button/editor.css 474 B -103 B (-18%) 👏
build/block-library/blocks/button/style-rtl.css 453 B -99 B (-18%) 👏
build/block-library/blocks/button/style.css 451 B -101 B (-18%) 👏
build/block-library/blocks/buttons/editor-rtl.css 227 B -118 B (-34%) 🎉
build/block-library/blocks/buttons/editor.css 227 B -119 B (-34%) 🎉
build/block-library/blocks/buttons/style-rtl.css 297 B -122 B (-29%) 🎉
build/block-library/blocks/buttons/style.css 297 B -122 B (-29%) 🎉
build/block-library/blocks/calendar/style-rtl.css 208 B -111 B (-35%) 🎉
build/block-library/blocks/calendar/style.css 208 B -111 B (-35%) 🎉
build/block-library/blocks/categories/editor-rtl.css 84 B -126 B (-60%) 🏆
build/block-library/blocks/categories/editor.css 83 B -126 B (-60%) 🏆
build/block-library/blocks/categories/style-rtl.css 79 B -129 B (-62%) 🏆
build/block-library/blocks/categories/style.css 79 B -129 B (-62%) 🏆
build/block-library/blocks/code/style-rtl.css 90 B -126 B (-58%) 🏆
build/block-library/blocks/code/style.css 90 B -126 B (-58%) 🏆
build/block-library/blocks/columns/editor-rtl.css 190 B -110 B (-37%) 🎉
build/block-library/blocks/columns/editor.css 190 B -109 B (-36%) 🎉
build/block-library/blocks/columns/style-rtl.css 421 B -108 B (-20%) 🎉
build/block-library/blocks/columns/style.css 421 B -107 B (-20%) 🎉
build/block-library/blocks/cover/editor-rtl.css 392 B -132 B (-25%) 🎉
build/block-library/blocks/cover/editor.css 393 B -129 B (-25%) 🎉
build/block-library/blocks/cover/style-rtl.css 1.25 kB -48 B (-4%)
build/block-library/blocks/cover/style.css 1.25 kB -47 B (-4%)
build/block-library/blocks/embed/editor-rtl.css 486 B -108 B (-18%) 👏
build/block-library/blocks/embed/editor.css 486 B -109 B (-18%) 👏
build/block-library/blocks/embed/style-rtl.css 375 B -114 B (-23%) 🎉
build/block-library/blocks/embed/style.css 375 B -114 B (-23%) 🎉
build/block-library/blocks/file/editor-rtl.css 199 B -115 B (-37%) 🎉
build/block-library/blocks/file/editor.css 198 B -115 B (-37%) 🎉
build/block-library/blocks/file/style-rtl.css 248 B -104 B (-30%) 🎉
build/block-library/blocks/file/style.css 248 B -104 B (-30%) 🎉
build/block-library/blocks/freeform/editor-rtl.css 2.45 kB -98 B (-4%)
build/block-library/blocks/freeform/editor.css 2.45 kB -99 B (-4%)
build/block-library/blocks/gallery/editor-rtl.css 679 B -104 B (-13%) 👏
build/block-library/blocks/gallery/editor.css 679 B -104 B (-13%) 👏
build/block-library/blocks/gallery/style-rtl.css 1.07 kB -106 B (-9%)
build/block-library/blocks/gallery/style.css 1.06 kB -106 B (-9%)
build/block-library/blocks/group/editor-rtl.css 318 B -115 B (-27%) 🎉
build/block-library/blocks/group/editor.css 317 B -115 B (-27%) 🎉
build/block-library/blocks/group/style-rtl.css 57 B -133 B (-70%) 🏆
build/block-library/blocks/group/style.css 57 B -133 B (-70%) 🏆
build/block-library/blocks/heading/editor-rtl.css 129 B -119 B (-48%) 🎉
build/block-library/blocks/heading/editor.css 129 B -119 B (-48%) 🎉
build/block-library/blocks/heading/style-rtl.css 76 B -136 B (-64%) 🏆
build/block-library/blocks/heading/style.css 76 B -136 B (-64%) 🏆
build/block-library/blocks/html/editor-rtl.css 281 B -103 B (-27%) 🎉
build/block-library/blocks/html/editor.css 281 B -104 B (-27%) 🎉
build/block-library/blocks/image/editor-rtl.css 717 B -84 B (-10%) 👏
build/block-library/blocks/image/editor.css 716 B -84 B (-10%) 👏
build/block-library/blocks/image/style-rtl.css 477 B -92 B (-16%) 👏
build/block-library/blocks/image/style.css 478 B -92 B (-16%) 👏
build/block-library/blocks/latest-comments/editor-rtl.css 159 B -118 B (-43%) 🎉
build/block-library/blocks/latest-comments/editor.css 158 B -117 B (-43%) 🎉
build/block-library/blocks/latest-comments/style-rtl.css 269 B -113 B (-30%) 🎉
build/block-library/blocks/latest-comments/style.css 269 B -113 B (-30%) 🎉
build/block-library/blocks/latest-posts/editor-rtl.css 137 B -117 B (-46%) 🎉
build/block-library/blocks/latest-posts/editor.css 137 B -117 B (-46%) 🎉
build/block-library/blocks/latest-posts/style-rtl.css 523 B -111 B (-18%) 👏
build/block-library/blocks/latest-posts/style.css 522 B -112 B (-18%) 👏
build/block-library/blocks/list/editor-rtl.css 65 B -138 B (-68%) 🏆
build/block-library/blocks/list/editor.css 65 B -138 B (-68%) 🏆
build/block-library/blocks/list/style-rtl.css 63 B -138 B (-69%) 🏆
build/block-library/blocks/list/style.css 63 B -138 B (-69%) 🏆
build/block-library/blocks/media-text/editor-rtl.css 191 B -120 B (-39%) 🎉
build/block-library/blocks/media-text/editor.css 191 B -120 B (-39%) 🎉
build/block-library/blocks/media-text/style-rtl.css 535 B -107 B (-17%) 👏
build/block-library/blocks/media-text/style.css 532 B -108 B (-17%) 👏
build/block-library/blocks/more/editor-rtl.css 434 B -111 B (-20%) 🎉
build/block-library/blocks/more/editor.css 434 B -111 B (-20%) 🎉
build/block-library/blocks/navigation-link/editor-rtl.css 392 B -111 B (-22%) 🎉
build/block-library/blocks/navigation-link/editor.css 394 B -110 B (-22%) 🎉
build/block-library/blocks/navigation-link/style-rtl.css 704 B -101 B (-13%) 👏
build/block-library/blocks/navigation-link/style.css 702 B -101 B (-13%) 👏
build/block-library/blocks/navigation/editor-rtl.css 1.38 kB -108 B (-7%)
build/block-library/blocks/navigation/editor.css 1.37 kB -109 B (-7%)
build/block-library/blocks/navigation/style-rtl.css 171 B -118 B (-41%) 🎉
build/block-library/blocks/navigation/style.css 171 B -118 B (-41%) 🎉
build/block-library/blocks/nextpage/editor-rtl.css 395 B -112 B (-22%) 🎉
build/block-library/blocks/nextpage/editor.css 395 B -112 B (-22%) 🎉
build/block-library/blocks/paragraph/editor-rtl.css 109 B -127 B (-54%) 🏆
build/block-library/blocks/paragraph/editor.css 109 B -127 B (-54%) 🏆
build/block-library/blocks/paragraph/style-rtl.css 273 B -119 B (-30%) 🎉
build/block-library/blocks/paragraph/style.css 273 B -119 B (-30%) 🎉
build/block-library/blocks/post-author/editor-rtl.css 209 B -120 B (-36%) 🎉
build/block-library/blocks/post-author/editor.css 209 B -120 B (-36%) 🎉
build/block-library/blocks/post-author/style-rtl.css 183 B -120 B (-40%) 🎉
build/block-library/blocks/post-author/style.css 184 B -119 B (-39%) 🎉
build/block-library/blocks/post-comments-form/style-rtl.css 249 B -109 B (-30%) 🎉
build/block-library/blocks/post-comments-form/style.css 249 B -109 B (-30%) 🎉
build/block-library/blocks/post-content/editor-rtl.css 139 B -123 B (-47%) 🎉
build/block-library/blocks/post-content/editor.css 139 B -123 B (-47%) 🎉
build/block-library/blocks/post-excerpt/editor-rtl.css 73 B -133 B (-65%) 🏆
build/block-library/blocks/post-excerpt/editor.css 73 B -133 B (-65%) 🏆
build/block-library/blocks/post-featured-image/editor-rtl.css 338 B -115 B (-25%) 🎉
build/block-library/blocks/post-featured-image/editor.css 338 B -115 B (-25%) 🎉
build/block-library/blocks/post-featured-image/style-rtl.css 100 B -123 B (-55%) 🏆
build/block-library/blocks/post-featured-image/style.css 100 B -123 B (-55%) 🏆
build/block-library/blocks/preformatted/style-rtl.css 63 B -130 B (-67%) 🏆
build/block-library/blocks/preformatted/style.css 63 B -130 B (-67%) 🏆
build/block-library/blocks/pullquote/editor-rtl.css 183 B -121 B (-40%) 🎉
build/block-library/blocks/pullquote/editor.css 183 B -121 B (-40%) 🎉
build/block-library/blocks/pullquote/style-rtl.css 316 B -112 B (-26%) 🎉
build/block-library/blocks/pullquote/style.css 316 B -112 B (-26%) 🎉
build/block-library/blocks/query-loop/editor-rtl.css 90 B -127 B (-59%) 🏆
build/block-library/blocks/query-loop/editor.css 89 B -127 B (-59%) 🏆
build/block-library/blocks/query-loop/style-rtl.css 315 B -112 B (-26%) 🎉
build/block-library/blocks/query-loop/style.css 317 B -112 B (-26%) 🎉
build/block-library/blocks/query-pagination-numbers/editor-rtl.css 122 B -121 B (-50%) 🏆
build/block-library/blocks/query-pagination-numbers/editor.css 121 B -119 B (-50%) 🏆
build/block-library/blocks/query-pagination/editor-rtl.css 270 B -120 B (-31%) 🎉
build/block-library/blocks/query-pagination/editor.css 262 B -117 B (-31%) 🎉
build/block-library/blocks/query-pagination/style-rtl.css 168 B -120 B (-42%) 🎉
build/block-library/blocks/query-pagination/style.css 168 B -120 B (-42%) 🎉
build/block-library/blocks/query/editor-rtl.css 159 B -120 B (-43%) 🎉
build/block-library/blocks/query/editor.css 160 B -119 B (-43%) 🎉
build/block-library/blocks/quote/editor-rtl.css 61 B -134 B (-69%) 🏆
build/block-library/blocks/quote/editor.css 61 B -134 B (-69%) 🏆
build/block-library/blocks/quote/style-rtl.css 169 B -115 B (-40%) 🎉
build/block-library/blocks/quote/style.css 169 B -116 B (-41%) 🎉
build/block-library/blocks/rss/editor-rtl.css 201 B -106 B (-35%) 🎉
build/block-library/blocks/rss/editor.css 202 B -107 B (-35%) 🎉
build/block-library/blocks/rss/style-rtl.css 290 B -104 B (-26%) 🎉
build/block-library/blocks/rss/style.css 290 B -103 B (-26%) 🎉
build/block-library/blocks/search/editor-rtl.css 165 B -120 B (-42%) 🎉
build/block-library/blocks/search/editor.css 165 B -120 B (-42%) 🎉
build/block-library/blocks/search/style-rtl.css 342 B -112 B (-25%) 🎉
build/block-library/blocks/search/style.css 344 B -112 B (-25%) 🎉
build/block-library/blocks/separator/editor-rtl.css 99 B -130 B (-57%) 🏆
build/block-library/blocks/separator/editor.css 99 B -130 B (-57%) 🏆
build/block-library/blocks/separator/style-rtl.css 236 B -116 B (-33%) 🎉
build/block-library/blocks/separator/style.css 236 B -116 B (-33%) 🎉
build/block-library/blocks/shortcode/editor-rtl.css 504 B -99 B (-16%) 👏
build/block-library/blocks/shortcode/editor.css 504 B -99 B (-16%) 👏
build/block-library/blocks/site-logo/editor-rtl.css 201 B -120 B (-37%) 🎉
build/block-library/blocks/site-logo/editor.css 201 B -120 B (-37%) 🎉
build/block-library/blocks/site-logo/style-rtl.css 117 B -121 B (-51%) 🏆
build/block-library/blocks/site-logo/style.css 117 B -121 B (-51%) 🏆
build/block-library/blocks/social-link/editor-rtl.css 164 B -119 B (-42%) 🎉
build/block-library/blocks/social-link/editor.css 165 B -118 B (-42%) 🎉
build/block-library/blocks/social-links/editor-rtl.css 711 B -100 B (-12%) 👏
build/block-library/blocks/social-links/editor.css 712 B -98 B (-12%) 👏
build/block-library/blocks/social-links/style-rtl.css 1.37 kB -110 B (-7%)
build/block-library/blocks/social-links/style.css 1.37 kB -109 B (-7%)
build/block-library/blocks/spacer/editor-rtl.css 302 B -114 B (-27%) 🎉
build/block-library/blocks/spacer/editor.css 302 B -114 B (-27%) 🎉
build/block-library/blocks/spacer/style-rtl.css 48 B -136 B (-74%) 🏆
build/block-library/blocks/spacer/style.css 48 B -136 B (-74%) 🏆
build/block-library/blocks/subhead/editor-rtl.css 99 B -124 B (-56%) 🏆
build/block-library/blocks/subhead/editor.css 99 B -124 B (-56%) 🏆
build/block-library/blocks/subhead/style-rtl.css 80 B -130 B (-62%) 🏆
build/block-library/blocks/subhead/style.css 80 B -130 B (-62%) 🏆
build/block-library/blocks/table/editor-rtl.css 489 B -104 B (-18%) 👏
build/block-library/blocks/table/editor.css 489 B -104 B (-18%) 👏
build/block-library/blocks/table/style-rtl.css 386 B -115 B (-23%) 🎉
build/block-library/blocks/table/style.css 386 B -115 B (-23%) 🎉
build/block-library/blocks/tag-cloud/editor-rtl.css 118 B -119 B (-50%) 🏆
build/block-library/blocks/tag-cloud/editor.css 118 B -117 B (-50%) 🏆
build/block-library/blocks/tag-cloud/style-rtl.css 94 B -127 B (-57%) 🏆
build/block-library/blocks/tag-cloud/style.css 94 B -127 B (-57%) 🏆
build/block-library/blocks/template-part/editor-rtl.css 680 B -114 B (-14%) 👏
build/block-library/blocks/template-part/editor.css 679 B -115 B (-14%) 👏
build/block-library/blocks/text-columns/editor-rtl.css 95 B -125 B (-57%) 🏆
build/block-library/blocks/text-columns/editor.css 95 B -125 B (-57%) 🏆
build/block-library/blocks/text-columns/style-rtl.css 166 B -117 B (-41%) 🎉
build/block-library/blocks/text-columns/style.css 166 B -117 B (-41%) 🎉
build/block-library/blocks/verse/editor-rtl.css 62 B -132 B (-68%) 🏆
build/block-library/blocks/verse/editor.css 62 B -132 B (-68%) 🏆
build/block-library/blocks/verse/style-rtl.css 87 B -128 B (-60%) 🏆
build/block-library/blocks/verse/style.css 87 B -128 B (-60%) 🏆
build/block-library/blocks/video/editor-rtl.css 504 B -113 B (-18%) 👏
build/block-library/blocks/video/editor.css 503 B -114 B (-18%) 👏
build/block-library/blocks/video/style-rtl.css 193 B -110 B (-36%) 🎉
build/block-library/blocks/video/style.css 193 B -111 B (-37%) 🎉
build/block-library/editor-rtl.css 9.06 kB -140 B (-2%)
build/block-library/editor.css 9.05 kB -137 B (-1%)
build/block-library/index.js 143 kB +240 B (0%)
build/block-library/style-rtl.css 8.61 kB -37 B (0%)
build/block-library/style.css 8.61 kB -45 B (-1%)
build/block-library/theme-rtl.css 748 B -112 B (-13%) 👏
build/block-library/theme.css 748 B -112 B (-13%) 👏
build/block-serialization-default-parser/index.js 1.88 kB +1 B (0%)
build/blocks/index.js 48.3 kB -1 B (0%)
build/components/index.js 275 kB +31 B (0%)
build/compose/index.js 11.2 kB -15 B (0%)
build/core-data/index.js 15.2 kB -1 B (0%)
build/data-controls/index.js 829 B -1 B (0%)
build/data/index.js 8.97 kB +3 B (0%)
build/dom/index.js 4.93 kB -1 B (0%)
build/edit-navigation/index.js 11.1 kB -13 B (0%)
build/edit-post/index.js 306 kB +1 B (0%)
build/edit-widgets/index.js 23.6 kB +3 B (0%)
build/editor/editor-styles-rtl.css 658 B +115 B (+21%) 🚨
build/editor/editor-styles.css 660 B +115 B (+21%) 🚨
build/editor/index.js 41.8 kB +1 B (0%)
build/element/index.js 4.61 kB -1 B (0%)
build/html-entities/index.js 622 B -1 B (0%)
build/is-shallow-equal/index.js 698 B -1 B (0%)
build/media-utils/index.js 5.32 kB +1 B (0%)
build/nux/index.js 3.41 kB +1 B (0%)
build/plugins/index.js 2.54 kB +1 B (0%)
build/priority-queue/index.js 791 B +2 B (0%)
build/redux-routine/index.js 2.84 kB -3 B (0%)
build/shortcode/index.js 1.7 kB +1 B (0%)
build/token-list/index.js 1.27 kB -1 B (0%)
ℹ️ View Unchanged
Filename Size Change
build/api-fetch/index.js 3.4 kB 0 B
build/blob/index.js 665 B 0 B
build/block-directory/style-rtl.css 1.01 kB 0 B
build/block-directory/style.css 1.01 kB 0 B
build/block-editor/style-rtl.css 11.9 kB 0 B
build/block-editor/style.css 11.9 kB 0 B
build/block-library/common-rtl.css 1.01 kB 0 B
build/block-library/common.css 1.01 kB 0 B
build/block-serialization-spec-parser/index.js 3.06 kB 0 B
build/components/style-rtl.css 15.5 kB 0 B
build/components/style.css 15.5 kB 0 B
build/date/index.js 31.8 kB 0 B
build/deprecated/index.js 769 B 0 B
build/dom-ready/index.js 571 B 0 B
build/edit-navigation/style-rtl.css 938 B 0 B
build/edit-navigation/style.css 944 B 0 B
build/edit-post/style-rtl.css 6.51 kB 0 B
build/edit-post/style.css 6.5 kB 0 B
build/edit-site/index.js 24 kB 0 B
build/edit-site/style-rtl.css 4.01 kB 0 B
build/edit-site/style.css 4.01 kB 0 B
build/edit-widgets/style-rtl.css 3.17 kB 0 B
build/edit-widgets/style.css 3.18 kB 0 B
build/editor/style-rtl.css 3.89 kB 0 B
build/editor/style.css 3.89 kB 0 B
build/escape-html/index.js 735 B 0 B
build/format-library/index.js 6.77 kB 0 B
build/format-library/style-rtl.css 637 B 0 B
build/format-library/style.css 639 B 0 B
build/hooks/index.js 2.27 kB 0 B
build/i18n/index.js 3.56 kB 0 B
build/keyboard-shortcuts/index.js 2.53 kB 0 B
build/keycodes/index.js 1.93 kB 0 B
build/list-reusable-blocks/index.js 3.14 kB 0 B
build/list-reusable-blocks/style-rtl.css 629 B 0 B
build/list-reusable-blocks/style.css 628 B 0 B
build/notices/index.js 1.85 kB 0 B
build/nux/style-rtl.css 731 B 0 B
build/nux/style.css 727 B 0 B
build/primitives/index.js 1.42 kB 0 B
build/reusable-blocks/index.js 2.92 kB 0 B
build/rich-text/index.js 13.4 kB 0 B
build/server-side-render/index.js 2.76 kB 0 B
build/url/index.js 3.02 kB 0 B
build/viewport/index.js 1.86 kB 0 B
build/warning/index.js 1.14 kB 0 B
build/wordcount/index.js 1.22 kB 0 B

compressed-size-action

@kevin940726
Copy link
Member

Thanks! Would probably review it next week. Could you also help to uncomment the tests we commented out before? Just want to make sure we pass the tests 😉.

@youknowriad
Copy link
Contributor Author

Could you also help to uncomment the tests we commented out before?

I think the test might have been refactored entirely, can't seem to find them.

@youknowriad
Copy link
Contributor Author

nevermind, I was looking at the wrong test :)

@kevin940726
Copy link
Member

Seems like this test (https://github.com/WordPress/gutenberg/pull/28418/checks?check_run_id=1760742282) is failing for whatever reason 🤔, could you please take a look :) ?

@youknowriad
Copy link
Contributor Author

@kevin940726 It should be fixed now.

@kevin940726
Copy link
Member

kevin940726 commented Jan 26, 2021

In #25849, there's a fix to show the indicator in between two blocks when the former one is selected (See the screenshot in the PR). When trying this in this PR, it seems like it's not working anymore (seems intermittently). Any idea why? Is this intentional?

Kapture.2021-01-26.at.10.21.46.mp4

Also, perhaps we should start writing some e2e tests for the insertion indicator to avoid regressions in the future.

@youknowriad
Copy link
Contributor Author

I think the bug here is not in the current PR. It seems the issue is the fact that the insertion point in the state (reducer) is actually not "reset" properly when you open the inserter a second time.

I believe this might be related to the fix @noisysocks or @talldan worked on to fix the position of the insertion after clicking "Browse All". I'm not really sure I understand the logic of that fix properly but it seems we're missing a reset at some point.

Copy link
Member

@kevin940726 kevin940726 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Probably could use some comments to better understand the code though 😅

@stokesman
Copy link
Contributor

It's great to see this work coming along. I was curious to see what the inserter button looked like in cases where the default block appender is already showing (at the ends of some block lists) and that is a bit funny but I found something else that is probably of greater concern.

When using the inserter button that appears at the end of a block list, a newly inserted block gets inserted based on the location of the selected block instead of the inserter button. I made a recording with three uses of the same inserter button and three different places where a block gets inserted. None of them the expected position:

insertion-after-selected.mp4

@youknowriad
Copy link
Contributor Author

good catch @stokesman I think it's fixed now.

@youknowriad
Copy link
Contributor Author

The failing e2e tests here are a Core regression tracked here https://core.trac.wordpress.org/ticket/50025

@youknowriad youknowriad merged commit 30fafd0 into master Jan 27, 2021
@youknowriad youknowriad deleted the fix/insertion-point branch January 27, 2021 08:51
@github-actions github-actions bot added this to the Gutenberg 9.9 milestone Jan 27, 2021
@youknowriad youknowriad changed the title Fix insertion point Show insertion point after the last block in a container Jan 27, 2021
@draganescu
Copy link
Contributor

@youknowriad testing #28382 i got this weird behavior with the inserter not being removed. Can you think of anything from this PR that may be the cause, so I can open an informed issue?

ghost-inserter.mp4

@youknowriad
Copy link
Contributor Author

@draganescu I don't know really on top of my mind, the interactions here are a bit complex and I didn't test nested menus in popovers. Please do track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support showing the insertion point after the last element of a block list.
4 participants