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

Back Office Product List - Hide search field and filters when there are no products in list #12983

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saunmanoj888
Copy link
Contributor

@saunmanoj888 saunmanoj888 commented Nov 18, 2024

What? Why?

What should we test?

  • When a new person signs up and goes to the admin for the first time, they likely won't have any product, verify that in this scenario, search filter should not be present

  • When products are present and user searches with a product name which is not present in the list, search filter should still be visible

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

@saunmanoj888 saunmanoj888 force-pushed the 12957-hide-search-filter-for-no-products branch from fa26cf4 to d17c38c Compare November 18, 2024 20:06
Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

Part of me wonders if it should be more directly counting the number of producers that the user has access to. We could do that by re-factoring part of the query in ProductsV3Controller#fetch_products.
But this way seems reliable enough, and is actually more efficient 👍

app/views/admin/products_v3/_content.html.haml Outdated Show resolved Hide resolved
@saunmanoj888 saunmanoj888 force-pushed the 12957-hide-search-filter-for-no-products branch from d17c38c to 87d7f73 Compare November 21, 2024 18:46
@saunmanoj888 saunmanoj888 requested a review from mkllnk November 21, 2024 18:51
Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

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

Nice! Well done.

Our testing team will look at this next.

@mkllnk mkllnk added the technical changes only These pull requests do not contain user facing changes and are grouped in release notes label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical changes only These pull requests do not contain user facing changes and are grouped in release notes
Projects
Status: Test Ready 🧪
Development

Successfully merging this pull request may close these issues.

Back Office Product List - Hide search field and filters when there are no products in list
4 participants