Skip to content
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

Fixed UI/UX issues: alerts delete confirmation, combobox behaviors #60703

Merged
merged 9 commits into from
Mar 21, 2020

Conversation

YulNaumenko
Copy link
Contributor

Resolve #58364 and #60204

img1
img2

@YulNaumenko YulNaumenko added bug Fixes for quality problems that affect the customer experience Feature:Alerting v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.7.0 Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Mar 19, 2020
@YulNaumenko YulNaumenko requested a review from a team as a code owner March 19, 2020 21:53
@YulNaumenko YulNaumenko self-assigned this Mar 19, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@YulNaumenko YulNaumenko linked an issue Mar 20, 2020 that may be closed by this pull request
…sues

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Copy link
Contributor

@gmmorris gmmorris left a comment

Choose a reason for hiding this comment

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

Looks good!

Happy to approve, but I suggest the description needs to be amended before merging as this will close both #58364 and #60204 but it only addresses the delete confirmation and those issues include a bunch of other things that still need to be address in subsequent PRs.

Comment on lines +45 to +50
deleteAlert: (
alert: Alert
) => Promise<{
successes: string[];
errors: string[];
}>;
Copy link
Contributor

Choose a reason for hiding this comment

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

I like that we're using only one api for deleting (using deleteAlerts for both multiple and single deletion requests), but I have a little nit picky thought. :)
It feels weird returning { successes: string[]; errors: string[]; } when the user calls deleteAlert, as it's only one id.

Could we perhaps change the signature to { successes?: string; errors?: string;}?

Copy link
Member

Choose a reason for hiding this comment

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

If we're going to inline the type as is done here, agree w/Gidi that we could change the structure to match the semantic value. On the other hand, I can see this pattern of successes/errors being more widely used, and probably worth a separate type itself, and then having two different types - a "single" and "multiple" version - could get unwieldy.

Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

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

LGTM, but added a few comments. UI works as expected.

}): Promise<{ successes: string[]; errors: string[] }> {
const successes: string[] = [];
const errors: string[] = [];
await Promise.all(ids.map(id => http.delete(`${BASE_ALERT_API_PATH}/${id}`))).then(
Copy link
Member

Choose a reason for hiding this comment

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

I think if one delete fails, they will all report as failing. Seems like this needs to be restructured so that the delete's are wrapped in a function that never fails, but internally, it updates successes and errors, so that it can report a combination of successes and failures.

Seems survivable for 7.7, and should probably just be a new tech debt issue.

Comment on lines +45 to +50
deleteAlert: (
alert: Alert
) => Promise<{
successes: string[];
errors: string[];
}>;
Copy link
Member

Choose a reason for hiding this comment

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

If we're going to inline the type as is done here, agree w/Gidi that we could change the structure to match the semantic value. On the other hand, I can see this pattern of successes/errors being more widely used, and probably worth a separate type itself, and then having two different types - a "single" and "multiple" version - could get unwieldy.

…sues

# Conflicts:
#	x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx
#	x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts
…sues

# Conflicts:
#	x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@YulNaumenko YulNaumenko merged commit 0390251 into elastic:master Mar 21, 2020
YulNaumenko added a commit to YulNaumenko/kibana that referenced this pull request Mar 21, 2020
…lastic#60703)

* Fixed UI/UX issues: alerts delete confirmation

* Fixed 4. Popover disappears when clearing the field selector

* Fixed tests

* Fixed due to comments

* fixed tests

* Fixed test
# Conflicts:
#	x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 22, 2020
YulNaumenko added a commit to YulNaumenko/kibana that referenced this pull request Mar 22, 2020
…lastic#60703)

* Fixed UI/UX issues: alerts delete confirmation

* Fixed 4. Popover disappears when clearing the field selector

* Fixed tests

* Fixed due to comments

* fixed tests

* Fixed test
# Conflicts:
#	x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts
YulNaumenko added a commit that referenced this pull request Mar 22, 2020
…60703) (#60871)

* Fixed UI/UX issues: alerts delete confirmation

* Fixed 4. Popover disappears when clearing the field selector

* Fixed tests

* Fixed due to comments

* fixed tests

* Fixed test
# Conflicts:
#	x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 22, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 23, 2020
* master: (39 commits)
  [APM]Create custom link from Trace summary (elastic#59648)
  [ML] Fixing app clean up (elastic#60853)
  [SIEM] Use ECS categorisation for Authentication widgets (elastic#60734)
  [NP] Remove kbnUrl usage in discover/dashboard/visualize (elastic#60016)
  Skip failing test
  [Uptime]Update fetch effect failed action handling (elastic#60742)
  [npm] upgrade elastic/maki (elastic#60829)
  [Uptime] Add Settings Page (elastic#53550)
  [APM] service maps: avoid unnecesary `useDeepObjectIdentity` (elastic#60836)
  [Index management] Re-enable index template tests (elastic#60780)
  Fixed UI/UX issues: alerts delete confirmation, combobox behaviors (elastic#60703)
  [SIEM] Fix patching of ML Rules (elastic#60830)
  [APM] Service Map - Separate overlapping edges by rotating nodes (elastic#60477)
  [Alerting] fix flaky test for index threshold grouping (elastic#60792)
  [SIEM][Detection Engine] Adds test scripts for machine learning feature
  Flatten child api response for resolver (elastic#60810)
  Change "url" to "urls" in APM agent instructions (elastic#60790)
  [DOCS] Updates API requests and examples (elastic#60695)
  [SIEM] [Cases] Create case from timeline (elastic#60711)
  [Lens] Resetting a layer generates new suggestions (elastic#60674)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Alerting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A number of alerting UX observations of lower prio [Discuss] Delete confirmation for alerts and connectors
5 participants