Skip to content

[Response-Ops] Rule create/edit form design updates#220704

Merged
justinkambic merged 10 commits intoelastic:mainfrom
justinkambic:response-ops_rule-create-form-design-updates
May 20, 2025
Merged

[Response-Ops] Rule create/edit form design updates#220704
justinkambic merged 10 commits intoelastic:mainfrom
justinkambic:response-ops_rule-create-form-design-updates

Conversation

@justinkambic
Copy link
Contributor

@justinkambic justinkambic commented May 9, 2025

Summary

This implements some design changes for the Rule create/edit form that are needed downstream in #217106 and #219019.

Once we are agreed on the implementation and ok to merge, we can go ahead. In the meantime, we can pull these changes into the existing PRs mentioned above so we can work on finalizing the layout as it will look, without needing to duplicate these commits in both places.

Updated create rule form

image

Updated details tab in edit flyout

image

@justinkambic justinkambic self-assigned this May 9, 2025
@justinkambic justinkambic requested a review from a team as a code owner May 9, 2025 17:41
@justinkambic justinkambic added release_note:skip Skip the PR/issue when compiling release notes Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. backport:version Backport to applied version labels v9.1.0 v8.19.0 labels May 9, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@justinkambic justinkambic requested a review from Copilot May 9, 2025 17:41
@github-actions github-actions bot added the author:obs-ux-management PRs authored by the obs ux management team label May 9, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements design updates for the Rule create/edit form needed to support downstream changes. Key updates include removing redundant translation constants and updating the layout in the rule details component to be responsive based on container width using a newly added ResizeObserver hook.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/platform/packages/shared/response-ops/rule_form/src/translations.ts Removed unused translation constants to simplify localization resources.
src/platform/packages/shared/response-ops/rule_form/src/rule_details/rule_details.tsx Refactored the layout from EuiDescribedFormGroup to a responsive EuiFlexGroup; added a custom ResizeObserver hook for adaptive layout.
Comments suppressed due to low confidence (1)

src/platform/packages/shared/response-ops/rule_form/src/rule_details/rule_details.tsx:81

  • Ensure that EuiFlexGroup correctly forwards the ref to a DOM element, as the current approach with ResizeObserver depends on accessing the actual container element. If EuiFlexGroup does not support ref forwarding, consider wrapping it in a native element (e.g., a div) and attaching the ref to that wrapper.
<EuiFlexGroup ref={ref} direction={width > RULE_DETAIL_MIN_ROW_WIDTH ? 'row' : 'column'}>

@mgiota mgiota self-requested a review May 19, 2025 11:53
@mgiota
Copy link
Contributor

mgiota commented May 19, 2025

@justinkambic I tested your changes locally and after I created a new custom threshold rule, here's the error I got. Not sure if it is related to your changes though. I'll check main as well and report back.

Screenshot 2025-05-19 at 15 07 53

@mgiota
Copy link
Contributor

mgiota commented May 19, 2025

Have a look at this scenario as well, where the rule details page breaks after I resize the page (it breaks when I am at the Details tab).

Screenshot 2025-05-19 at 15 07 53

Steps to reproduce:

  • Go to o11y rule details page
  • Click Actions > Edit
  • On the flyout go to Details tab
  • Resize the window
  • Close the flyout
  • Rule details page is broken

@mgiota
Copy link
Contributor

mgiota commented May 19, 2025

@justinkambic I just tested on main, and the issue does not happen there.

@justinkambic justinkambic force-pushed the response-ops_rule-create-form-design-updates branch from ceca146 to f2780d2 Compare May 19, 2025 15:51
@justinkambic
Copy link
Contributor Author

After rebasing with latest main and trying to re-create the failures you've demonstrated here, it isn't happening for me.

It is suspicious though, as we have a reference to ResizeObserver in this PR and you see the failure during a resize.

Which browser are you using for testing? I am wondering if we have some cross-browser compatibility potential issue here, and are not able to rely on this API.

@justinkambic justinkambic force-pushed the response-ops_rule-create-form-design-updates branch from b1223d3 to 9a8c834 Compare May 19, 2025 17:23
@adcoelho
Copy link
Contributor

I tested the issues that @mgiota reported and could not reproduce them. Maybe the rebase fixed them? I also see a bunch of commits since then.

@justinkambic
Copy link
Contributor Author

Maybe the rebase fixed them? I also see a bunch of commits since then.

Yeah I fixed the issue she reported. I am still seeing one strange FTR failure that seems unrelated-but-adjacent so I'm wondering if another rebase will fix that one 🤞

Thank you for the feedback, I will get this one mergeable tomorrow.

@justinkambic justinkambic force-pushed the response-ops_rule-create-form-design-updates branch from 9a8c834 to 574f00b Compare May 20, 2025 03:45
Copy link
Contributor

@mgiota mgiota left a comment

Choose a reason for hiding this comment

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

LGTM! After your fix, I can not reproduce the error I was seeing before. The other errors seem unrelated to your changes. Try to rebase with main and see if that fixes the failing tests

@justinkambic justinkambic force-pushed the response-ops_rule-create-form-design-updates branch from 79d5e57 to 31fcc7f Compare May 20, 2025 12:55
@justinkambic justinkambic force-pushed the response-ops_rule-create-form-design-updates branch from 31fcc7f to 4681951 Compare May 20, 2025 18:11
@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
apm 2.5MB 2.5MB -476.0B
discover 1011.3KB 1010.8KB -476.0B
infra 1.1MB 1.1MB -476.0B
lens 1.6MB 1.6MB -476.0B
ml 5.3MB 5.3MB -476.0B
monitoring 624.7KB 624.2KB -476.0B
observability 1.3MB 1.3MB -499.0B
slo 917.2KB 916.7KB -476.0B
synthetics 967.3KB 966.9KB -476.0B
transform 617.9KB 617.4KB -476.0B
triggersActionsUi 1.4MB 1.4MB -475.0B
uptime 486.2KB 485.7KB -476.0B
total -5.6KB

History

cc @justinkambic

@justinkambic justinkambic merged commit 6ad900d into elastic:main May 20, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15148780816

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 20, 2025
## Summary

This implements some design changes for the Rule create/edit form that
are needed downstream in elastic#217106
and elastic#219019.

Once we are agreed on the implementation and ok to merge, we can go
ahead. In the meantime, we can pull these changes into the existing PRs
mentioned above so we can work on finalizing the layout as it will look,
without needing to duplicate these commits in both places.

### Updated create rule form

<img width="1236" alt="image"
src="https://github.com/user-attachments/assets/06925dfe-bd61-4f99-bdca-2cdf7bbb5f60"
/>

### Updated details tab in edit flyout

<img width="776" alt="image"
src="https://github.com/user-attachments/assets/b250a4c9-fb2d-41cd-910a-aa42b61b5a5c"
/>

(cherry picked from commit 6ad900d)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request May 20, 2025
…221058)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Response-Ops] Rule create/edit form design updates
(#220704)](#220704)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Justin
Kambic","email":"jk@elastic.co"},"sourceCommit":{"committedDate":"2025-05-20T22:04:40Z","message":"[Response-Ops]
Rule create/edit form design updates (#220704)\n\n## Summary\n\nThis
implements some design changes for the Rule create/edit form that\nare
needed downstream in https://github.com/elastic/kibana/pull/217106\nand
https://github.com/elastic/kibana/pull/219019.\n\nOnce we are agreed on
the implementation and ok to merge, we can go\nahead. In the meantime,
we can pull these changes into the existing PRs\nmentioned above so we
can work on finalizing the layout as it will look,\nwithout needing to
duplicate these commits in both places.\n\n\n### Updated create rule
form\n\n<img width=\"1236\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/06925dfe-bd61-4f99-bdca-2cdf7bbb5f60\"\n/>\n\n###
Updated details tab in edit flyout\n\n<img width=\"776\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b250a4c9-fb2d-41cd-910a-aa42b61b5a5c\"\n/>","sha":"6ad900d8b4686f58e5070e0aa0c067f68579ad46","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0","author:obs-ux-management"],"title":"[Response-Ops]
Rule create/edit form design
updates","number":220704,"url":"https://github.com/elastic/kibana/pull/220704","mergeCommit":{"message":"[Response-Ops]
Rule create/edit form design updates (#220704)\n\n## Summary\n\nThis
implements some design changes for the Rule create/edit form that\nare
needed downstream in https://github.com/elastic/kibana/pull/217106\nand
https://github.com/elastic/kibana/pull/219019.\n\nOnce we are agreed on
the implementation and ok to merge, we can go\nahead. In the meantime,
we can pull these changes into the existing PRs\nmentioned above so we
can work on finalizing the layout as it will look,\nwithout needing to
duplicate these commits in both places.\n\n\n### Updated create rule
form\n\n<img width=\"1236\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/06925dfe-bd61-4f99-bdca-2cdf7bbb5f60\"\n/>\n\n###
Updated details tab in edit flyout\n\n<img width=\"776\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b250a4c9-fb2d-41cd-910a-aa42b61b5a5c\"\n/>","sha":"6ad900d8b4686f58e5070e0aa0c067f68579ad46"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/220704","number":220704,"mergeCommit":{"message":"[Response-Ops]
Rule create/edit form design updates (#220704)\n\n## Summary\n\nThis
implements some design changes for the Rule create/edit form that\nare
needed downstream in https://github.com/elastic/kibana/pull/217106\nand
https://github.com/elastic/kibana/pull/219019.\n\nOnce we are agreed on
the implementation and ok to merge, we can go\nahead. In the meantime,
we can pull these changes into the existing PRs\nmentioned above so we
can work on finalizing the layout as it will look,\nwithout needing to
duplicate these commits in both places.\n\n\n### Updated create rule
form\n\n<img width=\"1236\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/06925dfe-bd61-4f99-bdca-2cdf7bbb5f60\"\n/>\n\n###
Updated details tab in edit flyout\n\n<img width=\"776\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/b250a4c9-fb2d-41cd-910a-aa42b61b5a5c\"\n/>","sha":"6ad900d8b4686f58e5070e0aa0c067f68579ad46"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Justin Kambic <jk@elastic.co>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
## Summary

This implements some design changes for the Rule create/edit form that
are needed downstream in elastic#217106
and elastic#219019.

Once we are agreed on the implementation and ok to merge, we can go
ahead. In the meantime, we can pull these changes into the existing PRs
mentioned above so we can work on finalizing the layout as it will look,
without needing to duplicate these commits in both places.


### Updated create rule form

<img width="1236" alt="image"
src="https://github.com/user-attachments/assets/06925dfe-bd61-4f99-bdca-2cdf7bbb5f60"
/>

### Updated details tab in edit flyout

<img width="776" alt="image"
src="https://github.com/user-attachments/assets/b250a4c9-fb2d-41cd-910a-aa42b61b5a5c"
/>
qn895 pushed a commit to qn895/kibana that referenced this pull request Jun 3, 2025
## Summary

This implements some design changes for the Rule create/edit form that
are needed downstream in elastic#217106
and elastic#219019.

Once we are agreed on the implementation and ok to merge, we can go
ahead. In the meantime, we can pull these changes into the existing PRs
mentioned above so we can work on finalizing the layout as it will look,
without needing to duplicate these commits in both places.


### Updated create rule form

<img width="1236" alt="image"
src="https://github.com/user-attachments/assets/06925dfe-bd61-4f99-bdca-2cdf7bbb5f60"
/>

### Updated details tab in edit flyout

<img width="776" alt="image"
src="https://github.com/user-attachments/assets/b250a4c9-fb2d-41cd-910a-aa42b61b5a5c"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:obs-ux-management PRs authored by the obs ux management team backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants