Skip to content

improving the performance of the Compare Branches experience - #4390

Merged
iAmWillShepherd merged 37 commits into
compare-branchesfrom
remembering-branches
Apr 4, 2018
Merged

iAmWillShepherd merged 37 commits into
compare-branchesfrom
remembering-branches

Conversation

@shiftkey

@shiftkey shiftkey commented Apr 4, 2018 •

Copy link
Copy Markdown
Member

This is myself and @iAmWillShepherd pairing on the Compare Branches experience to address a few concerns raised:

  • the ahead/behind for each branch is being computed when the component loads, leading to some repainting issues
  • the state and actions of the Compare Tab is unclear
  • components are carrying around a lot of internal state - we should push this up into AppState

Goals:

  • refactor the CompareState to better align with the visual model of the Compare tab, and introduce CompareAction to represent actions that the component sends to update the app state
  • reduce the amount of state in the Compare view to simplify the component
  • compute and store the ahead/behind info for all refs against the current branch in a key-value store
  • emit updates when the ahead/behind on branches are computed, so that the list updates when it's expanded
  • [ ] ensure foreground updates (for a selected branch) can be prioritized over background updates (for branches in the list) 👢 to the next pairing session
  • invalidate the compare cache when switching branches

@shiftkey shiftkey mentioned this pull request Apr 4, 2018
29 tasks done
@shiftkey
shiftkey force-pushed the remembering-branches branch from f6fcdb3 to a8a563b Compare April 4, 2018 03:24
@shiftkey

shiftkey commented Apr 4, 2018 •

Copy link
Copy Markdown
Member Author

Other polish bits for tomorrow:

  • When typing in non-existent branch names the branch list is eventually empty, which resets the filter, which then displays all branches again
    • expected behaviour: show "no branches" message, filter text persists despite not matching any branches

  • branch selector in compare tab should have "clear filter" icon like our branch switcher does fixed in compare-branches, merged into this branch

  • expected behaviour: when filter text shown, Esc should clear filter text. When no filter text: Esc should blur text box.

  • after selecting a branch to compare, switching Compare -> Commit -> Compare remembers most of the form state except for the filter text

missing-filter-text

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 4, 2018
@shiftkey shiftkey added this to the 1.2.0 milestone Apr 4, 2018
@shiftkey

shiftkey commented Apr 4, 2018

Copy link
Copy Markdown
Member Author

Some other little visual things to call out

  1. Repro Steps (I think):
  • checkout a branch that's not master
  • compare to master
  • with the compare visible, checkout master

You should see the compare end up in this state:

Expected behaviour: reset the compare to show the history of the new branch

Also note that the "No branches" graphic doesn't seem to be in the right spot relative to the container

  1. The default text when a comparison has no commits is "No history" - I think this should be something like "No commits"

@iAmWillShepherd
iAmWillShepherd merged commit 9219a89 into compare-branches Apr 4, 2018
@iAmWillShepherd
iAmWillShepherd deleted the remembering-branches branch April 4, 2018 22:54
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.

2 participants