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

Async rename commit #74794

Draft
wants to merge 63 commits into
base: main
Choose a base branch
from
Draft

Conversation

Cosifne
Copy link
Member

@Cosifne Cosifne commented Aug 17, 2024

Make commit operation async in renaming session if the commit behavior is triggered by enter or in the rename UI.
Rename behavior could be reversed back to sync mode by setting InlineRenameSessionOptionsStorage.RenameAsynchronously to false.

How it looks:
In legacy UI, if the renaming operation takes long time:
LegacyAsyncRename
In new UI, if the renaming operation takes long time:
ModernAsyncRename

@@ -817,6 +849,7 @@ await DismissUIAndRollbackEditsAndEndRenameSessionAsync(

private async Task CommitCoreAsync(IUIThreadOperationContext operationContext, bool previewChanges)
{
CommitStateChange?.Invoke(this, true);
Copy link
Member

Choose a reason for hiding this comment

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

what is this event for?

Copy link
Member Author

Choose a reason for hiding this comment

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

In legacy UI, when commit starts, we want to disable these buttons, because you can't edit these options once commit starts.
image
In new UI, when commit starts this event will make the UI collapse. Because it hides the background indicator tooltip
image

@CyrusNajmabadi
Copy link
Member

In legacy UI

Serious question: why do we have hte legacy UI. We've had the new UI for at least a year now. I would ask that we have a PR before thsi one that just rips it out and simplifies things greatly.

@Cosifne
Copy link
Member Author

Cosifne commented Aug 23, 2024

In legacy UI

Serious question: why do we have hte legacy UI. We've had the new UI for at least a year now. I would ask that we have a PR before thsi one that just rips it out and simplifies things greatly.

@ryzngard knows more here, but for me it's a fallback safe plan when things broken in new UI.

@Cosifne Cosifne marked this pull request as draft September 19, 2024 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Needs UX Triage untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants