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

[ResponseOps] [Cases] UX enhancements #146608

Merged
merged 22 commits into from
Dec 5, 2022

Conversation

adcoelho
Copy link
Contributor

@adcoelho adcoelho commented Nov 29, 2022

Fixes #144614

Summary

Case Detail Page

  • The ‘Add comment’ button in the Case detail page is now disabled until a comment is filled in.
  • The save button in the 'Edit Comment' section of the Case detail page is now disabled if a comment is empty.
  • The Tags in the activity stream now display a hollow badge equal to the ones on the sidebar.
  • Fixed the spacing between the headings in the sidebar. The gutter size was increased.

Case Creation Page

  • The Create and Cancel buttons were too close together. The distance between them was increased.
  • There is now a confirmation dialog if the user clicks the cancel button.
  • Introduced a restricted page width. The max is now 1200px.

All Cases list

  • Brought back the distance between tags in the rows

Screenshots

Disabled Add comment buttonScreenshot 2022-11-29 at 19 04 25
Enabled Add comment buttonScreenshot 2022-11-29 at 19 04 34
Hollow tagsScreenshot 2022-11-29 at 19 03 33
Fixed sidebar spacingScreenshot 2022-11-28 at 12 11 52
Create and Cancel button spacingScreenshot 2022-11-29 at 19 05 54
Cancel create case confirmation dialogScreenshot 2022-11-29 at 19 06 03
Centered, restricted page widthScreenshot 2022-11-28 at 14 58 34
Margin between tagsScreenshot 2022-12-02 at 10 59 26

@adcoelho adcoelho added release_note:skip Skip the PR/issue when compiling release notes UX Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature Spacetime labels Nov 29, 2022
@adcoelho adcoelho requested a review from a team as a code owner November 29, 2022 18:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

@@ -22,7 +21,7 @@ export const schema: FormSchema<AddCommentFormSchema> = {
type: FIELD_TYPES.TEXTAREA,
validations: [
{
validator: emptyField(i18n.COMMENT_REQUIRED),
validator: emptyField(''),
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need this schema file since we're not showing any errors anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't display the error but I thought some frontend validation wouldn't harm. 😅

Copy link
Member

@cnasikas cnasikas Dec 1, 2022

Choose a reason for hiding this comment

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

The emptyField validator will throw an error if the comment contains only empty characters. The current behavior is to show an error message to the user in this scenario. I think we should keep showing the error and change the error message (only for the above scenario) to something more descriptive like "Empty comment is not allowed". Another alternative is to disable the button if the comment contains only empty characters but I found it a bit confusing that I cannot press the button even though I typed something. The error message will inform me of the requirements.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I agree with @cnasikas. I think what Michael was getting at in the issue was to not show an error if the user hasn't typed anything yet. So if there's an easy way to differentiate between hasn't typed vs typed all spaces we should show an error if it's all spaces but just disable the button if the user hasn't typed.

handleSaveAction,
handleCancelAction,
}) => {
const [{ content }] = useFormData<{ content: string }>({ watch: [fieldName] });
Copy link
Member

Choose a reason for hiding this comment

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

nit: Is a bit confusing that we pass a variable for the field but the type and the destructed value are known. Maybe we can remove the fieldName prop and hardcode the field name to content

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cases 512 515 +3

Async chunks

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

id before after diff
cases 347.5KB 348.9KB +1.4KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
cases 127.1KB 127.1KB +9.0B
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 109 115 +6
securitySolution 443 449 +6
total +20

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 68 74 +6
osquery 110 117 +7
securitySolution 520 526 +6
total +21

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Spacetime Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) UX v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ResponseOps]Case Detail UX issues
9 participants