Skip to content

Comments

[8.19] [Controls] Fix disabled range slider tooltip, clean up delete control button (#227295)#227315

Merged
kibanamachine merged 3 commits intoelastic:8.19from
kibanamachine:backport/8.19/pr-227295
Jul 10, 2025
Merged

[8.19] [Controls] Fix disabled range slider tooltip, clean up delete control button (#227295)#227315
kibanamachine merged 3 commits intoelastic:8.19from
kibanamachine:backport/8.19/pr-227295

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

… button (elastic#227295)

## Summary

### Fix tooltip for disabled range slider

When selecting a non-numerical field, the range slider was disabled with
this tooltip:

<img width="400" alt="Screenshot 2025-07-09 at 11 04 46 AM"
src="https://github.com/user-attachments/assets/45ac7d9a-9009-40ed-839d-e5f47a547f75"
/>

Looking at the error message code, this was not the intended behavior:

```ts
/** This shouldn't ever happen - but, adding just in case as a fallback. */
return i18n.translate(
  'controls.controlGroup.manageControl.dataSource.controlTypeErrorMessage.default',
  {
    defaultMessage: 'Select a compatible control type.',
  }
);
```

This PR fixes this logic so the correct message is displayed:
<img width="320" alt="Screenshot 2025-07-09 at 11 04 14 AM"
src="https://github.com/user-attachments/assets/ea37385c-fdab-48c9-8e52-538411895000"
/>

### Move delete control button to flyout footer and add confirm dialog

When editing a control, a Delete Control button would appear here in the
flyout body, which is hard to spot if the screen height is small and the
user has to scroll down:

<img width="507" alt="Screenshot 2025-07-09 at 11 22 23 AM"
src="https://github.com/user-attachments/assets/9f6cb214-41ca-4d6f-87cd-08240aaa73d3"
/>

Clicking this button would also just immediately delete the control, and
failed to display this confirmation modal:
<img width="587" alt="Screenshot 2025-07-09 at 11 21 36 AM"
src="https://github.com/user-attachments/assets/60c73cd0-5336-483d-a655-b868fffde94e"
/>

This PR adds the confirmation modal when trying to delete a control from
the edit flyout, and also moves the button to the flyout footer:
<img width="543" alt="Screenshot 2025-07-09 at 11 21 22 AM"
src="https://github.com/user-attachments/assets/5d3553c0-a42f-4cd1-ac4d-f2465e2a669a"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 092c22d)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jul 9, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) July 9, 2025 19:27
@kibanamachine kibanamachine merged commit 07d4140 into elastic:8.19 Jul 10, 2025
8 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #41 / Rule execution logic API - Basic License/Essentials Tier @ess @serverless @serverlessQA timestamp tests alerts generated from events with timestamp override field KQL should generate 2 alerts with @timestamp

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
controls 438 440 +2

Async chunks

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

id before after diff
controls 558.9KB 558.8KB -70.0B

History

cc @Zacqary

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