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

[Uptime] Improve filter group #88185

Merged
merged 19 commits into from
Jan 21, 2021

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Jan 13, 2021

Summary

note to reviewers, do not review until #87571 is merged

Resolves #88180.

Adds unit tests for the FilterGroupComponent to ensure appropriate text is displayed during loading and when items are present, and ensures the popover functionality displays filter items.

An additional focus of this PR is improving a11y concerns while this code is being touched for test add. Improving the state of aria-labels not only improves the UX for users that rely on these attributes, it makes testing easier as well.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@justinkambic justinkambic added bug Fixes for quality problems that affect the customer experience v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.12.0 labels Jan 13, 2021
@justinkambic justinkambic self-assigned this Jan 13, 2021
@justinkambic justinkambic force-pushed the uptime_improve-filter-group branch from a76cac1 to 452882c Compare January 13, 2021 21:37
@justinkambic justinkambic force-pushed the uptime_improve-filter-group branch from 452882c to 0d27256 Compare January 14, 2021 20:17
@justinkambic justinkambic added release_note:skip Skip the PR/issue when compiling release notes v7.11.0 labels Jan 15, 2021
@justinkambic justinkambic marked this pull request as ready for review January 15, 2021 16:40
@justinkambic justinkambic requested a review from a team as a code owner January 15, 2021 16:40
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

schemes: [],
locations: ['nyc', 'fairbanks'],
},
filterAriaLabels.TAG,
Copy link
Contributor

Choose a reason for hiding this comment

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

will it be filterAriaLabels.TAG in all cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I misunderstood your ask. I will address this.

if (isOpen) {
// only update these values on close
onFilterFieldChange(fieldName, tempSelectedItems);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks to RTL 🚀

@justinkambic
Copy link
Contributor Author

@elasticmachine merge upstream

@justinkambic
Copy link
Contributor Author

@elasticmachine merge upstream

@justinkambic
Copy link
Contributor Author

@shahzad31 please have a look at 8fb99f5 and re-approve if it looks good to you. Thanks!

@kibanamachine
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
uptime 1.1MB 1.1MB +1.5KB

History

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

Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

@justinkambic justinkambic merged commit f0be0ad into elastic:master Jan 21, 2021
justinkambic added a commit to justinkambic/kibana that referenced this pull request Jan 21, 2021
* Unskip "Observer location" test block.

* Commit temp "describe.only" to make flaky test runner go faster.

* Add optional chain for some potentially-null props.

* Make overview filters type partial.

* Repair broken types.

* Remove only call from test.

* Add unit tests and mark areas for improvement in \`FilterGroup\` component.

* Add aria-label translations and new labels.

* Refactor existing tests and add tests for new labels.

* Fix bug in event handler and update tests.

* Delete a comment.

* Delete a comment.

* Add some line breaks to help readability.

* Add additional tests, fix a bug.

Co-authored-by: Kibana Machine <[email protected]>
justinkambic added a commit that referenced this pull request Jan 21, 2021
* Unskip "Observer location" test block.

* Commit temp "describe.only" to make flaky test runner go faster.

* Add optional chain for some potentially-null props.

* Make overview filters type partial.

* Repair broken types.

* Remove only call from test.

* Add unit tests and mark areas for improvement in \`FilterGroup\` component.

* Add aria-label translations and new labels.

* Refactor existing tests and add tests for new labels.

* Fix bug in event handler and update tests.

* Delete a comment.

* Delete a comment.

* Add some line breaks to help readability.

* Add additional tests, fix a bug.

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
justinkambic added a commit that referenced this pull request Jan 21, 2021
* Unskip "Observer location" test block.

* Commit temp "describe.only" to make flaky test runner go faster.

* Add optional chain for some potentially-null props.

* Make overview filters type partial.

* Repair broken types.

* Remove only call from test.

* Add unit tests and mark areas for improvement in \`FilterGroup\` component.

* Add aria-label translations and new labels.

* Refactor existing tests and add tests for new labels.

* Fix bug in event handler and update tests.

* Delete a comment.

* Delete a comment.

* Add some line breaks to help readability.

* Add additional tests, fix a bug.

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Kibana Machine <[email protected]>
@justinkambic
Copy link
Contributor Author

@justinkambic justinkambic deleted the uptime_improve-filter-group branch January 21, 2021 20:47
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 release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.11.0 v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Uptime] FilterGroup component is untested and has accessibility issues
5 participants