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.
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 support for opening the Suggestions UI with recent commands #14943
Add support for opening the Suggestions UI with recent commands #14943
Changes from all commits
c96799c
1449088
d3b5533
0bda66f
ccfc834
c97ac66
7404dc3
f361b6c
b0fa972
985fcdb
e785bfc
48e7348
026f342
ff5eead
2c66c32
d94183b
8feb909
f5909d9
4516b4b
a3c4776
7988d89
84a41b4
36b5759
f3796da
f4c310a
dc71f0c
c9e7156
5defde5
57a5327
a172f53
e2cc278
e544871
173a830
a21c815
20f5651
236912a
442413f
9d5ef3a
cd2db82
22c94bf
28555a6
36b676a
b096469
4e46a63
6c778a6
172a298
dc4a832
19c1ed9
dd5458c
df92394
11916fd
1c52862
d593fe1
f56d258
4c2499c
057098e
62863f1
a530ccc
3fc364c
fb40b5d
d4422bb
2cf9f41
b8d8f11
741b773
434572a
12d2160
f10f14c
1a8275e
7ae4716
1720905
45a6e1d
7c3fd2a
3ee1f9b
ce70a37
f9a764e
a013020
0cf6475
902ee8e
8f0b6f8
4de9303
873d8d4
a21977b
16492a7
1759213
c1339bc
ef7f563
2bceb92
4110f2c
dff4ae3
3748900
f23c859
1e91a1c
f84d139
ee3a497
9355520
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I feel like the reliance on the cached
_direction
member here will lead to bugs. I think it would be more robust if there was a common function that would recompute the entire layout whenever any of its parameters change.I mean a size change should lead to potential a call to
_setDirection
right? If there was less state here and more "recomputations" (English word 404), would this be simpler? As such I think that this code should be abstracted: https://github.com/microsoft/terminal/blob/dev/migrie/f/14779-sxnui-recent-commands/src/cascadia/TerminalApp/SuggestionsControl.cpp#L1088-L1103...but it might be necessary to move even more logic in there.
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, I was hoping that by just starting with the right direction based off the size it opened with, then anything smaller would still make sense in that direction.
I worry that like, trying to rearrange the layout of the control while the size is changing is just gonna trigger another size change. I'm sure there's a correct way to do this with the Arrange/Layout events in WinUI, but that's a dark part of the framework I've been trying my best to avoid 😅