Skip to content

Clear filter text when switching tabs #3739

Closed

Description

@tierninho

For the Clone Repository modal:

  • Any text input in the search filter carries over from GitHub to Enterprise tab, and vice-versa. Should the filter be cleared if the user navigates to another tab? I noticed some visual performance lags due to this. My repo lists have already been loaded, yet any search filter carried over causes me to wait some time for the list to load again. The the filter was cleared, the list is immediately searchable.

screen shot 2018-01-08 at 10 40 12 am

screen shot 2018-01-08 at 10 41 03 am

screen shot 2018-01-08 at 10 55 18 am

Activity

  1. changed the title [-]Clone Repository [/-] [+]Possible edit to the Clone Repository modal[/+] on Jan 8, 2018
  2. changed the title [-]Possible edit to the Clone Repository modal[/-] [+]Possible edits to the Clone Repository modal[/+] on Jan 8, 2018
  3. iAmWillShepherd commented on Jan 8, 2018

    @iAmWillShepherd
    Contributor

    This should be split into separate issues. Check over the issues I've created to make sure I've captured everything.

    Also, I didn't want to edit your body, so would you mind removing the pieces I created a separate issue for?

  4. iAmWillShepherd commented on Jan 8, 2018

    @iAmWillShepherd
    Contributor

    I noticed some performance lags due to this. My repo lists have already been loaded, yet any search filter carried over causes me to wait some time for the list to load again.

    Looking over that screenshot of Chrome Dev Tools, it's looking as if no data is actually being transferred since the 304 HTTP code is being shown. Are you saying we shouldn't reload the list when the user switches tabs?

  5. iAmWillShepherd commented on Jan 8, 2018

    @iAmWillShepherd
    Contributor

    Also, just noticed one of these items is a duplicate of #3629

  6. tierninho commented on Jan 8, 2018

    @tierninho
    ContributorAuthor

    @iAmWillShepherd I removed the text in the body as requested. Was gonna eventually split them up but wasn't sure they were all worthy... but thanks for doing so!

    Yes, see the dupe now. Forgot about that one.

    Looking over that screenshot of Chrome Dev Tools, it's looking as if no data is actually being transferred since the 304 HTTP code is being shown. Are you saying we shouldn't reload the list when the user switches tabs?

    Implementing the clear on the tab switch will resolve my concern, which is that it interferes with the (visual) loading of the data. I experienced a delay in seeing my list as the app was doing a search at the same time.

  7. iAmWillShepherd commented on Jan 8, 2018

    @iAmWillShepherd
    Contributor

    ... which is that it interferes with the (visual) loading of the data.

    Ahh, got it.

  8. added
    help wanted
    good first issue
    on Jan 8, 2018
  9. changed the title [-]Possible edits to the Clone Repository modal[/-] [+]Clear filter text when switching tabs[/+] on Jan 8, 2018
  10. reyronald commented on Jan 12, 2018

    @reyronald
    Contributor

    Implementing the clear on the tab switch will resolve my concern, which is that it interferes with the (visual) loading of the data. I experienced a delay in seeing my list as the app was doing a search at the same time.

    @tierninho Wouldn't that mean that when switching back again to the first tab the previously entered text would be lost? Is that the desired behavior?

  11. tierninho commented on Jan 12, 2018

    @tierninho
    ContributorAuthor

    @reyronald Yes, that would be the intention, as any text entered would likely be relevant only to GitHub.com or Enterprise repos.

    One could argue either way I suppose. 🤔

  12. reyronald commented on Jan 12, 2018

    @reyronald
    Contributor

    @tierninho When I said "previously entered text" I meant the text entered when you were in that tab originally before switching, like this...

    1. In Enterprise tab, user types 'enterprise repo'
    2. Click Github tab, filter is cleared, doesn't have the text 'enterprise repo' anymore.
    3. Click Enterprise tab again... here do we want the text-box to still be blank, or should it have the original text 'enterprise repo' before step 2 ? In other words, should each tab "remember" what its filter was ? With your suggestion, implementing clear on each tab switching would mean the filter would be always blank when switching to any tab regardless, which is what I was wondering (?)
  13. tierninho commented on Jan 12, 2018

    @tierninho
    ContributorAuthor

    Ah gotcha, I hadn't considered step 3. I will leave the decision up to our core members and design team.

    Thanks for pointing out the additional use case!

  14. reyronald commented on Jan 13, 2018

    @reyronald
    Contributor

    I went ahead and pushed a PR with the initial suggested behavior in #3787. I also comitted the behavior I suggested in another branch and linked it there so we can compare.

  15. shiftkey commented on Feb 28, 2018

    @shiftkey
    Member

    This was fixed in #3787. Thanks again @reyronald!

  16. reyronald commented on Feb 28, 2018

    @reyronald
    Contributor

    @shiftkey my pleasure!

  17. locked as resolved and limited conversation to collaborators on Jul 18, 2018
  18. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions