-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Response Ops] [Rule Form] Add Show Request and Add Action screens to flyout #206154
Draft
Zacqary
wants to merge
29
commits into
elastic:main
Choose a base branch
from
Zacqary:195211-demodalize-flyout
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Zacqary
added
release_note:skip
Skip the PR/issue when compiling release notes
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
v9.0.0
Feature:Alerting/RulesManagement
Issues related to the Rules Management UX
v8.18.0
labels
Jan 10, 2025
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
Zacqary
force-pushed
the
195211-demodalize-flyout
branch
from
January 10, 2025 21:14
0f462bd
to
990cb8e
Compare
💔 Build Failed
Failed CI StepsHistory |
Zacqary
force-pushed
the
195211-demodalize-flyout
branch
from
January 10, 2025 21:32
990cb8e
to
2191969
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Alerting/RulesManagement
Issues related to the Rules Management UX
release_note:skip
Skip the PR/issue when compiling release notes
Team:ResponseOps
Label for the ResponseOps team (formerly the Cases and Alerting teams)
v8.18.0
v9.0.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is DEPENDENT on #206141
Because we use a fork-and-pull contribution structure at Elastic, Github is not able to base this PR off the correct branch without opening the PR outside the main Kibana repo. Please use manual diffing tools to review this code until #206401 merges
Summary
Part of #195211
Screenshot
Screenshot
Screenshot
Implementation notes
In order to get the action connectors UI to render the same way in both a modal and the flyout, without duplicating a large amount of code, I had to introduce a little bit of complexity. Within the Rule Page, it's as simple as opening the UI inside a modal, but the flyout cannot open a second flyout; it has to know when and how to completely replace its own contents.
<RuleActionsConnectorsBody>
.<RuleActionsConnectorsModal>
and<RuleFlyoutSelectConnector>
act as wrappers for this component.<RuleActions>
step no longer handles rendering the connector UI, because it's not at a high enough level to know if it's in the<RulePage>
or the<RuleFlyout>
. Instead, it simply sends a signal up the context hierarchy tosetIsConnectorsScreenVisible
.RuleFormScreenContext
keeps track ofisConnectorsScreenVisible
, a state for whether or not the action connectors "screen" is open, regardless of whether that screen is displayed in a modal or a flyout.isConnectorsScreenVisible
to determine whether to render the modal. This works the same way as it used to, but handled by the<RulePage>
instead of the<RuleActions>
component.isConnectorsScreenVisible
to determine whether to continue to render<RuleFlyoutBody>
or to completely replace its contents with<RuleFlyoutSelectConnector>
For consistency, this PR also moves the Show Request modal/flyout screen into the same system.
Testing
To test the new flyout, edit
packages/response-ops/rule_form/src/create_rule_form.tsx
andpackages/response-ops/rule_form/src/edit_rule_form.tsx
so that they render<RuleFlyout>
instead of<RulePage>
.Use this diff block
Still Todo
Checklist