Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Find in Files provides no feedback when no results are matched #5237

Closed
cfjedimaster opened this issue Sep 17, 2013 · 21 comments
Closed

Find in Files provides no feedback when no results are matched #5237

cfjedimaster opened this issue Sep 17, 2013 · 21 comments
Assignees
Milestone

Comments

@cfjedimaster
Copy link
Contributor

Using "Find In Files" and passing a string that is not matched, there is no feedback that it wasn't found. Maybe it is obvious, but I thought it was broken at first.

@jasonsanjose
Copy link
Member

Tagged starter bug.

@cosmosgenius
Copy link
Contributor

i would like to fix this bug..

@redmunds
Copy link
Contributor

@cosmosgenius That's great -- it's all yours. Since there is a UI element to this fix, there might be some back-and-forth to get the solution just right. Not sure if you prefer to start by discussing your planned solution, or just submitting a pull request and making adjustments after we see what you've done.

cc: @larz0

@larz0
Copy link
Member

larz0 commented Sep 21, 2013

@cosmosgenius @redmunds I think while Brackets is searching we should keep the modal bar. If there are results then hide the bar; if there's no match then give the input a red border so we can search again.

screen shot 2013-09-21 at 3 37 07 pm

@cfjedimaster
Copy link
Contributor Author

IMO that looks perfect.

On Sat, Sep 21, 2013 at 5:38 PM, Larz notifications@github.com wrote:

@cosmosgenius https://github.com/cosmosgenius @redmundshttps://github.com/redmundsI think while Brackets is searching we should keep the modal bar. If there
are results then hide the bar; if there's no match then give the input a
red border so we can search again.

[image: screen shot 2013-09-21 at 3 37 07 pm]https://f.cloud.github.com/assets/1495261/1186611/625e5196-230e-11e3-9763-7ae0bcc570a8.png


Reply to this email directly or view it on GitHubhttps://github.com//issues/5237#issuecomment-24872055
.

Raymond Camden, Adobe Developer Evangelist

Email : raymondcamden@gmail.com
Blog : www.raymondcamden.com
Twitter: cfjedimaster

@TomMalbran
Copy link
Contributor

@larz0 I was thinking the same. Maybe we should disable the search input while searching too?

@larz0
Copy link
Member

larz0 commented Sep 22, 2013

@TomMalbran great idea. Thanks @cfjedimaster.

@cosmosgenius
Copy link
Contributor

i'll try out the implementation discussed and let you guys know

@cosmosgenius
Copy link
Contributor

i see in the present implementation, that the resolution to the search(line 188) is done inside the close function of the modal..
If the modal bar needs to be kept open the function flow changes... I need some pointers on this one.

Also i was thinking if it would be better if the function _showSearchResults return a boolean value to state if files for the search are present or not?

@redmunds
Copy link
Contributor

@larz0 Currently, the modal bar is dismissed immediately, then there's a small amount of time while the search is being done, then, if there are any results, the panel is displayed. Should the modal bar be displayed while the search is being done, or is it OK to dismiss it and then re-display it after search completes?

@cosmosgenius I think "no results" qualifies as "search results", so I think the code can go in _showSearchResults().

@larz0
Copy link
Member

larz0 commented Sep 24, 2013

@redmunds @cosmosgenius Ideally the modal bar should be displayed while the search is being done and dismissed when search results show up.

@redmunds
Copy link
Contributor

Maybe show a spinner or progress bar while during the search?

@larz0
Copy link
Member

larz0 commented Sep 24, 2013

Right now there's already a spinner on the cursor. Not sure about Windows. @TomMalbran mentioned we should disable the input field while there's a cursor spinner.

@redmunds
Copy link
Contributor

@cosmosgenius I thought of another question after you dropped off of IRC today. How are you getting "keep dialog open until search completes" code to work? In the current code, the search does not start until the dialog is dismissed, so it seems like that code is going to have to be refactored, anyway.

@cosmosgenius
Copy link
Contributor

yup i had to modify that part, I removed the resolve of the promise from the close function and moved it directly into the keydown handler.And moved the closing to _showSearchResults by passing the dialog object, That way we can control whether to close the dialog whether by checking if results are there or not.

@cosmosgenius
Copy link
Contributor

I actually took this bug as it seemed to have a small fix. I am new to brackets code so wanted a starting point. I am excited to do it but really require guidance, if code refactoring is required.

@redmunds
Copy link
Contributor

It sounds like you are figuring things out. Submit a pull request and I will review your code.

@cosmosgenius
Copy link
Contributor

i have send a pull request.

@redmunds
Copy link
Contributor

redmunds commented Oct 9, 2013

Nominating for Sprint 33.

redmunds added a commit that referenced this issue Oct 11, 2013
Fix for issue #5237 - Find in Files - No response for no result found
@ghost ghost assigned redmunds Oct 11, 2013
@redmunds
Copy link
Contributor

Closing. @cfjedimaster Let us know what you think about this solution.

@cfjedimaster
Copy link
Contributor Author

If it matches the screen shot, I'm cool with it. I typically run the release builds only.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants