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

[USH-1238] "There are no posts yet" - Separate the text for when there are no posts & when no filters match #1460

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

Ifycode
Copy link
Member

@Ifycode Ifycode commented Nov 15, 2024

Solution implemented explained

  • Show "There are no posts yet" text on feed view, when default filters is on (i.e. all 6 filter types are in default state) but there are no posts. There are 2 scenarios for this:
    • There are no posts at all in the deployment: You can test this by logging in as an admin for a deployment that has no posts at all.
    • There are posts in the deployment, but none can be viewed by a user due to the permissions they have.
  • Show "No posts match the current filters. Please Change or Clear filters to see matching posts" text on feed view, when not default filters (i.e. at least one of the 6 filter types are in default state) and there's no matching post for user's filter selection/combination
  • Search by keyword detection and no posts message:
    • Keyword search only (i.e. searching posts by keyword when Default filters is on): Use "No posts match your keyword search. Please change or clear keyword search to see matching posts".
    • Keyword search + filters applied (i.e. searching posts by keyword when not in default filters): Use "No posts match your keyword search + filters. Please change or clear keyword search and/or filters to see matching posts".

@Ifycode Ifycode added Web Client Code submitted for the Web Client Q4 - sprint labels Nov 15, 2024
@Ifycode
Copy link
Member Author

Ifycode commented Nov 15, 2024

PR now ready for review @Angamanga

Copy link
Contributor

@Angamanga Angamanga left a comment

Choose a reason for hiding this comment

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

@Ifycode
Copy link
Member Author

Ifycode commented Nov 15, 2024

Pasting answer here too for anyone interested:

What the change does - this.clearPostsResults(); is supposed to restore this.searchQuery to an empty string on page reload, so that the localStorage.setItem('USH_searchPostByKeyword', this.searchQuery); can be correctly set at that point. Otherwise, localstorage still has a previous value even though the search by keyword input field is cleared/empty on reload. No posts message will therefore not display the correct message we intend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Q4 - sprint Web Client Code submitted for the Web Client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants