-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Find in Files Improvements (Part 2: Pagination) #4303
Conversation
Any updates here? It looks like, maybe @larz0 didn't got notified, since assigning doesn't sends an email. Let me know if I should merge with master and fix the conflict issue too. |
@TomMalbran I'm looking for the "more" and "less" links but can't find them. Here's a screenshot: |
Hi @larz0. Thanks for looking into this. There was a merge conflict before. I think is what caused you to not see my changes. I just merged with master and fixed the conflict issue. I tested it, and this is how it should look: Could you test again with the latest commit? Thanks. |
This is rad @TomMalbran. While we're at it, we could probably simplify the panel title by making it less verbose: "t" found — Over 318296 matches in 2846 files < 101 — 200 > (with < and > being arrows, we could use the jsTreeSprite.svg) Thoughts? |
Still can't see them? It is strange if you can't. Are you at my branch? That sounds good. Not sure if it would be clear enough, but is understandable. Right now jsTreeSprite.svg only has down and right arrows, so we would need a left one. Maybe rename that file to arrows too. What should we do when showing the first 100 results and the last 100? I think that having a disabled left/right arrow would be the best to avoid changing the position of the arrows. Or maybe a blank space with the same size as the arrow. |
We should add the scope in the Result title, since that can change, when there is one. So in that case it could be: "t" found in src/ — Over 318296 matches in 2846 files — < 101 — 200 > |
Awesome. Sounds good. I just realized that number ranges shouldn't have any spacing on both sides of the em dash so it should be "< 101—200 >". |
Also, maybe we should replace the em dash after "files" with ":" like: "t" found in src/ — Over 318296 matches in 2846 files: < 101—200 > |
That looks better. Any suggestions as to what to do with: "t" found in src/ — Over 318296 matches in 2846 files: x 0—100 > Where x could be nothing, a disabled arrow or a blank image/space. |
Just do an opacity 0.3 on the arrow that can't be clicked. |
Ok, great. One final thing before implementing this changes. Do you have the assets for a left pointing triangle, since |
Try this on the sprite: -webkit-transform: translateZ(0) rotate(180deg); Not sure if it's 180deg. Also, translateZ(0) is needed to stop it from blurring. |
Sure, that should work, although in the long term having all 4 arrows in an svg might be better. |
Sounds good, I'll create a new task for myself. |
@larz0 Design changes done. Let me know how it looks now. |
Looks good! I'll get someone to review the code now. Thanks @TomMalbran. |
I started my initial review but I need to read through the changes a few more times... I have meetings most of the day today so I may not get back to it until later tonight or tomorrow. |
Cool @JeffryBooher thanks for the heads up. |
if (event.keyCode === KeyEvent.DOM_VK_ESCAPE) { | ||
query = null; | ||
$searchField | ||
.bind("keydown", function (event) { |
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.
why is there a newline before the call to bind()? looks awkward it looks like that was the only change to this block other than the indentation shifted to account for the bind moving to a new line.
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.
Is just a Style thing. It makes the next chained method looks better. Instead of having:
})
.bind(function () {
Where the second chained methods goes on the next line and indented. It looks now like:
})
.bind(function () {
@TomMalbran The code for this looks good, it looks like all of the changes made it in. I'm unable to test it however because you need to merge master into your branch to deal with the jslint submodule changeover. Can you merge master and I'll take another look and merge this in. We'd like to get this in for this sprint. |
I can't wait! |
@JeffryBooher done :) |
It looks like the jsTree Sprite changed, so I fixed it. @larz0 I just noticed that when there is only 1 page, no arrows are show, but the title still has the |
@TomMalbran ahh yes. Let's remove the ":". |
@larz0 will do. |
@larz0 I think we need first / last page affordances. We have the data so it should be simple to implement. I searched for "var" (without the quotes) on brackets source and there were 26001 matches... Takes awhile to get to the beginning / end using next / prev page... |
We will need an |
@JeffryBooher can we merge this for now and update it later? I'll need to create icons for the new affordances. (Don't search for "var" for now :p) |
It is possible to create a |
Here you go @TomMalbran, I've updated the sprite with new icons http://cl.ly/0Y0S252T2S1E |
Awesome. Thanks. |
Done. Added the go to first and last pages links. |
@TomMalbran awesome. Could you add "margin: 0 3px;" to the icons to space it up a bit? |
|
@TomMalbran alright let's use 2px. |
@larz0 done |
Looking at @JeffryBooher now :] |
All tests pass...merging |
Find in Files Improvements (Part 2: Pagination)
Woot. Next part will be awesome too :) |
This is the second incremental change from #3151 which mainly only adds Pagination and Double clicking on a file to add it to the working set.
Each page now always shows 100 results as before, and the new links
More
andLess
allow to see the next results or the previous ones. This can be changed if required. I also incremented the maximum amount of results per file to 300 since we can now see more than 100 results, but this number was randomly chosen so it can be modified. The collapsed folders are also restored when switching pages.