Feat: Show update progress in winbar #432
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @harrisoncramer, this is an attempt to implement #409.
With this PR, the winbar shows the time since the last update of the discussion data and it shows a simple animation when the data is being reloaded.
There are some shortcomings that would require some more work to solve:
left
orright
for the discussion tree, so that the "Inline Comments" section can easily move outside of the window. To fix this, we'd have to add some more elaborate winbar string calculation that would take the window width and the components into account. This can be done in a separate follow-up PR, I believeThe current order:
would change to:
I haven't tried this, but I believe it would make the discrepancy between the winbar and the discussion tree much smaller. I'm going to give this a try.
* I've made some simple measurements, and it looks like even in a very small testing repo with a very small MR (13 items in the overview) it takes about 2 seconds for the discussion tree to reload. The drafts are reloaded in fractions of a second. I'm wondering if this is just how Gitlab works, or if there may be some way to make the go server do this faster.