Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we can delete branches fast in the dashboard #1907

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

kaste
Copy link
Collaborator

@kaste kaste commented Apr 22, 2024

We want to enable e.g. ddd to delete three branches in a row. Hence we must stay on the main thread ("sync" or blocking) so that after the deletion, first the view updates and only then the next key press is processed.

Note that we have similar problem in the status view where we call interface.refresh_repo_status_and_render() to have a blocking update, which is more elegant and self-contained. That is not done easily here as we call out to a command gs_delete_branch which is commonly used. To make this command parametric just to change its final side-effect util.view.refresh_gitsavvy_interfaces(self.window) seems more work and might not worth it.

Truly a technical debt PR.

We want to enable e.g. `ddd` to delete three branches in a row.  Hence
we must stay on the main thread ("sync" or blocking) so that after the
deletion, first the view updates and only then the next key press is
processed.

Note that we have similar problem in the status view where we call
`interface.refresh_repo_status_and_render()` to have a blocking update,
which is more elegant and self-contained.  That is not done easily here
as we call out to a command `gs_delete_branch` which is commonly used.
To make this command parametric just to change its final side-effect
`util.view.refresh_gitsavvy_interfaces(self.window)` seems more work
and might not worth it.
@kaste kaste enabled auto-merge April 22, 2024 16:56
@kaste kaste merged commit 31df139 into master Apr 22, 2024
8 checks passed
@kaste kaste deleted the fast-branch-deletions branch April 22, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant