-
Notifications
You must be signed in to change notification settings - Fork 356
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
Clear Search box text #1893
Clear Search box text #1893
Conversation
c881eba
to
f8848e8
Compare
if @explorer | ||
# Reset both values when Search box Clear/Cancel is clicked | ||
# For explorer pages only for now | ||
@search_text = @sb[:search_text] = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GregP i think this should be outside of if @explorer
check
f8848e8
to
6528a8f
Compare
@h-kataria Ready for review. |
@@ -531,6 +531,13 @@ def filesystem_download | |||
send_data fs.contents, :filename => fs.name | |||
end | |||
|
|||
def adv_search_text_clear | |||
if @_params[:controller] == "vm_infra" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GregP do we need to only clear search text for Infrastructure VM explorer, wondering if it will just work for all explorers without this if condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is we do not yet set @explorer value to true when we process this clear text code. Timing issue at this point. But, yes, eventually, the preference is to provide app wide fix. Need more analysis before enabling all explorer pages.
6528a8f
to
028779b
Compare
@h-kataria Refactored code to pass along explorer. Back in [WIP] mode for now to see if this change works for application wide explorer pages. |
028779b
to
52daacb
Compare
52daacb
to
8430b63
Compare
Checked commit GregP@8430b63 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@h-kataria Ready for review. |
verified in UI |
Euwe backport details:
|
Clear Search box text (cherry picked from commit bbb3b95) https://bugzilla.redhat.com/show_bug.cgi?id=1496939
Fine backport details:
|
@GregP, @h-kataria : I think that this PR breaks the clear search button in the Hosts. |
@martinpovolny @h-kataria Per discussion, this fix was only intended for Explorer type pages. New code "funnels" all Search Text clearance user requests though a new central point, but only Explorer type pages then clear the search text box and reload page contents. All other pages, non Explorer type including Hosts page, act same way they used to prior to this fix: search text is cleared, but page contents not reloaded automatically. Hope this helps and resolves the issue/concern. |
Added code to clear out Search box text, fixes 2 BZs. Keeps Search text while navigating through accordions on a page, but clears out Search text when button is clicked and renders unfiltered data display.
https://bugzilla.redhat.com/show_bug.cgi?id=1346996
https://bugzilla.redhat.com/show_bug.cgi?id=1462638
============================
Screen shots post code fix:
Unfiltered data display:
Search text is cleared, unfiltered data rendered:
Search text has no data match: