Skip to content

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@dnd-kit/core](https://redirect.github.com/clauderic/dnd-kit)
([source](https://redirect.github.com/clauderic/dnd-kit/tree/HEAD/packages/core))
| dependencies | minor | [`^6.1.0` ->
`^6.3.1`](https://renovatebot.com/diffs/npm/@dnd-kit%2fcore/6.1.0/6.3.1)
|
| [@dnd-kit/sortable](https://redirect.github.com/clauderic/dnd-kit)
([source](https://redirect.github.com/clauderic/dnd-kit/tree/HEAD/packages/sortable))
| dependencies | major | [`^8.0.0` ->
`^10.0.0`](https://renovatebot.com/diffs/npm/@dnd-kit%2fsortable/8.0.0/10.0.0)
|

---

### Release Notes

<details>
<summary>clauderic/dnd-kit (@&elastic#8203;dnd-kit/core)</summary>

###
[`v6.3.1`](https://redirect.github.com/clauderic/dnd-kit/blob/HEAD/packages/core/CHANGELOG.md#631)

[Compare
Source](https://redirect.github.com/clauderic/dnd-kit/compare/@dnd-kit/core@6.3.0...@dnd-kit/core@6.3.1)

##### Patch Changes

-
[#&elastic#8203;1555](https://redirect.github.com/clauderic/dnd-kit/pull/1555)
[`62f632a`](https://redirect.github.com/clauderic/dnd-kit/commit/62f632a0c8f06ff020eb90d98770a374c705001d)
Thanks [@&elastic#8203;clauderic](https://redirect.github.com/clauderic)! -
Added `Tab` to the list of default key codes that end a drag and drop
operation. Can be customized by passing in a custom list of `keyCodes`
to the KeyboardSensor options.

###
[`v6.3.0`](https://redirect.github.com/clauderic/dnd-kit/blob/HEAD/packages/core/CHANGELOG.md#630)

[Compare
Source](https://redirect.github.com/clauderic/dnd-kit/compare/@dnd-kit/core@6.2.0...@dnd-kit/core@6.3.0)

##### Minor Changes

-
[#&elastic#8203;1539](https://redirect.github.com/clauderic/dnd-kit/pull/1539)
[`0c6a28d`](https://redirect.github.com/clauderic/dnd-kit/commit/0c6a28d1b32c72cfbc6e103c9f430a1e8ebe7301)
Thanks [@&elastic#8203;irobot](https://redirect.github.com/irobot)! - Make it
possible to add visual cues when using activation constraints.

##### Context

Activation constraints are used when we want to prevent accidental
dragging or when
pointer press can mean more than "start dragging".

A typical use case is a button that needs to respond to both "click" and
"drag" gestures.
Clicks can be distinguished from drags based on how long the pointer was
held pressed.

##### The problem

A control that responds differently to a pointer press based on duration
or distance can
be confusing to use -- the user has to guess how long to keep holding or
how far to keep
dragging until their intent is acknowledged.

Implementing such cues is currently possible by attaching extra event
listeners so that
we know when a drag is pending. Furthermore, the listener needs to have
access to
the same constraints that were applied to the sensor initiating the
drag. This can be
made to work in simple cases, but it becomes error-prone and difficult
to maintain in
complex scenarios.

##### Solution

This changeset proposes the addition of two new events: `onDragPending`
and `onDragAbort`.

##### `onDragPending`

A drag is considered to be pending when the pointer has been pressed and
there are
activation constraints that need to be satisfied before a drag can
start.

This event is initially fired on pointer press. At this time `offset`
(see below) will be
`undefined`.

It will subsequently be fired every time the pointer is moved. This is
to enable
visual cues for distance-based activation.

The event's payload contains all the information necessary for providing
visual feedback:

```typescript
export interface DragPendingEvent {
  id: UniqueIdentifier;
  constraint: PointerActivationConstraint;
  initialCoordinates: Coordinates;
  offset?: Coordinates | undefined;
}
```

##### `onDragAbort`

A drag is considered aborted when an activation constraint for a pending
drag was violated.
Useful as a prompt to cancel any visual cue animations currently in
progress.
Note that this event will *not* be fired when dragging ends or is
canceled.

###
[`v6.2.0`](https://redirect.github.com/clauderic/dnd-kit/blob/HEAD/packages/core/CHANGELOG.md#620)

[Compare
Source](https://redirect.github.com/clauderic/dnd-kit/compare/@dnd-kit/core@6.1.0...@dnd-kit/core@6.2.0)

##### Minor Changes

-
[#&elastic#8203;1140](https://redirect.github.com/clauderic/dnd-kit/pull/1140)
[`545a41c`](https://redirect.github.com/clauderic/dnd-kit/commit/545a41c27c6919e4ca22a58a67f3fa02a7caab8a)
Thanks [@&elastic#8203;anilanar](https://redirect.github.com/anilanar)! - Add
`activatorEvent` to `DragStartEvent`

##### Patch Changes

-
[#&elastic#8203;1494](https://redirect.github.com/clauderic/dnd-kit/pull/1494)
[`00ec286`](https://redirect.github.com/clauderic/dnd-kit/commit/00ec286ab2fc7969549a4b19ffd42a09b5171dbe)
Thanks
[@&elastic#8203;dinkinflickaa](https://redirect.github.com/dinkinflickaa)! -
Improves performance by eliminating wasteful re-renders on every child
item on click

-
[#&elastic#8203;1400](https://redirect.github.com/clauderic/dnd-kit/pull/1400)
[`995dc23`](https://redirect.github.com/clauderic/dnd-kit/commit/995dc23b7cd9019f3a920676cbe4e141e917e82c)
Thanks [@&elastic#8203;12joan](https://redirect.github.com/12joan)! - Export
`defaultKeyboardCoordinateGetter`

-
[#&elastic#8203;1542](https://redirect.github.com/clauderic/dnd-kit/pull/1542)
[`f629ec6`](https://redirect.github.com/clauderic/dnd-kit/commit/f629ec6a9c3c25b749561fac31741046d96c28dc)
Thanks [@&elastic#8203;clauderic](https://redirect.github.com/clauderic)! - Fix
bug with draggable and sortable elements with an `id` equal to `0`.

-
[#&elastic#8203;1541](https://redirect.github.com/clauderic/dnd-kit/pull/1541)
[`99643f6`](https://redirect.github.com/clauderic/dnd-kit/commit/99643f634cd55fa0bf0898365883507b28637659)
Thanks [@&elastic#8203;clauderic](https://redirect.github.com/clauderic)! -
Handle `touchcancel` and `pointercancel` events.

-
[#&elastic#8203;1435](https://redirect.github.com/clauderic/dnd-kit/pull/1435)
[`6bbe39b`](https://redirect.github.com/clauderic/dnd-kit/commit/6bbe39bba6ad9afd0bc6db1c345ad4e6b58f5e5e)
Thanks
[@&elastic#8203;knaveenkumar3576](https://redirect.github.com/knaveenkumar3576)!
- Faster Paint with delayed flush of Effects

-
[#&elastic#8203;1543](https://redirect.github.com/clauderic/dnd-kit/pull/1543)
[`bcaf7c4`](https://redirect.github.com/clauderic/dnd-kit/commit/bcaf7c4e57b34dfc8ff9c4eea7a01c6e525e7874)
Thanks [@&elastic#8203;clauderic](https://redirect.github.com/clauderic)! - Fix
a bug with auto-scroller continuing to observe stale elements, causing
them to be considered as scrollable.

- Updated dependencies
\[[`93602df`](https://redirect.github.com/clauderic/dnd-kit/commit/93602df08498b28749e8146e0f6143ab987bc178)]:
-
[@&elastic#8203;dnd-kit/accessibility](https://redirect.github.com/dnd-kit/accessibility)[@&#8203;3](https://redirect.github.com/3).1.1

</details>

<details>
<summary>clauderic/dnd-kit (@&elastic#8203;dnd-kit/sortable)</summary>

###
[`v10.0.0`](https://redirect.github.com/clauderic/dnd-kit/blob/HEAD/packages/sortable/CHANGELOG.md#1000)

[Compare
Source](https://redirect.github.com/clauderic/dnd-kit/compare/@dnd-kit/sortable@9.0.0...@dnd-kit/sortable@10.0.0)

##### Patch Changes

- Updated dependencies
\[[`0c6a28d`](https://redirect.github.com/clauderic/dnd-kit/commit/0c6a28d1b32c72cfbc6e103c9f430a1e8ebe7301)]:
-
[@&elastic#8203;dnd-kit/core](https://redirect.github.com/dnd-kit/core)[@&#8203;6](https://redirect.github.com/6).3.0

###
[`v9.0.0`](https://redirect.github.com/clauderic/dnd-kit/blob/HEAD/packages/sortable/CHANGELOG.md#900)

[Compare
Source](https://redirect.github.com/clauderic/dnd-kit/compare/@dnd-kit/sortable@8.0.0...@dnd-kit/sortable@9.0.0)

##### Patch Changes

-
[#&elastic#8203;1542](https://redirect.github.com/clauderic/dnd-kit/pull/1542)
[`f629ec6`](https://redirect.github.com/clauderic/dnd-kit/commit/f629ec6a9c3c25b749561fac31741046d96c28dc)
Thanks [@&elastic#8203;clauderic](https://redirect.github.com/clauderic)! - Fix
bug with draggable and sortable elements with an `id` equal to `0`.

- Updated dependencies
\[[`00ec286`](https://redirect.github.com/clauderic/dnd-kit/commit/00ec286ab2fc7969549a4b19ffd42a09b5171dbe),
[`995dc23`](https://redirect.github.com/clauderic/dnd-kit/commit/995dc23b7cd9019f3a920676cbe4e141e917e82c),
[`f629ec6`](https://redirect.github.com/clauderic/dnd-kit/commit/f629ec6a9c3c25b749561fac31741046d96c28dc),
[`99643f6`](https://redirect.github.com/clauderic/dnd-kit/commit/99643f634cd55fa0bf0898365883507b28637659),
[`6bbe39b`](https://redirect.github.com/clauderic/dnd-kit/commit/6bbe39bba6ad9afd0bc6db1c345ad4e6b58f5e5e),
[`545a41c`](https://redirect.github.com/clauderic/dnd-kit/commit/545a41c27c6919e4ca22a58a67f3fa02a7caab8a),
[`bcaf7c4`](https://redirect.github.com/clauderic/dnd-kit/commit/bcaf7c4e57b34dfc8ff9c4eea7a01c6e525e7874)]:
-
[@&elastic#8203;dnd-kit/core](https://redirect.github.com/dnd-kit/core)[@&#8203;6](https://redirect.github.com/6).2.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://elastic.slack.com/archives/C07AMD4CNUR) if that's
undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlByZXNlbnRhdGlvbiIsImJhY2twb3J0OmFsbC1vcGVuIiwicmVsZWFzZV9ub3RlOnNraXAiXX0=-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
(cherry picked from commit bd0cc54)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Sep 24, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) September 24, 2025 18:58
@kibanamachine kibanamachine mentioned this pull request Sep 24, 2025
1 task
@kibanamachine kibanamachine merged commit dece775 into elastic:9.0 Sep 25, 2025
9 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
controls 430.3KB 431.0KB +746.0B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport This PR is a backport of another PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants