-
Couldn't load subscription status.
- Fork 4.6k
Drag and drop: direct drag: move block instead of drag chip #67470
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
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +264 B (+0.01%) Total Size: 2.07 MB
ℹ️ View Unchanged
|
|
A few notes:
CleanShot.2024-12-06.at.08.49.09.mp4
CleanShot.2024-12-06.at.08.51.13.mp4
CleanShot.2024-12-06.at.08.54.18.mp4
CleanShot.2024-12-06.at.08.58.13.mp4 |
|
I also found it interesting that I expected to be able to move any block in this fashion, hold + dragging text for example. |
|
This also exposes oddities with how some our of inner blocks blocks, like the Button block, where as a user I wouldn't know, or care, that I have a "Buttons" block surrounding my Button, but when I try to drag the button somewhere else, I can't (as a button block needs to exist within a buttons block. CleanShot.2024-12-06.at.09.01.48.mp4 |
|
Somehow write mode was turned on for me, perhaps from testing elsewhere, despite the experiment being turned off when testing: no.before.after.movis.write.mode.on.movTo get around this, I turned the experiment on and then switched into Design mode. I'm not sure how that persisted so intensely but noting in case it's relevant. I do think it's a hold over in my browser from other testing but it caught me by surprise. Overall, the main oddness for me is around not all blocks working with it as mentioned above/knowing which blocks it'll work with. I think it's valuable for now for the blocks it does work with as it's awesome to have it be so visible: working.well.movWhen showing this to some other folks, we did talk about how it would be nice to indicate when something like a gallery is created when you're dragging two image blocks next to each other: creating.a.gallery.mov |
|
I think this is a great direction, let's complete it :) |
af1884f to
9a4199a
Compare
|
This PR was mentioned as part of Refining content creation in the 6.9 roadmap. I've rebased this PR on top of trunk to allow more people to test it. cc @WordPress/gutenberg-core |
Just noting that that has been a feature since #56186, though it was never widely advertised. |
9a4199a to
a37dd7c
Compare
|
Flaky tests detected in 49c0fc9. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18509890625
|
|
Hey @ellatri, The PR introduces direct drag, where the actual block moves during drag instead of showing a ghost/drag chip. This makes block movement smoother and more visually accurate. That part is clear to me. ✅ Now, I need clarity if this new behaviour currently works only in the main editor canvas (post/page editor). Or does it equally apply to List View, Site Editor template parts, Zoom Out mode, patterns, etc? Can you please confirm if this is a correct understanding of this feature? CC @t-hamano |
|
@kjnanda It should work for all types of content inside the editor (actual content, not things like list view). |
a37dd7c to
0424f9d
Compare
| &.is-hovered { | ||
| &:not([draggable="true"]), | ||
| &:not([data-draggable="true"]) { | ||
| cursor: default; |
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.
This was added in #40785 to avoid having a text cursor for selectable (not editable) text, which is now generalized to all blocks if they're not draggable.
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.
It works very well, but there are two things that seem unintended. I used this group block for the feedback below:
<!-- wp:group {"metadata":{"categories":["posts"],"patternName":"test"},"style":{"spacing":{"padding":{"top":"100px","right":"100px","bottom":"100px","left":"100px"}},"color":{"text":"#ffffff"}},"backgroundColor":"contrast"} -->
<div class="wp-block-group has-contrast-background-color has-text-color has-background" style="color:#ffffff;padding-top:100px;padding-right:100px;padding-bottom:100px;padding-left:100px"><!-- wp:paragraph -->
<p>Hello World</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->First, if the background color is a custom color, the background color becomes transparent while dragging.
585728367878c65b7e06526e13575598.mp4
Next, it would be better to hide the inserter button:
0ec029c66959512fde702e0dc45afef7.mp4
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.
It's looking good! Maybe for a follow-up, but shouldn't the dragging from the toolbar button also move the block around?
.../block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js
Show resolved
Hide resolved
.../block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js
Show resolved
Hide resolved
.../block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js
Outdated
Show resolved
Hide resolved
.../block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js
Outdated
Show resolved
Hide resolved
d5d189d to
acb460a
Compare
acb460a to
3b1e346
Compare
3b1e346 to
4d37ebf
Compare
Fixed
Yes, there's a few issues like this. Perhaps for a follow-up |
|
I personally don't really mind the inserter button btw, it just drags the block as-is. Otherwise we hide it during drag and then... put it back on drop? Might feel weird and distracting. I think we should only make minimal adjustments of things that might actually cause issues. |
|
Thanks a lot @t-hamano! Let's polish this more during Beta. |
|
Omg, I forgot the props again. 😭 I'm so sorry, I'm trying to get used to it again. I'll try to remember to include you all in a follow-up. |
* Fix dataviews scroll and footer stickiness (#72150) * Fix dataviews scroll and footer stickiness * Add back colors to admin-ui-page * use more specific property * header padding * Enable text labels in admin ui header actions * reintroduce padding prop as default false * Breadcrumbs: Php improvements (#72155) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: westonruter <[email protected]> * Changelog automation: change "Block Commenting" to "Notes" (#72192) Co-authored-by: t-hamano <[email protected]> Co-authored-by: jeffpaul <[email protected]> Co-authored-by: Mamaduka <[email protected]> * Block Comments: Try the alt method for transferring focus to sidebar (#72158) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: adamsilverstein <[email protected]> Co-authored-by: theminaldiwan <[email protected]> * Block Comments: Try alternative method for spotlight (#72194) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> * Block support: add allowedBlocks support for more blocks (#72191) Co-authored-by: t-hamano <[email protected]> Co-authored-by: tellthemachines <[email protected]> * Build v2: Improve script modules dependency handling (#72188) * Navigation Link: Fix custom links creating empty bindings and severed links retaining bindings (#72162) * Navigation Link: Fix custom links creating empty block bindings When manually inserting a Custom Link variation of the Navigation Link block, empty block bindings were being created. This occurred because the binding logic only checked for the presence of an 'id' attribute without verifying whether the link was actually an entity link vs a custom link. This commit refactors the binding logic to be based on the final computed state from updateAttributes rather than the input values, preventing the mismatch and ensuring custom links never create bindings. Changes: - Refactor updateAttributes to return metadata about final state - Update onChange handlers to use returned isEntityLink flag - Add comprehensive test coverage for return value metadata - Ensure binding decisions align with computed attributes Fixes the bug where Custom Link variations would incorrectly create bindings even though they have kind: 'custom' and should remain unbound. * Fix: Use isEntityLink metadata for binding decisions in Navigation blocks - Updated Navigation Link and Navigation Submenu edit components to use isEntityLink metadata from updateAttributes - Fixed menu-inspector-controls to use useEntityBinding hook for consistency - Ensures bindings are only created for entity links (posts, pages, taxonomies) - Prevents empty bindings from being created for custom links - Fixes bug where severing entity links would incorrectly retain bindings Co-authored-by: getdave <[email protected]> Co-authored-by: scruffian <[email protected]> * Add Additional CSS Classes setting to Inline Text Link UI (#67560) * PoC adding the additional field to inline links only * Output the class attribute correctly in HTML * Ensure class is part of link format active attributes * Ensure full width inputs * Implement Toggleable control for CSS classes * Simplify settings render property validation - Remove complex try-catch blocks and null/undefined checks - Simplify to just check typeof setting.render === 'function' - Remove redundant test for invalid render properties - Normalize test names to imperative style - Remove error handling test to let errors bubble up naturally The logic is now cleaner: - If render is not provided → checkbox - If render is provided and valid → use it - If render is provided but invalid → null (filtered out) * Fix layout * Add test coverage for CSS component * Imorove a11y and conveage * Add very basic sanitization of the value * Avoid custom CSS and use components for spacing * Revert all changes to styles Unlinked contributors: Membele, BiDbMAK, sarahmonster, prasadgupte, smerriman, kticka, leadclown, ScotsScripts, ekazda, svedish, frogdesk, michaelsoriano, Chillifish, DougMelvin, burnuser, mdmoreau, logiclink. Co-authored-by: getdave <[email protected]> Co-authored-by: mikachan <[email protected]> Co-authored-by: scruffian <[email protected]> Co-authored-by: richtabor <[email protected]> Co-authored-by: jasmussen <[email protected]> Co-authored-by: jameskoster <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: DamirPecnik <[email protected]> Co-authored-by: driviera <[email protected]> Co-authored-by: paaljoachim <[email protected]> Co-authored-by: andrewserong <[email protected]> Co-authored-by: glendaviesnz <[email protected]> Co-authored-by: talldan <[email protected]> Co-authored-by: karmatosed <[email protected]> Co-authored-by: nextgenthemes <[email protected]> * Accordion: Remove headingLevel from Reset All Attributes (#72186) Co-authored-by: shimotmk <[email protected]> Co-authored-by: t-hamano <[email protected]> * Pages: reuse embedded info for authors (#72200) Co-authored-by: oandregal <[email protected]> Co-authored-by: jorgefilipecosta <[email protected]> * Accordion Item block: add layout support (#72176) * FIXED THE CHANGES AS ASKED * markdown updated Co-authored-by: sidharthpandita1 <[email protected]> Co-authored-by: hanneslsm <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: shimotmk <[email protected]> * Fix navigation link URL binding resolution on frontend (#72169) * Add manual URL binding resolution to navigation blocks * Fix PHPCS formatting issues in navigation blocks - Fix alignment of equals signs in binding resolution code - All files now pass PHPCS standards Co-authored-by: getdave <[email protected]> Co-authored-by: scruffian <[email protected]> * Fix Nav Block Link UI regression for blocks with id but no binding (#72171) - Make handleEntities conditional on binding presence in LinkUI - Existing links with id but no binding remain editable - New links with id and binding get locked entity UI - Prevents regression for existing WordPress sites - Adds E2E test to verify fix Co-authored-by: getdave <[email protected]> Co-authored-by: scruffian <[email protected]> * Fix block card back arrow in inserter preview (#72199) Co-authored-by: talldan <[email protected]> Co-authored-by: getdave <[email protected]> * Add keyboard shortcut toggle block visibility (#72172) Co-authored-by: t-hamano <[email protected]> Co-authored-by: ramonjd <[email protected]> Co-authored-by: jasmussen <[email protected]> * Notes: Hide block settings menu items for mulit-selection (#72206) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> * Resolving Comments hide reserved space for comments (#72210) Co-authored-by: karthick-murugan <[email protected]> Co-authored-by: Mamaduka <[email protected]> * Accordion Panel Block: Add layout support (#72211) Co-authored-by: t-hamano <[email protected]> Co-authored-by: shimotmk <[email protected]> Co-authored-by: mikachan <[email protected]> * Add fitText field to block.json schema (#72198) * Add fitText field to block.json schema Adds fitText block support definition to enable proper validation and autocomplete for the fitText feature added in #71904. Fixes #72190 * Move fitText to supports.typography.fitText location Addresses review feedback to place fitText under typography supports rather than as a top-level support property. Co-authored-by: aditya241104 <[email protected]> Co-authored-by: t-hamano <[email protected]> * Terms Query: Move variations from `Term template` (#72197) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: mikachan <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: cr0ybot <[email protected]> * CheckboxControl, RadioControl, ToggleControl: Ensure focus on click (#72115) * CheckboxControl, RadioControl: Ensure focus on click * Add changelog * Also fix in `ToggleControl` Co-authored-by: mirka <[email protected]> Co-authored-by: aduth <[email protected]> Co-authored-by: oandregal <[email protected]> * Pages: use embedded info for feature media (#72213) Co-authored-by: oandregal <[email protected]> Co-authored-by: Mamaduka <[email protected]> * Don't applySelection change for off-canvas text length changes (#72221) The attempt to keep track of caret position via applyRange was stealing focus back to the canvas when those changes were coming from an off-canvas input (navigation link block text changes from inspector sidebar input). In these cases, it's not an expected behavior to keep the selection location, as the text length is changing intentionally off canvas. In these cases, it's better to not keep track of that focus. Making `RichText`'s `applyFromProps()` `domOnly` if the `text.length` changes and if focus is outside the canvas prevents focus from being stolen from the sidebar. * Block Comments: Improve focus management for comment interactions (#71814) * Focus comments Input field * Feedback changes * Feedback changes * Feedback changes * Feedback changes * Implement utils functionality * Index file conflict issue * Js Lint issues * JS Linting issues * Removing focus changes * Style changes Co-authored-by: karthick-murugan <[email protected]> Co-authored-by: roseg43 <[email protected]> Co-authored-by: joedolson <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: jeffpaul <[email protected]> * Fix PHP tests (#72236) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: talldan <[email protected]> Co-authored-by: t-hamano <[email protected]> * Term Description: Fix front end context (#72238) * Fix term description context * Fix error Co-authored-by: mikachan <[email protected]> Co-authored-by: ntsekouras <[email protected]> * Remove old pattern overrides back compat code and update tests (#72231) Co-authored-by: talldan <[email protected]> Co-authored-by: ramonjd <[email protected]> * Build V2: Support JSX and JSON (#72202) Co-authored-by: youknowriad <[email protected]> Co-authored-by: talldan <[email protected]> * Add Term Name block (#72129) * Add initial block * Add tagName attribute * Fix phpcs * Update packages/block-library/src/term-name/block.json Co-authored-by: Aki Hamano <[email protected]> * Add border-box * Remove term from isLink render logic * Update HTML element selector * Switch to HeadingLevelDropdown * Remove border radius and margin controls * Use pseudo link * Allow block to be used outside of terms query * Remove apply_filters * Rename tagName to level * Add apply_filters back * Add new icon * Remove fill from svg * Add term title keyword * Remove experimental flag * Fix spacing * Remove apply_filters * Add test fixture * Add style import * Update svg --------- Co-authored-by: Aki Hamano <[email protected]> Co-authored-by: mikachan <[email protected]> Co-authored-by: cr0ybot <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: jasmussen <[email protected]> Co-authored-by: jorgefilipecosta <[email protected]> Co-authored-by: kmanijak <[email protected]> * Bump the github-actions group across 1 directory with 3 updates (#72108) Bumps the github-actions group with 3 updates in the /.github/workflows directory: [actions/cache](https://github.com/actions/cache), [actions/stale](https://github.com/actions/stale) and [shivammathur/setup-php](https://github.com/shivammathur/setup-php). Updates `actions/cache` from 4.2.4 to 4.3.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/0400d5f644dc74513175e3cd8d07132dd4860809...0057852bfaa89a56745cba8c7296529d2fc39830) Updates `actions/stale` from 10.0.0 to 10.1.0 - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/3a9db7e6a41a89f618792c92c0e97cc736e1b13f...5f858e3efba33a5ca4407a664cc011ad407f2008) Updates `shivammathur/setup-php` from 2.35.4 to 2.35.5 - [Release notes](https://github.com/shivammathur/setup-php/releases) - [Commits](https://github.com/shivammathur/setup-php/compare/ec406be512d7077f68eed36e63f4d91bc006edc4...bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 4.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/stale dependency-version: 10.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: shivammathur/setup-php dependency-version: 2.35.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: desrosj <[email protected]> * Fix entity binding not cleared when unsyncing and entering custom URL in Nav block (#72212) * LinkControl: Fix entity binding not cleared when unsyncing and entering custom URL When a user clicks the 'Unsync' button on an entity link and then types a custom URL (not selecting from suggestions), the entity binding was not being properly cleared. This was because handleUnlink() only destructured the id, kind, and type properties but didn't explicitly set them to undefined. When handleSubmit() spread the values, the original entity properties from the value prop persisted through the spread, causing the severing logic in update-attributes.js to fail. This commit fixes the issue by explicitly setting id, kind, and type to undefined in handleUnlink(), ensuring they override the original values when spread in handleSubmit(). Also adds comprehensive test coverage for this specific scenario. * Consistently reset all values to undefined Co-authored-by: getdave <[email protected]> Co-authored-by: scruffian <[email protected]> * Block Comments: Add focus on Comment deletion (#71974) * Focus comments on deletion * Implement utility functions * Remove few comments * Remove ref * Feedback changes Co-authored-by: karthick-murugan <[email protected]> Co-authored-by: joedolson <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: adamsilverstein <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: jeffpaul <[email protected]> * Build V2: Supports packages with styles (#72242) * Time to Read: Add word count icon (#72240) * Add word count icon * Move time to read icon to icon lib * Update changelog Co-authored-by: mikachan <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: jasmussen <[email protected]> Co-authored-by: fcoveram <[email protected]> * Fix the undefined type problem with api docgen for typescript files (#72228) * Add Navigation block toolbar buttons to Template Part editor (#72008) * Add content role to Navigation Link and Submenu label attributes This change makes navigation menu item labels editable in Write Mode by adding role: 'content' to the label attribute for both core/navigation-link and core/navigation-submenu blocks. This allows users to: - Edit menu item text/labels in Write Mode - Maintain the content-focused editing experience - Keep layout and styling controls disabled in Write Mode Part of the Navigation Block Write Mode improvements. * Remove unwanted comments * Refactor: Move Edit Navigation button to editor hook Refactors the "Edit Navigation" button for Template Parts from hardcoded logic in the block-library component to a reusable editor hook following the same pattern as navigation-link-view-button. Changes: - Created template-part-navigation-button hook in editor package - Removed navigation-specific logic from Template Part edit component - Added flashBlock with 500ms duration for visual feedback - Hook automatically opens block inspector when button is clicked This removes the interfaceStore dependency from block-library and follows established patterns for extending block toolbar functionality. * Improve naming * Add divider * Address review comments * optimize perf * Don't show edit navigation button if navigation block is in disabled editing mode --------- Co-authored-by: getdave <[email protected]> Co-authored-by: jeryj <[email protected]> Co-authored-by: jasmussen <[email protected]> Co-authored-by: scruffian <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: SaxonF <[email protected]> Co-authored-by: draganescu <[email protected]> Co-authored-by: talldan <[email protected]> Co-authored-by: karmatosed <[email protected]> Co-authored-by: mtias <[email protected]> * Fix: Prevent submenu hover in contentOnly mode (#72007) - Add useBlockEditingMode hook to detect contentOnly mode - Force openSubmenusOnClick to true when not in default editing mode - This prevents submenus from opening on hover in contentOnly mode - Cherry-picked from PR #71137 Fixes submenu hover behavior in Write Mode for Navigation blocks. Co-authored-by: getdave <[email protected]> Co-authored-by: jeryj <[email protected]> * Refactor sync provider into a `createSyncManager` factory function (#72183) * Refactor SyncProvider into createSyncManager factory function * Add @wordpress/hooks to @wordpress/sync dependencies * Expose createSyncManager and constants under private API * Revert private-api usage * DataForm: do not add empty option to select by default (#72241) Co-authored-by: sidharthpandita1 <[email protected]> Co-authored-by: oandregal <[email protected]> Co-authored-by: mirka <[email protected]> * Fix: Underline text decoration propagates to badge fields (#72097) Co-authored-by: jorgefilipecosta <[email protected]> Co-authored-by: mirka <[email protected]> * Move Yjs providers into subfolder (#72224) * Move providers into subfolder * Fix docblock type references * Build v2: Migrate another batch of packages to v2 pipeline (#72251) Co-authored-by: youknowriad <[email protected]> * Block Editor: Hide Navigation block children from Content sidebar in contentOnly mode (#72237) * Block Editor: Hide Navigation block children from Content sidebar in contentOnly mode * Improve perf for removing navigation block descendent client ids in content only sidebar --------- Co-authored-by: Jerry Jones <[email protected]> Co-authored-by: getdave <[email protected]> Co-authored-by: jeryj <[email protected]> * Components: Fix color scale functions (#72255) Co-authored-by: mirka <[email protected]> Co-authored-by: aduth <[email protected]> * Build v2: Fix scss watching (#72257) * Build v2: Fix scss watching * Remove redundant `compileStyles` call Co-authored-by: mirka <[email protected]> Co-authored-by: youknowriad <[email protected]> * Notes: Remove unnecessary horizontal scrollbar (#72250) Co-authored-by: t-hamano <[email protected]> Co-authored-by: adamsilverstein <[email protected]> Co-authored-by: shail-mehta <[email protected]> * Details Block: remove accordion keyword to avoid confusion with Accordion block (#71746) Co-authored-by: nani-samireddy <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: Soean <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: joedolson <[email protected]> Co-authored-by: mikachan <[email protected]> * Ensure meta boxes are not hidden when legacy (#72220) Unlinked contributors: krishaamer. Co-authored-by: stokesman <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: bph <[email protected]> Co-authored-by: danieliser <[email protected]> * Accordion heading:remove toggle icon typography (#72227) * fix accordion-heading remove-toggle-icon-typography * Update packages/block-library/src/accordion-heading/block.json Co-authored-by: Aki Hamano <[email protected]> --------- Co-authored-by: shimotmk <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: sidharthpandita1 <[email protected]> Co-authored-by: levinbaria <[email protected]> * Add Term Count block (#72218) * term count block based on term name block work by @mikachan Co-authored by: mikachan <[email protected]> * register term count block * remove tagName attribute, count alone doesn't make sense as a heading * remove parens inspector controls in favor of block controls, add icons * refactor based on query-total * remove vestigial tag name * remove alignment features and vestigial link styles * refactor to simplify Co-authored by: t-hamano <[email protected]> * refactor for range of bracket types * sentence case Co-authored-by: Aki Hamano <[email protected]> * sentence case * tweak description * remove unnecessary component * cleanup * add icons to BRACKET_TYPES * import term count block styles * remove experimental flag * remove redundant svg attributes * emove unused file * add fixtures * fix file extension * try term count icon --------- Co-authored-by: cr0ybot <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: mikachan <[email protected]> Co-authored-by: kmanijak <[email protected]> * Notes: Add more e2e tests for keyboard navigation (#72271) Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> * Remove write/navigation mode experiment, tool and selectors. (#72193) Co-authored-by: tellthemachines <[email protected]> Co-authored-by: ramonjd <[email protected]> Co-authored-by: talldan <[email protected]> * Notes: Add skip link button to back to block (#72270) * Notes: Add skip link button to back to block * Place back-to-block button at the end of the thread * Use useBlockElement instead of useBlockElementRef * Explicitly focus block when comment is deleted * Remove unnecessary style Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: roseg43 <[email protected]> Co-authored-by: jeffpaul <[email protected]> * Fix changelog example to match standard format (#72164) Co-authored-by: DAreRodz <[email protected]> Co-authored-by: gziolo <[email protected]> Co-authored-by: sirreal <[email protected]> * Notes/Block Comments: Use arguments from the schema for creation (#72205) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> * Terms Query: Remove block bindings (#72275) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: kjnanda <[email protected]> * Pages: disable filter for discussion field (#72201) * Notes: Add privacy info text (#72276) * Add Privacy info text * Remove separate component * Design changes Unlinked contributors: IamPriyabrato04. Co-authored-by: karthick-murugan <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: jasmussen <[email protected]> Co-authored-by: karmatosed <[email protected]> Co-authored-by: hanneslsm <[email protected]> * rename "hierarchical" to "showNested" (#72273) Co-authored-by: cr0ybot <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: t-hamano <[email protected]> * Build V2: Fix emotion transpiling (#72280) * Fix: don’t allow unlocking accordion item and panel blocks (#72290) Co-authored-by: fabiankaegy <[email protected]> Co-authored-by: t-hamano <[email protected]> * Build V2: Migrate more packages including block-editor (#72259) Co-authored-by: youknowriad <[email protected]> * Terms Query: Use `perPage` attribute to fetch only required terms (#72291) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: cr0ybot <[email protected]> Co-authored-by: t-hamano <[email protected]> * Terms Query: Use `templateSlug` from context (#72295) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: Mamaduka <[email protected]> * Switch to using sass-embedded for build-v2 (#72258) * Update Terms Query block variation names and icons (#72298) Co-authored-by: cr0ybot <[email protected]> Co-authored-by: ntsekouras <[email protected]> * Terms Query block: remove duplicate server-rendered wrapper (#72296) Co-authored-by: cr0ybot <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: ntsekouras <[email protected]> * Build: Cross-package style dependencies should use built files and not src (#72293) Co-authored-by: youknowriad <[email protected]> * Notes: Floating comments aligned with blocks that avoid overlapping (#72216) * Wrap non pinned comment boards in Popover * Find the related block by id * Use relatedBlockElement to anchor Popover * Move filteredThreads logic outside CommentPopover * Fine tune popover * linter fixes * Cleanup after merge * remove use of useEntityBlockEditor * When calling useBlockElement use existing comment.blockClientId * Simplify CommentPopover * Try: hide floating comments when sidebar active * Tighten alignment * adjust slotfill class * increase minimum editor width required in order to show floating comments * step 1. restore placement in sidebar * fix alignment * cleanup * cleanup * Fine tune positioning * Styles cleanup * Improve doc blocks * Cleanup * remove unused new comment state for now * remove unused active comment state * Improve doc blocks 2 * pretier * run npm install * move height, offsetRefs and other helpers into CommentBoardWrapper * fix linter warnings * Revert "move height, offsetRefs and other helpers into CommentBoardWrapper" This reverts commit 63a3286a0604df5c7362988fc32434ee2b50fe9c. * Fix scrollbar in floating panel mode * fix calling of updateHeight * Update packages/editor/src/components/collab-sidebar/index.js Co-authored-by: Aki Hamano <[email protected]> * remove unused style * Avoid using div in selector * Correct multiple comment board issue * correct react warnings * try: fix overlapping part 1 * try:working * cleanup * Add inline docs * update packages/block-library/src/accordion-item/block.json from trunk * inline docs * restore blockCommentId placement * Reflow comment positions when comment or reply is edited * debounce comment change handling * move debounce to onChange handler * reflow comments on create, edit and delete * revert formatting change on CommentBoard * prettier * rename commentUpdated to reflowComments since thats what it does * try/align-comments-with-blocks-fix-overlapping * restore missing setSelectedThread * refactor with useFloatingSidebar hook and single structure * cleanup * dockblock update * remove setter from useEffect * only show privacy notice in pinned sidebar * combine useSelect calls * prettier --------- Co-authored-by: adamsilverstein <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> * Block Comments: Capture resolution history & display in thread (#71563) * Collab Sidebar: Add resolution history support for block comments in REST API * feat: style comment resolution messages to look the same as regular comments * fix: adjust formatting of auth_callback function in block comments * refactor: update action values for resolution history to use 'resolve' and 'reopen' * fix: comments ending with period * feat: also tracked comment re-open actions * refactor: move updating resolution history to helper function * fix: sorting logic * fix: show input for resolved threads * refactor: yoda checks * Revert "refactor: yoda checks" This reverts commit 47c723a5240300c0f450d5478443cdbc934babb2. * fix: remove unnecessary fragment from ResolutionMessage component * fix: adjust sorting logic to prioritize resolutions over replies for identical timestamps to account for quick-reopens * refactor: remove extra meta comment field from REST API * fix: reset comment meta TS * refactor: remove updateResolutionHistory function and its calls from comment resolve/reopen logic * fix: remove createUnifiedTimeline method * fix: reset comments.js * feat: re-add ResolutionMessage component * feat: (PR #71819) add support for allowing empty comments in block comments functionality * feat: handle resolution messages with new comment type * fix: newline at end in block-comments-test.php * trial: multiple queries * refactor: update comment type strings for block comments status * fix: update avatar source fallback to use logical OR * fix: include block comment resolutions by default with query * feat: add bypass for REST API validation and disable duplicate detection for resolution comments * fix: include quick reply comment in resolution comment content * refactor: update block comments tests to use data providers * fix: PHP formatting * refactor: comment resolution logic in onEditComment * Update packages/editor/src/components/collab-sidebar/comments.js Co-authored-by: Adam Silverstein <[email protected]> * Update lib/experimental/block-comments.php Co-authored-by: Adam Silverstein <[email protected]> * Update lib/experimental/block-comments.php Co-authored-by: Adam Silverstein <[email protected]> * fix: code comments Co-authored-by: Aki Hamano <[email protected]> * fix: allow editing for reopen comments * fix: only render more actions menu if they are available * fix: redundant logic in Thread * feat: add controller methods from REST_Comments_Controller * feat: modified create_item for block comments * feat: modify check_is_comment_content_allowed for block comments * feat: modify get_items to include resolution types in comment query * fix: add gutenberg text domain for translations * fix: remove ported hooks * fix: revert class-gutenberg-rest-comment-controller.php * fix: use metadata instead of separate types * fix: add new comment for resolution actions + allow empty & duplicate comments * fix: automated formatting * fix: merge create_item method with meta check * feat: add update_item method * feat: add check_is_comment_content_allowed method for checking empty content * fix: allow duplicate block comment resolution messages conditionally * fix: linter formatting * Update lib/experimental/block-comments.php Co-authored-by: Aki Hamano <[email protected]> * fix: remove redundant metadata validation * fix: remove redundant update_item method * refactor: merge rest_pre_insert_comment filter into create_item * fix: remove meta definition from controller * fix: remove redundant metadata handling for block comment status * fix: including meta necessary for check_is_comment_content_allowed * fix: remove redundant constant & check for valid block comment statuses * fix: revert comment for get_item_schema * Update lib/experimental/class-gutenberg-rest-comment-controller.php Co-authored-by: Aki Hamano <[email protected]> * Update lib/experimental/class-gutenberg-rest-comment-controller.php Co-authored-by: Aki Hamano <[email protected]> * Update packages/editor/src/components/collab-sidebar/comments.js Co-authored-by: Aki Hamano <[email protected]> * fix: remove block-comments-test.php * fix: revert empty comment check in controller * fix: comment type check for empty block comments --------- Co-authored-by: yashjawale <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: adamsilverstein <[email protected]> Co-authored-by: jeffpaul <[email protected]> Co-authored-by: priethor <[email protected]> Co-authored-by: dream-encode <[email protected]> * use linked term names in variations (#72307) Co-authored-by: cr0ybot <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: ntsekouras <[email protected]> * Perf: Avoid busting the memo cache for `useDebounce` options (#72279) * Avoid busting the memo cache for delayedBlockVisibilityUpdates * Fix useDebounce instead * Move delayedBlockVisibility debounce options out of the component ---- Co-authored-by: talldan <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]> * Notes: Rename comment type (#72310) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> * Note: Fix the error when creating a new note (#72312) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> * Notes: Tweak thead style (#72308) * Notes: Tweak thead style * Remove redundant id prop Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> * Remove redundant max percentage from download progress (#72282) wp-env shows output such as "Downloading WordPress - 50/100%", and the 100 is redundant since "50%" means the same since 100% is an implied maximum, and is clearer and more concise Co-authored-by: mathiscode <[email protected]> Co-authored-by: talldan <[email protected]> * Packages Build: Fix watch mode for style files (#72315) Co-authored-by: youknowriad <[email protected]> * Notes: improve REST API checks for resolution notes (#72316) * Notes: improve REST API checks for resolution notes * Improve auth_callback check Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> * Notes: Audit and update translation strings (#72311) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: Shekhar0109 <[email protected]> Co-authored-by: jeffpaul <[email protected]> * PHP-only blocks: add documentation (#72068) Co-authored-by: priethor <[email protected]> Co-authored-by: t-hamano <[email protected]> * Details block: Add name attribute in editor (#71054) Co-authored-by: Soean <[email protected]> Co-authored-by: Mamaduka <[email protected]> * Build v2: Migrate DataViews and Admin UI (#72319) Co-authored-by: youknowriad <[email protected]> * Icons: Bundle generated source code (#72299) * Icons: Bundle generated source code As of #71878, Icons are defined as SVG files under `src/library/`, and an accompanying `build` script will produce their corresponding TSX files and an index at `src/library/index.ts`. However, this generated source code was not included in the published package. This pull request seeks to include `src/library/*.ts[x]` in `@wordpress/icons`, for the benefit of its consumers, who thereby no longer need to generate that code themselves. It does so by adding an empty `.npmignore` file, which overrides `.gitignore`. As a reminder, we deliberately Git-ignore the generated source code because we don't want the duplication of SVG and TSX files, nor the possible synchronisation issues that come with it. @see https://docs.npmjs.com/cli/v11/commands/npm-publish#files-included-in-package * Update changelog Co-authored-by: mcsf <[email protected]> Co-authored-by: youknowriad <[email protected]> * Build V2: Migrate more packages (#72324) Co-authored-by: youknowriad <[email protected]> * Allow Post Content when "Force Page Reload" is disable in the Query Loop (#72160) * Add `supports.interactivity.clientNavigation` * Update `useUnsupportedBlocks` * Update enhanced pagination modal * Update enhanced pagination control * Remove `Post Content` in Query Loop * Fix other unit test * Remove unit test * Update changelog * Change modal notice * Add unit tests * Template activation: improve back compat (#72223) Co-authored-by: ellatrix <[email protected]> Co-authored-by: mcsf <[email protected]> Co-authored-by: priethor <[email protected]> Co-authored-by: costasovo <[email protected]> Co-authored-by: jkmassel <[email protected]> * Notes: Allow creating duplicate comments for all notes (#72320) Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: adamsilverstein <[email protected]> Co-authored-by: karthick-murugan <[email protected]> Co-authored-by: ellatrix <[email protected]> * Field types: move element validation to `isValid.elements` (#72325) * Build v2: Migrate more packages including editor (#72328) * Workflows: Performance: Fix RegExp for wpVersion option (#72327) Follow-up of #32244 (4½ years later!) The original regular expression was missing a backslash to match a literal period (\.), and thus it could match any character. In practice, this should never matter because of WordPress's versioning conventions. However, if we ever reach a x.100 minor release, the CI performance tests would fail. ;) Co-authored-by: mcsf <[email protected]> Co-authored-by: youknowriad <[email protected]> * Improve CRDT "merge logic" for post entities (#72262) * Move post type syncConfig to const This is purely to help avoid future conflicts when we conditionally set syncConfig based on post-type supports * Pass current record to syncConfig functions * Improve CRDT utils with better merge logic * Add tests for crdt and crdt-blocks * Update resolver unit test * Remove unnecessary mocks and improve types of tests * Get type record in resolver and pass through to CRDT utils * Remove persisted record argument from updateCRDTDoc * Remove lib0 as dependency * Revert "Get type record in resolver and pass through to CRDT utils" This reverts commit ea050e1051636fa881349ae057d8a28255408983. * Inspect initial record for available fields * Simplify allowed sync properties to enforced allow list --------- Co-authored-by: ingeniumed <[email protected]> * Bump plugin version to 21.8.1 * Update Changelog for 21.8.1 * DataForm: reorganize validation tests (#72330) * Block Bindings: Refactor UI, improve consistency, add more info about source status. (#72253) Co-authored-by: cbravobernal <[email protected]> Co-authored-by: ockham <[email protected]> * Time to Read: Don't use `wp_word_count()` function (#72091) * Time to Read: Don't use wp_word_count() function * Update PHP docblock Co-authored-by: t-hamano <[email protected]> Co-authored-by: dmsnell <[email protected]> * Badge: Fix styles (#72302) * Badge: Fix styles * Append changelog Co-authored-by: mirka <[email protected]> Co-authored-by: juanfra <[email protected]> * iAPI: Add official support for unique IDs (#72161) * Implement unique IDs for Interactivity API directives * test: Add comprehensive edge cases for unique IDs regex parsing * Improve unit tests * Get rid of contants and replace regexp with function * Move test and add invalid chars back * More refactoring * Rename * Destructure state to eliminate redundant store accesses * Simplify context merging and avoid repeated initializations * Reset data-wp-context * Add support for multiple default entries to context * Fix all warns in directives * Add context e2e tests * Add bind tests * Add failing class e2e test * Fix test * Add failing each e2e test * Fix test * Fix router and each * Minor fix to test * Add init e2e test * Add on e2e test * Add on-document e2e test * Add on-window e2e test * Add run e2e test * Add styles e2e test * Add text e2e test * Add watch e2e tests * Remove unique-id tests * Mini refactor parseDirectiveName * Remove await page.pause(); * Fix split limits * Use warn in warn functions * Fix directive comments and some warns * Add failing test * Fix test * Add changelog --------- Co-authored-by: samueljseay <[email protected]> Co-authored-by: luisherranz <[email protected]> Co-authored-by: DAreRodz <[email protected]> Co-authored-by: Sahil1617 <[email protected]> * Notes: Move focus to the parent thread when a reply was deleted (#72341) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> * Editor: Don't use deprecated '__experimentalGetDefaultTemplateType' selector (#72338) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: ntsekouras <[email protected]> * Drag and drop: direct drag: move block instead of drag chip (#67470) * Notes: Avoid losing sidebar reference (#72342) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: juanfra <[email protected]> * Notes: Graduate from experiments (#72344) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: fabiankaegy <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: roseg43 <[email protected]> Co-authored-by: jeffpaul <[email protected]> * Breadcrumbs: Do not allow empty separator (#72347) Unlinked contributors: harshbhonsle. Co-authored-by: ntsekouras <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: hanneslsm <[email protected]> Co-authored-by: Utsav-Ladani <[email protected]> Co-authored-by: kjnanda <[email protected]> * Build v2: Migrate block library (#72333) Co-authored-by: youknowriad <[email protected]> * Build v2: Fix block-editor default colors (#72349) Co-authored-by: youknowriad <[email protected]> Co-authored-by: t-hamano <[email protected]> * Build v2: Migrate edit-* packages to the new build script (#72354) Co-authored-by: youknowriad <[email protected]> * Revert "Template activation: redirect theme templates urls to wp_registered_template (#72003)" (#72356) This reverts commit a45fd836871ae605d558f980f14e5f9f48831ceb. Co-authored-by: ellatrix <[email protected]> Co-authored-by: Mamaduka <[email protected]> * Notes: Don't change 'type' schema (#72357) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> * DataForm: refactor RelativeDateControl to use DataFormControl props (#72361) * Standardise DataForm typography (#72284) Co-authored-by: jameskoster <[email protected]> Co-authored-by: dinhtungdu <[email protected]> * Add Link UI tests for entity-bound navigation links (#72209) Co-authored-by: getdave <[email protected]> Co-authored-by: jeryj <[email protected]> Co-authored-by: ockham <[email protected]> * Fix transpilation warnings (#72359) Co-authored-by: Utsav-Ladani <[email protected]> Co-authored-by: talldan <[email protected]> * Categories block: Improve and harden JavaScript used when displayed as dropdown (#72118) * Modernize and improve robustness of Categories dropdown JS * Add sourceURL for JS in build_dropdown_script_block_core_categories() * Use value property instead of options Co-authored-by: westonruter <[email protected]> Co-authored-by: ramonjd <[email protected]> * Improve code formatting Co-authored-by: Ramon <[email protected]> --------- Co-authored-by: Ramon <[email protected]> * DataViews and DataViews Picker: ensure title overflows correctly in Grid view (#72339) Co-authored-by: ramonjd <[email protected]> Co-authored-by: tellthemachines <[email protected]> Co-authored-by: talldan <[email protected]> * Terms Query: Update `inherit` control and functionality (#72313) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: cr0ybot <[email protected]> Co-authored-by: ellatrix <[email protected]> Co-authored-by: Aljullu <[email protected]> * Term Name: Decode HTML entities (#72375) Co-authored-by: t-hamano <[email protected]> Co-authored-by: ntsekouras <[email protected]> * Notes: Fix commentId `cleanEmptyObject` attributes (#72369) Co-authored-by: shimotmk <[email protected]> Co-authored-by: t-hamano <[email protected]> * BlockRenameModal: Fix Rename `cleanEmptyObject` attributes (#72371) * Fix Rename `cleanEmptyObject` attributes * fix test * Terms Query: Add `include` specific terms support (#72286) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: cr0ybot <[email protected]> Co-authored-by: t-hamano <[email protected]> * Icons: Add `prepare` script to generate source; don't bundle (#72365) Alternative to (and revert of) #72299 (e82f6687e6) As of #71878 (8dff7def7d), Icons are defined as SVG files under `src/library/`, and an accompanying `build` script will produce their corresponding TSX files and an index at `src/library/index.ts`. This patch reverts the addition of `.npmignore` in #72299. With this revert, we return to the guarantee that any generated source code WILL NOT be included in the published NPM package. Instead, this patch adds a `prepare` script for @wordpress/icons to trigger the code generation. This script is part of several NPM life cycles, including installation (`install`, `ci`) and packing (`publish`, `pack`), and runs in the background: https://docs.npmjs.com/cli/v11/using-npm/scripts#life-cycle-scripts This change is motivated by the fact that Gutenberg's workflow for releasing NPM packages involves calling `npm version` (via Lerna) on a fresh repository clone. Since `npm version` involves creating new commits, the clone needs to be prepared to run pre-commit hooks. Concretely, linting will fail if import paths to the icon library cannot be resolved. A more localised fix would have been to explicitly invoke a build of the icons package during the package-release workflow (after `ci` and before `version`), but with this approach based on `prepare` we guarantee the availability of the generation code in (probably) all situations. In particular, it eliminates the need to bundle the generated code in the package (as previously mentioned). Co-authored-by: mcsf <[email protected]> Co-authored-by: t-hamano <[email protected]> * Bump plugin version to 21.8.2 * Block Bindings: Move bindable attributes to privateContext. (#72351) * Move bindable attributes to privateContext * Warning due to empty array * Update Changelog for 21.8.2 * Build V2: Fix DataViews export file (#72387) * Block Transforms: In metadata transform, remove check for block bindings support (#72389) Co-authored-by: ockham <[email protected]> Co-authored-by: cbravobernal <[email protected]> * Update `modalHeader` to support dynamic modal header text based on selected item (#72384) * Update ActionModal to support dynamic modal header text based on selected items * fix story * add changelog * fix changelog * Update packages/dataviews/CHANGELOG.md Co-authored-by: André <[email protected]> --------- Co-authored-by: André <[email protected]> * Terms Query: Stabilize the block (#72380) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: cr0ybot <[email protected]> Co-authored-by: tyxla <[email protected]> * Build V2: Cleanup v1 build scripts (#72358) * Terms Query: Small PHP code quality changes (#72385) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: priethor <[email protected]> * Try: Fix flaky router styles e2e tests (#72329) * Try: Fix flaky router styles e2e tests * Add a hydration check before each test --------- Co-authored-by: Mamaduka <[email protected]> Co-authored-by: DAreRodz <[email protected]> Co-authored-by: luisherranz <[email protected]> * Breadcrumbs: Make experimental (#72234) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: tyxla <[email protected]> * Create block: update DocBlock with exposed variables for render.php templates (#72086) Co-authored-by: benoitchantre <[email protected]> Co-authored-by: gziolo <[email protected]> * Notes: Update button labels (#72352) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: adamsilverstein <[email protected]> Co-authored-by: jeffpaul <[email protected]> Co-authored-by: kjnanda <[email protected]> * DataForm: introduce `validity` prop (#71412) Co-authored-by: oandregal <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: mirka <[email protected]> Co-authored-by: jorgefilipecosta <[email protected]> * iAPI: Handle all `getServerState` and `getServerContext` sync scenarios (#72381) * Add failing test for non-changing props * Add failing test for props that only exist in some pages * Add failing test for non-changing props (context) * Add failing test for props that only exist in some pages (context) * Fix existing tests (state) * Fix getServerState tests * Remove deepImmutable in favor of deepReadOnly * Export deepReadOnly in the private APIs * Simplify signal logic * Add failing test for resetting state on pages without state * Fix reset state test * Add proper types for getServerState * Trigger invalidations in the router * Add additional context test for resetting context * Add tests for getServerContext types * Fix the context tests * Add changelog * Don't execute type tests * Remove `readOnly` option from proxifyState * Fix PHP lint * Rename types tests to types * Use `Record<string, unknown>` type for non-generic in getServerState * Use `Record<string, unknown>` type for non-generic in getServerContext * Update changelog Co-authored-by: luisherranz <[email protected]> Co-authored-by: DAreRodz <[email protected]> * HTML API: Refactor layout image container. (#72264) For classic themes, image blocks need to create a `DIV` wrapper which contains alignment classes from the inner `FIGURE`. This has been processed using PCRE matching. With this change the HTML API is used instead of PCRE functions to provide more semantic transformation, clearer intent, and eliminate possible parsing issues. Co-authored-by: Glen Davies <[email protected]> Co-authored-by: tellthemachines <[email protected]> Github-PR: 72264 Github-PR-URL: https://github.com/WordPress/gutenberg/pull/72264 Core-Backport-PR: wordpress/wordpress-develop#10218 Core-Backport-PR-URL: https://github.com/WordPress/wordpress-develop/pull/10218 * Notes: Add More Menu Item (#72377) * Notes: Update snackbar text (#72409) * Notes: Update snackbar text * Update e2e test Co-authored-by: t-hamano <[email protected]> Co-authored-by: adamsilverstein <[email protected]> * iAPI: fix unexpected browser warning for withSyncEvent() wrapper (#70325) * iAPI: fix unexpected browser warning for withSyncEvent() wrapper * improve sync function handling Unlinked contributors: ethanscorey, bhattaganesh. Co-authored-by: t-hamano <[email protected]> Co-authored-by: felixarntz <[email protected]> Co-authored-by: Rishit30G <[email protected]> Co-authored-by: aaronjorbin <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: luisherranz <[email protected]> * Fix: Change ordering of multiple `data-wp-context` directives in iAPI processing (#72395) * Toggle override in context `deepMerge` * Change context text * Reverse entries array instead of overriding `deepMerge` * Reverse on array creation * Add changelog --------- Co-authored-by: luisherranz <[email protected]> * Release Documentation: Add quick reference guide (#72388) Co-authored-by: priethor <[email protected]> Co-authored-by: cbravobernal <[email protected]> Co-authored-by: t-hamano <[email protected]> * Fit-Text: Resize immediately, but limit max size when block is selected (#72397) Co-authored-by: jorgefilipecosta <[email protected]> Co-authored-by: mcsf <[email protected]> * Notes: Change metadata key (#72411) Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> * bindableAttributes is undefined, as we removed the array (#72401) * Breadcrumbs: Add `post with terms` breadcrumbs support (#72124) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: mcsf <[email protected]> Co-authored-by: justintadlock <[email protected]> Co-authored-by: ellatrix <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: jasmussen <[email protected]> * Paragraph and Heading Block: Remove stretchy text variation (#72408) * Paragraph and Heading Block: Remove stretchy text variation * Remove heading/variation.js Co-authored-by: t-hamano <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: tyxla <[email protected]> Co-authored-by: fcoveram <[email protected]> * Notes: When thread active push previous floating comments up (#72309) Co-authored-by: adamsilverstein <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: jarekmorawski <[email protected]> Co-authored-by: annezazu <[email protected]> * Block Bindings: Move support for Navigation blocks url attribute to correct place (#72418) Fix block bindings support for the Navigation Link and Navigation Submenu blocks' `url` attribute. Co-authored-by: ockham <[email protected]> Co-authored-by: getdave <[email protected]> * Remove core/entity binding in favour of post and term data bindings. Apply to Nav blocks. (#72165) * Block bindings: prefer attributes over context; add link; remove core/entity\n\n- Post Data (PHP): attribute-first id resolution; add 'link' key\n- Term Data (PHP): attribute-first id/taxonomy; map tag→post_tag; keep 'link'\n- Editor bindings (JS): post-data/term-data use attributes; post-data adds link\n- Navigation Link: choose source by kind (post-data vs term-data), use key 'link'\n- Remove core/entity binding and its registrations (PHP/JS)\n- Update lib/load.php and bindings/api.js accordingly * Add clear comments for backwards compat * Use correct sources * Don't use setter for navigation bindings * Clean up Nav block conditionals * Tone down backward compat comments * Reduce comment verbosity in PHP * Use correct error handling * Avoid dding clientId arg * Fix Submenu using wrong binding * Fix https://github.com/WordPress/gutenberg/pull/72165\#pullrequestreview-3339486543 * Tweak comments * Remove count from term count string * Improve consistency of use-entity-binding * Handle all binding types when clearing url * Add backport changelog * Fix bug with sidebar Link field not clearing * Match tests to new implementation * await error notice in link control test * Fix faulty entity binding clearing logic * Tweak entity binding tests again --------- Co-authored-by: getdave [email protected] Co-authored-by: ockham [email protected] Co-authored-by: jeryj [email protected] Co-authored-by: cbravobernal [email protected] Co-authored-by: scruffian [email protected] * Notes: Remove 'isDefaultEmptyBlock' condition (#72427) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: jameskoster <[email protected]> Co-authored-by: annezazu <[email protected]> * Add missing type export (#72428) * Notes: Show orphaned notes in archive sidebar (#72420) * Notes: Show orhan notes in archive sidebar * Combine orphaned comments without considering their status * Use "orphaned" instead of "orphan" Co-authored-by: t-hamano <[email protected]> Co-authored-by: Mamaduka <[email protected]> * Terms Query: Fix display all terms in editor (#72419) Co-authored-by: ntsekouras <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: tyxla <[email protected]> * Notes: Relocate privacy info text (#72421) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: juanfra <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: hanneslsm <[email protected]> Co-authored-by: annezazu <[email protected]> * Build v2: Move the php files copying to the v2 script and make the config generic per package (#72396) * iAPI Router: Selectively preload interactivity script modules (#72340) * In iAPI router selectively load only modules that we instruct to load via an options attribute. * Always add loadOnClientNavigation for core blocks in Gutenberg which are registered in client-assets.php * Fix formatting * Patch WP_Script_Modules to add the filter we intend to backport to core. * Move script module logic to compat * Move 6.9-compat script-modules file outside of `WP_REST_Controller`-related compat files * Manually register script modules for navigation tests * Add core backport changelog entry --------- Co-authored-by: samueljseay <[email protected]> Co-authored-by: luisherranz <[email protected]> Co-authored-by: DAreRodz <[email protected]> * Block Bindings: Remove spurious attributes from supported-by-6.8 list (#72442) Co-authored-by: ockham <[email protected]> Co-authored-by: getdave <[email protected]> * Notes: Fix logic for opening feature sidebar areas (#72431) Co-authored-by: karthick-murugan <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> * iAPI: Skip directive execution for "lazy" derived state props (#71125) * Try returning a Symbol from `evaluate()` * Handle only unresolved props when they are getters * Fix the way getters are identified * Fix derivedStatePropsAccessed initialization * Add e2e tests for bind and class directives * Move derived state props to the same store * Fix derived state closures * Add code for wp-each tests * Change implementation to throw on missing getters * Add tests for getters that depend on missing getters * Reimplement each-child to keep its content until ready * Add e2e tests for each-child * Add tests for wp-style and wp-text * Remove PENDING_GETTER evaluation from directives that don't need it * Replace `derivedStatePropsAccessed` with `derivedStateClosures` Co-authored-by: DAreRodz <[email protected]> Co-authored-by: samueljseay <[email protected]> Co-authored-by: luisherranz <[email protected]> * iAPI: Fix `wp-each` item contexts for objects with same key (#70424) * Add failing tests * Try caching contexts per index * Add method to remove book from derived state * Create item context based on item keys * Document new functions * Set the item prop value in the directive callback * Fix eack-key for objects Co-authored-by: DAreRodz <[email protected]> Co-authored-by: samueljseay <[email protected]> * Block Transforms: use new getTransformedAttributes() function (#72196) * Block Transforms: use new getTransformedAttributes() function * Fix * Remove unnecessary code * Remove old file * Use anchor instead of id Co-authored-by: t-hamano <[email protected]> Co-authored-by: ntsekouras <[email protected]> * Fix Page List to Navigation Link conversion with entity bindings (#72287) * Fix Page List to Navigation Link conversion with entity bindings - Extract buildNavigationLinkEntityBinding function from useEntityBinding hook - Export function from navigation-link/shared for reuse - Update Page List conversion to add entity binding metadata - Update tests to verify binding structure is included - Use hardcoded test expectations with shared variable for maintainability Fixes #72245 * Refactor to accommodate changes from trunk * Fix expected binding in tests and rename for clarity * Improve invalid binding kind Co-authored-by: getdave <[email protected]> Co-authored-by: scruffian <[email protected]> Co-authored-by: ockham <[email protected]> * Wait for transpilation of all JS files before compiling styles (#72435) Co-authored-by: Utsav-Ladani <[email protected]> * Build V2: Adhoc script to build vendors and remove webpack (#72441) Co-authored-by: youknowriad <[email protected]> * Template activation: fix theme field for old REST API endpoint (#72366) Co-authored-by: ellatrix <[email protected]> Co-authored-by: jkmassel <[email protected]> * Add math block and rich text format (#72182) Unlinked contributors: EldarAgalarov. Co-authored-by: ellatrix <[email protected]> Co-authored-by: alshakero <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: jasmussen <[email protected]> Co-authored-by: mtias <[email protected]> Co-authored-by: kathrynwp <[email protected]> Co-authored-by: dmsnell <[email protected]> Co-authored-by: adamsilverstein <[email protected]> Co-authored-by: bgoewert <[email protected]> * Template activation: duplicate modal on static template click, remove auto-drafting (#72285) Co-authored-by: ellatrix <[email protected]> Co-authored-by: priethor <[email protected]> Co-authored-by: mcsf <[email protected]> * Build v2: Cleanup and simplify build and dev scripts (#72448) Co-authored-by: youknowriad <[email protected]> * Field API: support async loading elements (#72254) Co-authored-by: oandregal <[email protected]> Co-authored-by: jorgefilipecosta <[email protected]> Co-authored-by: dinhtungdu <[email protected]> * Icons: Make tracked file checker work in more environments (#72337) * Eslint: Ignore `build-wp` (#72404) Co-authored-by: mirka <[email protected]> Co-authored-by: youknowriad <[email protected]> * Build v2: Fix watch of nested dependenc…
What?
It's a much nicer effect. This is actually what the native browser behaviour would be, but we couldn't make use of it because (1) it was actually a clone (which doesn't work for any iframes nested within blocks) and (2) it couldn't be scaled down so it was way too large for most blocks.
In this PR, we're moving the actual block around, which allows us to scale it down AND animate it.
Why?
The drag and drop effects should feel as nice and natural as possible.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Recording.2024-12-02.at.12.40.58.mov