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

Add a spec for pane navigation #8375

Merged
merged 5 commits into from
Jan 11, 2021
Merged

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Nov 23, 2020

Summary of the Pull Request

This is a spec for "pane navigation", as we've already got a bit of an implementation in #8183. We've also had a heated discussion in Teams, and I wanted to capture a bit of that in a more formal doc. I suppose that "informal Teams chat" didn't work out in the end 😆.

Also, this is @PankajBhojwani's feature so I'm gonna let him drive. I mostly wrote this to test out a new spec template.

After discussion, we landed on proposal D, with a minor change of last to prev. This is how it was in #8183 before I started meddling 😝

PR Checklist

Detailed Description of the Pull Request / Additional comments

This is not my best spec ever - again, mostly just trying to spawn discussion, and prototype the new spec template.

@zadjii-msft zadjii-msft added Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs Product-Terminal The new Windows Terminal. labels Nov 23, 2020
@PankajBhojwani
Copy link
Contributor

Thanks so much for typing all of this up!

I'm a fan of proposal E :)

@PankajBhojwani
Copy link
Contributor

Update: Consensus from team sync was proposal D

@zadjii-msft
Copy link
Member Author

I believe we also want to change last to prev, which I believe is also how @PankajBhojwani had it before I started meddling 😝

@zadjii-msft zadjii-msft self-assigned this Nov 30, 2020
@zadjii-msft
Copy link
Member Author

(this one's ready for review)

zadjii-msft added a commit that referenced this pull request Dec 1, 2020
## Summary of the Pull Request

I think we all agree that the current spec template doesn't always work. I
thought this layout might be better for the kinds of settings discussions we
have (more and more frequently now).

This is largely for discussion with the team - if there are other things we want
added, changed, or if we just want to merge this in with the primary spec
template, I'm all ears.

## References

* An example of using this spec: #8375
Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

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

Mainly just need some kind of resolution to the "in-order traversal" question. The other stuff is just nits.

Comment on lines +254 to +255
Additionally, we concurred that the new "direction" value should be `prev`, not
`last`, for consistency's sake.
Copy link
Member

Choose a reason for hiding this comment

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

nit: you could just update Proposal D to use prev instead of last. But meh.

Comment on lines +286 to +287
These movements would necessarily need to be in-order traversals, since there's
no way of doing multiple MRU steps.
Copy link
Member

Choose a reason for hiding this comment

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

Is in-order traversal...

  • order the panes were opened, or
  • order the panes were interacted with?

I'd like a bit more discussion on the second one. I still don't understand the issue with the following approach:

  • maintain a linked list of weak references to Panes
  • prev/next navigates the list
  • if a pane was removed, skip the node
  • if a pane receives focus (except from prev/next action)...
    • clear all "next" panes from the list
    • replace with a weak ref to the newly focused pane

In my mind, that's how Ctrl+Z/Y works in text editors and how Back/Next work in web browsers.

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-order" is always "the order defined by the pane IDs" and "MRU order" is always the "order in which they were last interacted with".

I don't know if your comment was from before we discussed this in the meeting or not. TL;DR: Without another transient UI to manage the navigation of the MRU stack, it's not possible to know the difference between focus moving because of MRU pane navigation, or the user interacting with it. We'd have to hook all the possible interaction events for the control, and then manually handle them as "commit this navigation", and it's just a mess

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 4, 2020
Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

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

Seems fine to me.

@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Dec 11, 2020
@ghost
Copy link

ghost commented Dec 11, 2020

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

@zadjii-msft zadjii-msft removed the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Dec 14, 2020
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 14, 2020
@zadjii-msft
Copy link
Member Author

@DHowett @carlos-zamora Should we just merge this with the two? we already shipped the code...

Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

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

Whoops! Sorry for blocking!

@zadjii-msft zadjii-msft changed the title Add a spec for pane navigation, using the new template Add a spec for pane navigation Jan 11, 2021
@zadjii-msft zadjii-msft merged commit bc70a97 into main Jan 11, 2021
@zadjii-msft zadjii-msft deleted the dev/migrie/s/2871-pane-navigation branch January 11, 2021 18:16
mpela81 pushed a commit to mpela81/terminal that referenced this pull request Jan 28, 2021
## Summary of the Pull Request

This is a spec for "pane navigation", as we've already got a bit of an implementation in microsoft#8183. We've also had a heated discussion in Teams, and I wanted to capture a bit of that in a more formal doc. I suppose that "informal Teams chat" didn't work out in the end 😆.

Also, this is @PankajBhojwani's feature so I'm gonna let him drive. I mostly wrote this to test out a new spec template.

After discussion, we landed on proposal D, with a minor change of `last` to `prev`. This is how it was in microsoft#8183 before I started meddling 😝 

## PR Checklist
* [x] spec for microsoft#2871
* [x] I work here

## Detailed Description of the Pull Request / Additional comments

This is not my best spec ever - again, mostly just trying to spawn discussion, and prototype the new spec template.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants