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

Find in Files Improvements (Part 2: Pagination) #4303

Merged
merged 11 commits into from
Aug 8, 2013
Merged

Find in Files Improvements (Part 2: Pagination) #4303

merged 11 commits into from
Aug 8, 2013

Conversation

TomMalbran
Copy link
Contributor

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 and Less 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.

@TomMalbran
Copy link
Contributor Author

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.

@larz0
Copy link
Member

larz0 commented Jul 15, 2013

@TomMalbran I'm looking for the "more" and "less" links but can't find them. Here's a screenshot:

screen shot 2013-07-15 at 2 53 13 pm

@TomMalbran
Copy link
Contributor Author

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:

alt text

Could you test again with the latest commit? Thanks.

@larz0
Copy link
Member

larz0 commented Jul 16, 2013

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?

@TomMalbran
Copy link
Contributor Author

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.

@TomMalbran
Copy link
Contributor Author

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 >

@larz0
Copy link
Member

larz0 commented Jul 16, 2013

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 >".

@larz0
Copy link
Member

larz0 commented Jul 16, 2013

Also, maybe we should replace the em dash after "files" with ":" like:

"t" found in src/ — Over 318296 matches in 2846 files: < 101—200 >

@TomMalbran
Copy link
Contributor Author

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.

@larz0
Copy link
Member

larz0 commented Jul 16, 2013

Just do an opacity 0.3 on the arrow that can't be clicked.

@TomMalbran
Copy link
Contributor Author

Ok, great. One final thing before implementing this changes. Do you have the assets for a left pointing triangle, since jsTreeSprite.svg doesn't have one?

@larz0
Copy link
Member

larz0 commented Jul 16, 2013

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.

@TomMalbran
Copy link
Contributor Author

Sure, that should work, although in the long term having all 4 arrows in an svg might be better.

@larz0
Copy link
Member

larz0 commented Jul 16, 2013

Sounds good, I'll create a new task for myself.

@TomMalbran
Copy link
Contributor Author

@larz0 Design changes done. Let me know how it looks now.

@larz0
Copy link
Member

larz0 commented Jul 17, 2013

Looks good! I'll get someone to review the code now. Thanks @TomMalbran.

@JeffryBooher
Copy link
Contributor

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.

@larz0
Copy link
Member

larz0 commented Jul 18, 2013

Cool @JeffryBooher thanks for the heads up.

if (event.keyCode === KeyEvent.DOM_VK_ESCAPE) {
query = null;
$searchField
.bind("keydown", function (event) {
Copy link
Contributor

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.

Copy link
Contributor Author

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 () {

@JeffryBooher
Copy link
Contributor

@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.

@larz0
Copy link
Member

larz0 commented Aug 5, 2013

I can't wait!

@TomMalbran
Copy link
Contributor Author

@JeffryBooher done :)

@TomMalbran
Copy link
Contributor Author

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 : at the end, which look bad. Any suggestion about what to do? I was thinking of just showing the arrows and the results displayed, and both arrows disabled, or replace the : with a . or maybe with nothing.

@TomMalbran TomMalbran mentioned this pull request Aug 6, 2013
@larz0
Copy link
Member

larz0 commented Aug 6, 2013

@TomMalbran ahh yes. Let's remove the ":".

@TomMalbran
Copy link
Contributor Author

@larz0 will do.

@JeffryBooher
Copy link
Contributor

@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...

@TomMalbran
Copy link
Contributor Author

We will need an << and a >> icons (or similar), and probably smaller than the current arrows. Or we can add an input to write the page/match number?

@larz0
Copy link
Member

larz0 commented Aug 6, 2013

@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)

@TomMalbran
Copy link
Contributor Author

It is possible to create a >> icon with the current arrows SVG in CSS (if that is a good icon to use) and then replace them later with the final design.

@larz0
Copy link
Member

larz0 commented Aug 6, 2013

Here you go @TomMalbran, I've updated the sprite with new icons http://cl.ly/0Y0S252T2S1E

@TomMalbran
Copy link
Contributor Author

Awesome. Thanks.

@TomMalbran
Copy link
Contributor Author

Done. Added the go to first and last pages links.

@larz0
Copy link
Member

larz0 commented Aug 7, 2013

@TomMalbran awesome. Could you add "margin: 0 3px;" to the icons to space it up a bit?

@TomMalbran
Copy link
Contributor Author

margin: 0 3px; gives ends in 6px between 2 arrows, it looks like a bit too much? 1px looks good, and 2px too.

@larz0
Copy link
Member

larz0 commented Aug 7, 2013

@TomMalbran alright let's use 2px.

@TomMalbran
Copy link
Contributor Author

@larz0 done

@larz0
Copy link
Member

larz0 commented Aug 7, 2013

Looking at @JeffryBooher now :]

@JeffryBooher
Copy link
Contributor

All tests pass...merging

JeffryBooher added a commit that referenced this pull request Aug 8, 2013
Find in Files Improvements (Part 2: Pagination)
@JeffryBooher JeffryBooher merged commit 1fb9041 into adobe:master Aug 8, 2013
@TomMalbran TomMalbran deleted the tom/find-in-files-p2 branch August 8, 2013 07:51
@TomMalbran
Copy link
Contributor Author

Woot. Next part will be awesome too :)

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

Successfully merging this pull request may close these issues.

3 participants