-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Introduce read-only panes #8867
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some other notes:
- mildly concerned if "Close anyway" should be the primary button
- mildly concerned about some of the async changes to closing tabs
So, honestly, I'd want a design signoff from @cinnamon-msft and a closer look from @zadjii-msft (or @DHowett) for async tab closing.
Mostly nits, and I don't see any real issues, so I'm approving.
Yeah. I am mostly worried about the async nature of remove tab. Hope I didn't miss anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This mostly seems fine to me. I'm a little worried about the race in closing a pane. Hopefully if we move that logic within the tab itself, we can mitigate that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I found an unrelated crash while playing with this, but this seems good to me. Thanks! @cinnamon-msft will come around later to write up a docs page for this
ContentDialogResult warningResult = co_await _ShowCloseReadOnlyDialog(); | ||
|
||
// The primary action is canceling the action | ||
if (warningResult == ContentDialogResult::Primary) | ||
{ | ||
co_return; | ||
} | ||
|
||
// Clean read-only mode to prevent additional prompt if closing the pane triggers closing of a hosting tab | ||
if (control.ReadOnly()) | ||
{ | ||
control.ToggleReadOnly(); | ||
} | ||
} | ||
|
||
pane->Close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: what happens if we run sleep 5 ; exit
, then during the sleep mark a pane as read-only, then try to close the pane, then wait before confirming. We'll get the dialog, then the pane will close on its own, then we'll try to close it again. Is that fine (probably)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea probably, because of the atomic
added in Pane
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, this was fine. Nothing to worry about here.
I could see this in the Panes page of our docs, and also in our Tips and Tricks page. :) I'm happy to write up the docs for the 1.7 release with this! |
@zadjii-msft - what are the next steps here? I am worried about conflicts with #9024 😊 |
I have created an issue in the docs repo: MicrosoftDocs/terminal#241 |
@zadjii-msft - can I somehow help moving this forward? Actually there is a conflict.. |
Whoops, that's my B for not slapping automerge on this. I've resolved the conflict with #9034, and hopefully that will automerge itself in ~15 minutes. Sorry about that! |
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
e750f1b
to
e21e352
Compare
@zadjii-msft - there was some build error, so I re-merged. And now it is not auto-merge anymore 😊 |
Seems to be building now 😛 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done. Thanks!
Great feature! In which version this will be available? |
Any feature pull request that is merged will be available in the preview build that comes out after it was merged. Usually. :) |
Yeah, but I don't see it in the release notes |
Preview version 1.7 hasn’t been released yet, so I am not sure what release notes you’re talking about 😄 |
@DHowett Ohh, thanks! by the way, this is the BEST terminal I ever use! thank you so much for the active development and bringing cool and useful features in no time! Can't wait for this to be the default terminal. |
🎉 Handy links: |
Summary of the Pull Request
Introduces read-only panes.
When pane is marked as read-only:
PR Checklist
Detailed Description of the Pull Request / Additional comments
TermControl
(and prevents any send input)
is done by hiding the close button of the tab
(the followup might add this to the context menu)
Validation Steps Performed