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

Implement a reusable empty state partial for all places that need them #1224

Open
kasugaijin opened this issue Dec 8, 2024 · 4 comments · May be fixed by #1255
Open

Implement a reusable empty state partial for all places that need them #1224

kasugaijin opened this issue Dec 8, 2024 · 4 comments · May be fixed by #1255
Assignees

Comments

@kasugaijin
Copy link
Collaborator

kasugaijin commented Dec 8, 2024

We don't do a great job at showing empty states in the app. We show them sometimes, and other times not. The task in this issue is to implement a single empty state partial. Given most of our empty states are used with filters, we can have default text in the partial like 'No results matching your search criteria', and to handle other cases, e.g., 'You have no liked pets', we can pass the string we want to display, and if provided, show that instead.

Please place this partial somewhere top level because it will be used throughout the app, e.g., app/views/shared and then update all places we should use an empty state.

Off the top of my head, this includes

  • Staff > pets, adoption applications, fosters, default pet tasks (where we use filters)
  • The adoptable pets path
  • Adopter Fosterer > liked pets, adopted pets, fostered pets
  • click around and see if you can find another place...but I think that's it?

We have some places that display an empty state in a table (like adopter fosterer > adoption applications, or Staff > Pet photos/attachments). It might make sense to leave these as is and not use the new partial. You can be final judge of that.

@kasugaijin kasugaijin added the Ready Make a comment to get assigned. label Dec 8, 2024
@jp524
Copy link
Contributor

jp524 commented Dec 11, 2024

I'd like to help with this!

@jmilljr24
Copy link
Collaborator

@jp524 Thanks!

@jmilljr24 jmilljr24 removed the Ready Make a comment to get assigned. label Dec 11, 2024
@jp524
Copy link
Contributor

jp524 commented Dec 14, 2024

@kasugaijin In the existing code I'm seeing places where i18n is used through the config/locales/en.yml file. There are some places where i18n isn't used though. What is the preference here?

@kasugaijin
Copy link
Collaborator Author

@jp524 please use translations and structure them for lazy look up where possible. Technically all our view copy should come from a translation file…there’s a few spots that have not been updated yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants