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

UI: Update custom message list filters #26653

Merged
merged 5 commits into from Apr 26, 2024

Conversation

hashishaw
Copy link
Collaborator

@hashishaw hashishaw commented Apr 25, 2024

As part of managing the Ember 5 deprecations, the custom messages filters were causing errors in tests due to the DOM tearing down before the focus filter is able to finish running. Updating filters on type is a pattern we're moving away from, so to resolve the test failures we are replacing this filter bar with an explicit filter button.

Kapture 2024-04-25 at 15 23 48

  • Ent tests pass

@hashishaw hashishaw added the ui label Apr 25, 2024
@hashishaw hashishaw added this to the 1.17.0-rc milestone Apr 25, 2024
@hashishaw hashishaw requested a review from a team as a code owner April 25, 2024 20:21
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Apr 25, 2024
Copy link

github-actions bot commented Apr 25, 2024

CI Results:
All Go tests succeeded! ✅

Copy link

github-actions bot commented Apr 25, 2024

Build Results:
All builds succeeded! ✅

@action
onFilterInputChange(pageFilter) {
this.transitionToMessagesWithParams({ pageFilter });
@task
Copy link
Contributor

Choose a reason for hiding this comment

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

nicely handled!

@@ -126,10 +96,10 @@ module('Acceptance | Enterprise | config-ui/message', function (hooks) {
test('it should show an empty state when no messages are created', async function (assert) {
assert.expect(4);
await click(CUSTOM_MESSAGES.navLink);
Copy link
Contributor

Choose a reason for hiding this comment

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

nice clean up work

Copy link
Contributor

@Monkeychip Monkeychip left a comment

Choose a reason for hiding this comment

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

This looks great! You have a checkbox to run enterprise tests, a reminder to select that once you confirmed they've passed.

Copy link
Contributor

@hellobontempo hellobontempo left a comment

Choose a reason for hiding this comment

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

Great work! Thanks for adding the test coverage, just a few comments/questions. Nothing blocking

ui/lib/config-ui/addon/components/messages/page/list.hbs Outdated Show resolved Hide resolved
data-test-filter-by-message-type
/>
<form {{on "submit" (perform this.handleSearch)}} aria-label="Filter custom message list">
<Hds::SegmentedGroup as |S|>
Copy link
Contributor

Choose a reason for hiding this comment

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

👏

@task
*handleSearch(evt) {
evt.preventDefault();
const formData = new FormData(evt.target);
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 today I learned about the FormData class. Is this why you don't have to manage and track the value on the form inputs in the hbs file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's right! As long as we pass a name to the input, we can access the values by name from the form submit event. When we don't need to show other things based on form values or do validation on keyup, this is a simple way to handle form submits

ui/lib/config-ui/addon/components/messages/page/list.js Outdated Show resolved Hide resolved
@hashishaw hashishaw enabled auto-merge (squash) April 26, 2024 17:03
@hashishaw hashishaw merged commit 127838d into main Apr 26, 2024
31 checks passed
@hashishaw hashishaw deleted the ui/update-custom-message-filter-bar branch April 26, 2024 17:10
markafarrell pushed a commit to markafarrell/vault that referenced this pull request Apr 29, 2024
* use SegmentedGroup for custom messages list filter

* Update test coverage

* cleanup

* add changelog

* address pr comments
markafarrell pushed a commit to markafarrell/vault that referenced this pull request Apr 29, 2024
* use SegmentedGroup for custom messages list filter

* Update test coverage

* cleanup

* add changelog

* address pr comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants