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

Resize QuickOpen results if the window size is changed, and add scroll bars #6325

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Resize QuickOpen results if the window size is changed, and add scroll bars #6325

wants to merge 5 commits into from

Conversation

ishan1608
Copy link
Contributor

These changes add a scroll-bar to the results of QuickOpen when there are more results that can fit in the screen.
It also moves the results horizontally with the QuickOpen input area.

This addresses issues #1156 and #1157

Result :
15a2214

@ishan1608
Copy link
Contributor Author

my first commit cause the search results to expand to full window size even when there were fewer results.
15a2214-bug

this corrects it
edfcc5bc4

@peterflynn
Copy link
Member

@ishanatmuz The core team is on break until New Year's, so just fyi it will be a few more days before anyone is able to take a look at this in detail.


// Listen for the resizing of window to resize and move the smart_autocomplete_container accordingly
$(window).resize(function () {
var _smartAutocompleteContainerHeight = parseInt($(".main-view").css("height"), 10) - parseInt($("#status-bar").css("height"), 10) - 10;
Copy link
Member

Choose a reason for hiding this comment

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

Would be better to avoid this code duplication

@ishan1608
Copy link
Contributor Author

I am new to git. I never intended the commit 59671c3 to get included into this branch.
I don't even know why did it got included. I was just updating my master branch. Why did that merge got mentioned here ? Any suggestion as to how to avoid this in future ?

@ghost ghost assigned peterflynn Dec 29, 2013
@njx
Copy link

njx commented Jan 6, 2014

@ishanatmuz That's fine - it's just showing that you merged our master into your branch. It won't have any effect if/when we merge your branch back into master.

@marcelgerber
Copy link
Contributor

Bugs:

  • With the new Windows scrollbars, you can't scroll by clicking, only with the wheel
  • When pressing arrow-down to get to lower entries, the list won't get scrolled (you still see the upper entries)

@ishan1608
Copy link
Contributor Author

@SAplayer I am not that acquainted with bracket's source, though I will try to find how to fix this. If you have any ideas on what might be causing it and/or the direction where to look, please post here. That would be invaluable.

@marcelgerber
Copy link
Contributor

The problem with closing is maybe the auto-close of the ModalBars, which closes every ModalBar as soon as you click into the editor.
The other problem is maybe caused by some not-perfect handling in either QuickOpen.js or smart-autocomplete.js

A dev can tell you more about these for sure.

@pthiess
Copy link
Contributor

pthiess commented May 15, 2014

@peterflynn is this something you'd still like to dig into - maybe @redmunds could help?

@peterflynn
Copy link
Member

@ishanatmuz The PR I mentioned is now posted as #7227 -- sorry for the delay in getting that cleaned up & ready.

My new code still uses left/top, so the snippet I mentioned above doesn't go away entirely -- but I think if you base a patch on top of the branch in #7227 it will be a good deal cleaner. You can put the resize handler directly in QuickSearchField, instead of having to poke at it from outside. And you can just change left/top directly now, instead of having to calculate a delta & set margin to adjust the position.

@ishan1608
Copy link
Contributor Author

@peterflynn I have my University exams going on right now. They will be over by 23rd of May. If you can wait till then, then I would appreciate it.

@busykai
Copy link
Contributor

busykai commented Jan 3, 2015

It sounds like this PR should be re-worked on top of #7227 (branch pflynn/better-quicksearch-field) which [unfortunately] is not yet merged. This one, however, could be closed since #7227 changes the approach quite radically (and should be landed at some point).

@ishanatmuz, do you have time to submit a new PR as @peterflynn suggests?

@ficristo
Copy link
Collaborator

@ishanatmuz are you willing to setup a new PR with this fix?

@ishan1608
Copy link
Contributor Author

@ficristo I was caught up with other things in my life that I completely forgot about this. Let me see what I can do.

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

Successfully merging this pull request may close these issues.

9 participants