foreman icon indicating copy to clipboard operation
foreman copied to clipboard

Pf4 autocomplete

Open MariaAga opened this issue 2 years ago • 1 comments

depends on https://github.com/theforeman/foreman/pull/9186 This pr will break remote execution plugin. The component is based on this demo: https://www.patternfly.org/v4/components/search-input/react-demos

MariaAga avatar Jun 24 '22 13:06 MariaAga

Issues: #34764

theforeman-bot avatar Jun 24 '22 13:06 theforeman-bot

@Ron-Lavi This is ready now :partying_face: Also fixed a bug where users will go to audits?page=1&per_page&search=os++%3D++CentOS+ (or any search) and the search bar was empty

MariaAga avatar Sep 22 '22 12:09 MariaAga

@Ron-Lavi Fixed the tests. app/assets/javascripts/filters.js was removed because it was part of the old filters page and using autocomplete actions

MariaAga avatar Sep 29 '22 11:09 MariaAga

Needs a rebase

adamruzicka avatar Nov 02 '22 12:11 adamruzicka

Rex pr: https://github.com/theforeman/foreman_remote_execution/pull/748

MariaAga avatar Nov 21 '22 21:11 MariaAga

Thanks for the review! I can add a search on clicking the clear button, but it will be a sudden change for users that are used for it just deleting the text. also in a lot of pages it will reload the whole page which might get annoying if users only wanted to type something different. Maybe adding searchOnClear bool option for the search?

MariaAga avatar Nov 22 '22 10:11 MariaAga

I can add a search on clicking the clear button, but it will be a sudden change for users that are used for it just deleting the text.

There are two interactions here -

When I've executed a search already, and I'm viewing search results, and the search input is unaltered (still displaying my search text), and I haven't changed the text - then clicking the X should execute an empty search.

When I've typed something / changed the search input, but I haven't clicked our beautiful new right arrow submit button - then clicking the X should just clear the search input and not execute an empty search.

cc @MariSvirik

jeremylenz avatar Nov 22 '22 14:11 jeremylenz

I think the clear button should only do one action per page, either deleting or searching, but both are even more confusing

MariaAga avatar Nov 22 '22 14:11 MariaAga

If that's what we end up deciding I guess that's okay. But we will have to change Katello search to match that. Needs some more discussion.

jeremylenz avatar Nov 22 '22 14:11 jeremylenz

There are two interactions here -

When I've executed a search already, and I'm viewing search results, and the search input is unaltered (still displaying my search text), and I haven't changed the text - then clicking the X should execute an empty search.

When I've typed something / changed the search input, but I haven't clicked our beautiful new right arrow submit button - then clicking the X should just clear the search input and not execute an empty search.

Isn't this what we decided to do last week? ... to follow console dot? And also to change everything that can be changed in Satellite accordingly? That's how the cancel button works in the console dot (more or less. Even though the console triggers a search on inactivity when there is an input). Maybe let's consider X to be ' Reset' - clearing the search field and going back to the default state of the table rather than either searching or deleting. Does this make sense? @jeremylenz @MariaAga

MariSvirik avatar Nov 28 '22 16:11 MariSvirik

Changed the clear button functionality

MariaAga avatar Dec 05 '22 12:12 MariaAga

@MariaAga please squash, I guess..?

jeremylenz avatar Dec 05 '22 13:12 jeremylenz

Thanks! squashed

MariaAga avatar Dec 05 '22 13:12 MariaAga

Test failure unrelated; merging

jeremylenz avatar Dec 05 '22 16:12 jeremylenz