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

[pull] main from microsoft:main #101

Open
wants to merge 585 commits into
base: main
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 8, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Dec 8, 2023

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

As it turns out, you cannot use `<uap17:UpdateWhileInUse>`
(or any other newer namespace) unless you declare a corresponding
`MaxVersionTested` in your package manifest.
It does not appear that there's a reason for this, it just is.
`MaxVersionTested` is not to be confused with the `maxversiontested`,
which is something else entirely, but I updated it for safe measure.
Since `maxversiontested` is not a "max", but rather a list
of tested versions, it gets appended to the end of the list.

Closes #18119

This comment has been minimized.

There were two bugs:
* Ever since the conhost v1 -> v2 rewrite the `readDataDirect.cpp`
  implementation incorrectly passed `false` as the wait flag.
  The unintentional mistake is obvious in hindsight as the
  check for `CONSOLE_STATUS_WAIT` makes no sense in this case.
* The ConPTY integration into `InputBuffer` was done incorrectly,
  as it would unconditionally wake up the readers/waiters without
  checking if the buffer is now actually non-empty.

Closes #15859

## Validation Steps Performed
Test code:
```cpp
#include <Windows.h>
#include <stdio.h>

int main() {
    HANDLE in = GetStdHandle(STD_INPUT_HANDLE);
    INPUT_RECORD buf[128];
    DWORD read;

    SetConsoleMode(
        in,
        ENABLE_PROCESSED_INPUT | ENABLE_VIRTUAL_TERMINAL_INPUT
    );

    for (int i = 0; ReadConsoleInputW(in, buf, 128, &read); ++i) {
        printf("%d read=%lu\n", i, read);
    }

    return 0;
}
```
Run it under Windows Terminal and type any input. >50% of all
inputs will result in `read=0`. This is fixed after this PR.

This comment has been minimized.

## Summary of the Pull Request
Adds customization for the New Tab Menu to the settings UI.

- Settings Model changes:
- The Settings UI generally works by creating a copy of the entire
settings model objects on which we apply the changes to. Turns out, we
completely left the NewTabMenu out of that process. So I went ahead and
implemented it.
   -  `FolderEntry`
- `FolderEntry` exposes `Entries()` (used by the new tab menu to figure
out what to actually render) and `RawEntries()` (the actual JSON data
deserialized into settings model objects). I went ahead and exposed
`RawEntries()` since we'll need to apply changes to it to then
serialize.
- View Model:
- `NewTabMenuViewModel` is the main view model that interacts with the
page. It maintains the current view of items and applies changes to the
settings model.
- `NewTabMenuEntryViewModel` and all of the other `_EntryViewModel`
classes are wrappers for the settings model NTM entries.
- `FolderTreeViewEntry` encapsulates `FolderEntryViewModel`. It allows
us to construct a `TreeView` of just folders.
- View changes and additions:
   - Added FontIconGlyph to the SettingContainer
   - Added a New Tab Menu item to the navigation view
- Adding entries: a stack of SettingContainers is used here. We use the
new `FontIconGlyph` to make this look nice!
- Reordering entries: drag and drop is supported! This might not work in
admin mode though, and we can't drag and drop into folders. Buttons were
added to make this keyboard accessible.
- To move entries into a folder, a button was added which then displays
a TreeView of all folders.
   - Multiple entries can be moved to a folder or deleted at once!
   - Breadcrumbs are used for folders
- When a folder is entered, additional controls are displayed to
customize that folder.
 
## Verification
- ✅ a11y pass
- ✅ keyboard accessible
- scenarios:
   - ✅ add entries (except actions)
   - ✅ changes propagated to settings model (aka "saving works")
   - ✅ reorder entries
   - ✅ move entries to an existing folder
   - ✅ delete multiple entries
   - ✅ delete individual entries
   - ✅ display entries (including actions)

## Follow-ups
- [ ] add support for adding and editing action entries
- [ ] when we discard changes or save, it would be cool if we could stay
on the same page
- [ ] allow customizing the folder entry _before_ adding it (current
workaround is to add it, then edit it)
- [ ] improve UI for setting icon (reuse UI from #17965)

This comment has been minimized.

This upgrades to [check-spelling v0.0.24].

A number of GitHub APIs are being turned off shortly, so we need to
upgrade or various uncertain outcomes will occur.

There are some minor bugs that I'm aware of and which I've fixed since
this release (including a couple I discovered while preparing this PR).

There's a new accessibility forbidden pattern:

#### Should be `cannot` (or `can't`)

See https://www.grammarly.com/blog/cannot-or-can-not/
> Don't use `can not` when you mean `cannot`. The only time you're
likely to see `can not` written as separate words is when the word `can`
happens to precede some other phrase that happens to start with `not`.
> `Can't` is a contraction of `cannot`, and it's best suited for
informal writing.
> In formal writing and where contractions are frowned upon, use
`cannot`.
> It is possible to write `can not`, but you generally find it only as
part of some other construction, such as `not only . . . but also.`
- if you encounter such a case, add a pattern for that case to
patterns.txt.
```
\b[Cc]an not\b
```

[check-spelling v0.0.24]: https://github.com/check-spelling/check-spelling/releases/tag/v0.0.24

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

michaeljsXu and others added 2 commits December 5, 2024 04:18
## Summary of the Pull Request
Added open current directory action.
## References and Relevant Issues
Need to set this:
https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory

## Detailed Description of the Pull Request / Additional comments

## Validation Steps Performed
- Ensure shell has been configured
- Run "Open current working directory" action in command palette
- File explorer opens the correct directory

## PR Checklist
- [x] Closes #12859
- [ ] Tests added/passed
- [ ] Documentation updated
- If checked, please file a pull request on [our docs
repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
- [ ] Schema updated (if necessary)
Most of the logic is taken from the original PR (#15417) and adapted to work with the palette.

## References and Relevant Issues
[#12382](#12382)

This comment has been minimized.

This comment has been minimized.

This increases the console IO buffer size to retain at least 128KiB as
this matches the default buffer size of `cat`. This avoids allocator
churn due to constantly freeing and reallocating buffers. In the future
this should ideally use a better suited, cheap allocator.

Closes #18286

This comment has been minimized.

* Previously we would mark all gc=Cf (Control, format) codepoints
  as zero-width, but that ignores that the majority of them are also
  GCB=CN (Control = does not join), which meant we ended up with
  zero-width grapheme clusters. Those cannot exist under a terminal.
  So, this PR makes all gc=Cf, GCB=CN codepoints zero-width, but also
  treats them as Extender codepoints, which mirrors `wcswidth`.
* This PR also updates the tables to Unicode 16.0.
* Finally, there's a minor code cleanup of the generator.

Closes #18267

## Validation Steps Performed
* Unit tests ✅
* Thai does not have random gaps anymore due to ZWSP ✅

This comment has been minimized.

consvc and others added 2 commits December 6, 2024 12:32
Left, Top, Right and Bottom paddings can be set separetely in
`Appearance`. I tried to make it as close as possible to one of the
suggestions in #9127. I hope it doesn't look that bad.

Closes #9127

This comment has been minimized.

This comment has been minimized.

If we colored a tab, then switched to another tab, there's a bug that
the unselected tab loses its color. This was introduced in PR #18109.
This PR fixes that by actually applying the selected color to the tab
(whoops). Additionally, I removed setting the
"TabViewItemHeaderCloseButtonBackground" resource because it looked
weird (see comment in PR).

Closes #18226

This comment has been minimized.

Copy link

@check-spelling-bot Report

🔴 Please review

See the 📂 files view or the 📜action log for details.

Unrecognized words (179)
aarch
abi
activatable
admins
amd
apc
applets
argb
ASDF
ative
AVX
azzle
backpressure
BGR
bitmask
Bopomofo
BOTTOMLEFT
BOTTOMRIGHT
bstr
calt
cbuffer
cci
CFlags
changelist
Checkin
chk
cielab
clig
cls
cmt
cmyk
cnt
CNTRL
codepage
codepoints
colorspaces
COMDAT
configurability
cred
Crt
CUI
dbg
distro
django
DLOAD
ect
ectread
efg
efgh
egistry
elease
elems
emacs
emplates
enderer
endregion
eplace
erm
erminal
erminalcore
erminalinput
esource
estlist
estmd
estpasses
ests
esult
esultmacros
flyout
FONTFAMILY
FONTSIZE
FONTWEIGHT
FSCTL
GAUSSIAN
gcc
getch
GETFONTSIZE
GETPOS
GNUC
groupbox
GTR
HALFWIDTH
hashtable
HORZ
hread
hrottled
hsl
icket
Iconified
idx
ihilist
inheritdoc
inlines
ioctl
keydown
keyup
LFs
listdir
lnk
lss
MMIX
MOUSEMOVE
msys
nameof
natvis
Nop
NOUPDATE
nullability
numpad
oklab
ools
OOM
osign
otepad
ouicompat
passthrough
pcs
pgdn
pgup
pkey
prefs
prepopulated
ptrs
qos
rasterizer
RCDATA
rcl
rects
reparent
RGBCOLOR
roundtrips
RTTI
safearray
sapi
scancode
scrollbars
sdl
SETCOLOR
SETFONT
Shl
SND
srgb
Statusline
stl
strrev
subfolders
subkey
swappable
taskbar
testenv
texel
titlebar
TOPLEFT
TOPRIGHT
tprivapi
tsf
typelib
typeparam
UDM
uget
UIs
ules
umul
umulh
Uninitialize
untimes
upkg
vcpkg
vec
vectorized
versioned
vtable
walkthrough
WCAG
WINDOWTITLE
workaround
YDPI
YOffset
ype
Previously acknowledged words that are now absent APCs Argb bitmasks changelists Cmts codenav codepages distros EFG EFGh flyouts gitlab Ioctl keydowns keyups nerror rectread reparented resultmacros scancodes subkeys testenvs titlebars tvtseq :arrow_right:
To accept ✔️ these unrecognized words as correct and remove the previously acknowledged and now absent words, run the following commands

... in a clone of the git@github.com:microsoft/terminal.git repository
on the main branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.21/apply.pl' |
perl - 'https://github.com/annihilatorrrr/terminal/actions/runs/12285101272/attempts/1'
Errors (1)

See the 📂 files view or the 📜action log for details.

❌ Errors Count
❌ check-file-path 1

See ❌ Event descriptions for more information.

✏️ Contributor please read this

By default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.

If the listed items are:

  • ... misspelled, then please correct them instead of using the command.
  • ... names, please add them to .github/actions/spelling/allow/names.txt.
  • ... APIs, you can add them to a file in .github/actions/spelling/allow/.
  • ... just things you're using, please add them to an appropriate file in .github/actions/spelling/expect/.
  • ... tokens you only need in one place and shouldn't generally be used, you can add an item in an appropriate file in .github/actions/spelling/patterns/.

See the README.md in each directory for more information.

🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.