Skip to content

persist repository filter text in app state after closing repository list - #2571

Merged
joshaber merged 9 commits into
masterfrom
move-filter-text-into-props
Sep 7, 2017
Merged

joshaber merged 9 commits into
masterfrom
move-filter-text-into-props

Conversation

@shiftkey

@shiftkey shiftkey commented Aug 29, 2017 •

Copy link
Copy Markdown
Member

A discussion in #2451 about making the repository list more friendly lead to spiking out what it would take to make the filter text in FilterList a prop rather than internal state.

This means we can move the repository list filter text into the application state and persist it between closing and reopening the repository list. The branches view also uses this component, but as we haven't discussed making this more persistent I've just moved the state up a level to retain that behaviour.

  • test repository list
  • test branches list
  • docs
  • measure rendering performance and contrast both approaches with 50 repos
  • feedback
  • focus on the filter text on first load if it's not empty

cc @adamreisnz

@shiftkey
shiftkey force-pushed the move-filter-text-into-props branch from d3d2328 to 358b5df Compare August 31, 2017 23:59
@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Sep 4, 2017
@shiftkey shiftkey changed the title make filter text a prop and move state out of FilterList persist repository filter text in app state after closing repository list Sep 4, 2017
@joshaber joshaber self-assigned this Sep 5, 2017

@joshaber joshaber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm into making the filter text a prop from an API design perspective, but I'm not 100% sold on making the repository filter text persist.

Speaking entirely for myself, when I cmd-T, it's to switch repositories. Keeping the filtered text is kinda the opposite of what I want. /cc @desktop/design

return
}

if (this.props.onFilterKeyDown) {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@j-f1

j-f1 commented Sep 5, 2017

Copy link
Copy Markdown
Contributor

Speaking entirely for myself, when I cmd-T, it's to switch repositories. Keeping the filtered text is kinda the opposite of what I want.

Wouldn’t you then start filtering the list again, resetting the search?

@adamreisnz

adamreisnz commented Sep 5, 2017 •

Copy link
Copy Markdown

@joshaber please see my reasoning in #2451

The current behaviour, is exactly what I don't want. I know that the repository categorisation etc. is not on the roadmap, so I thought of minimal changes that would make my life easier (I really have a lot of repos to manage and having to type the filter every single time I want to switch between "client" and "server" repo's of the same project which happens 20+ times per day is really annoying). This was one of the suggestions, and I would really like to see it implemented.

Is it possible to have a setting for it so that we can toggle the behaviour?

Or how about after CMD-T the focus is put on the filter text and the current text is selected? That won't slow you down if you want to type something else, yet will make it easier for me by having the current filter persisted.

@donokuda

donokuda commented Sep 5, 2017

Copy link
Copy Markdown
Contributor

Or how about after CMD-T the focus is put on the filter text and the current text is selected? That won't slow you down if you want to type something else, yet will make it easier for me by having the current filter persisted.

This seems like a reasonable compromise between the different workflows discussed above. I would prefer this approach over a settings approach.

@joshaber

joshaber commented Sep 6, 2017

Copy link
Copy Markdown
Contributor

Yup, I like that too 👍 💯

@shiftkey

shiftkey commented Sep 7, 2017

Copy link
Copy Markdown
Member Author

🍎

@joshaber
joshaber merged commit ed68d66 into master Sep 7, 2017
@joshaber
joshaber deleted the move-filter-text-into-props branch September 7, 2017 11:36
@adamreisnz

Copy link
Copy Markdown

Awesome guys, can't wait to try this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants