Skip to content

Conversation

AllanOXDi
Copy link
Member

@AllanOXDi AllanOXDi commented Sep 19, 2025

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.

@github-actions github-actions bot added APP: Facility Re: Facility App (user/class management, facility settings, csv import/export, etc.) DEV: frontend SIZE: small labels Sep 19, 2025
Copy link
Contributor

github-actions bot commented Sep 19, 2025

@nucleogenesis nucleogenesis self-assigned this Sep 23, 2025
@AllanOXDi AllanOXDi marked this pull request as ready for review September 26, 2025 19:20
Copy link
Member

@nucleogenesis nucleogenesis left a 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',
Copy link
Member

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',
Copy link
Member

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: {
Copy link
Member

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 });
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Facility Re: Facility App (user/class management, facility settings, csv import/export, etc.) DEV: frontend SIZE: small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update empty filter state messaging
2 participants