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

Fix EmptyStateFilter not appearing in Namespace detail when filtering by repo/tags/sign state #3597

Merged
merged 2 commits into from
Apr 14, 2023

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Apr 14, 2023

Issue: AAH-2304

20230414040224

Previously EmptyStateFilter would only render when no data and filtering by keywords, adding the rest of CollectionFilter params.

@github-actions github-actions bot added backport-4.6 This PR should be backported to stable-4.6 (2.3) backport-4.7 This PR should be backported to stable-4.7 (2.4) labels Apr 14, 2023
@himdel himdel removed the backport-4.6 This PR should be backported to stable-4.6 (2.3) label Apr 14, 2023
@himdel himdel requested a review from jerabekjiri April 14, 2023 04:04
Copy link
Contributor

@jerabekjiri jerabekjiri left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jerabekjiri
Copy link
Contributor

Not related to this PR, but adding more than one tag breaks with

compound-filter.tsx:257 
Uncaught TypeError: newParams.push is not a function

fixes being unable to add more tags to filter when filtering by 1 tag
(it works when 0 tags, falling back to []; works when 2+ tags because it is automatically an array; but fails to add/remove tags when only one is selected)
@himdel
Copy link
Collaborator Author

himdel commented Apr 14, 2023

Ah, when 0 or 2+ tags, they get treated as an array of tags,
but with only one tag, it becomes a string.

Wrapping in an array :)

@himdel himdel merged commit 1a08a6b into ansible:master Apr 14, 2023
@himdel himdel deleted the namespace-collections branch April 14, 2023 23:04
@patchback
Copy link

patchback bot commented Apr 14, 2023

Backport to stable-4.7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4.7/1a08a6bb539370f3d545a5eb24b31d5bfa22f6c3/pr-3597

Backported as #3604

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Apr 14, 2023
… by repo/tags/sign state (#3597)

* Fix EmptyStateFilter not appearing in Namespace detail when filtering by repo

Issue: AAH-2304

* compoundFilter: one tag is a string, not an array - convert to array

fixes being unable to add more tags to filter when filtering by 1 tag
(it works when 0 tags, falling back to []; works when 2+ tags because it is automatically an array; but fails to add/remove tags when only one is selected)

(cherry picked from commit 1a08a6b)
himdel added a commit that referenced this pull request Apr 15, 2023
… by repo/tags/sign state (#3597) (#3604)

* Fix EmptyStateFilter not appearing in Namespace detail when filtering by repo

Issue: AAH-2304

* compoundFilter: one tag is a string, not an array - convert to array

fixes being unable to add more tags to filter when filtering by 1 tag
(it works when 0 tags, falling back to []; works when 2+ tags because it is automatically an array; but fails to add/remove tags when only one is selected)

(cherry picked from commit 1a08a6b)

Co-authored-by: Martin Hradil <mhradil@redhat.com>
@github-actions github-actions bot added the backported-4.7 This PR has been backported to stable-4.7 (2.4) label Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-4.7 This PR should be backported to stable-4.7 (2.4) backported-4.7 This PR has been backported to stable-4.7 (2.4)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants