-
Notifications
You must be signed in to change notification settings - Fork 814
Updates empty filter state messaging #13762
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
base: develop
Are you sure you want to change the base?
Conversation
Build Artifacts
|
…s match filters or search terms.
b732c09
to
b62ec64
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some change requests to make the strings handle plural values for clearer language. The logic for showing the strings works as expected in my local testing.
}, | ||
|
||
noUsersMatchFilter: { | ||
message: 'No users match this filter', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When @marcellamaki noted:
"No users match this filter" || "No users match these filters"
I think she meant that there would be differentiation between singular "this filter" and plural "these filters" when the user has selected only 1 vs more than 1 filter kinda like 'No users match {filtersCount, plural, one {this filter}, other {these filters}'
}, | ||
|
||
noUsersMatchFiltersAndSearch: { | ||
message: 'No users match this search and this filter', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other complication would be making this have a similar filtersCount
property which changes between this filter
and these filters
depending on the value you pass into the string function.
context: 'Side panel H1 heading showing the number of selected users to assign as coaches', | ||
}, | ||
|
||
noUsersMatch: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see where this string is used.
if (roleFilter.value && roleFilter.value.value !== ALL_FILTER) { | ||
return noUsersMatchFiltersAndSearch$(); | ||
} | ||
return noUsersMatchSearch$({ filterText: searchTerm.value }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to comments I left in the strings file - I think the logic here is right so you'd just have to pass in the proper number value of filters that are set ie noUsersMatchFiltersAndSearch$({filtersCount: ...})
for this and the other message
Summary
This PR updates the logic and message displayed when the user list is empty due to active filters or search terms.
Previously, we were using the generic "No users exist" message.
closes #13758
References
#13758
Reviewer guidance
Navigate to > users try searching for users that are not in the facility > filter roles that don't exist yet still.