Skip to content

Replace the UWP file export with the shell32 one - #11365

Merged
5 commits merged into
mainfrom
dev/migrie/b/export-text-nits
Oct 1, 2021
Merged

5 commits merged into
mainfrom
dev/migrie/b/export-text-nits

Conversation

@zadjii-msft

@zadjii-msft Mike Griese (zadjii-msft) commented Sep 29, 2021 •

Copy link
Copy Markdown
Member

Just like in #9760, we can't actually use the UWP file picker API, because it will absolutely not work at all when the Terminal is running elevated. That would prevent the picker from appearing at all. So instead, we'll just use the shell32 one manually.

This also gets rid of the confirmation dialog, since the team felt we didn't really need that. We could maybe replace it with a Toast (#8592), but meh

@ghost ghost added Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-2 A description (P2) Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. labels Sep 29, 2021
@github-actions

This comment has been minimized.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think the only thing that feels weird to me is that we export a file using CascadiaSettings::ExportFile(). I get that we're doing it so that we can leverage FileUtils.h, but would it be better for us to move FileUtils into the inc folder and just have it shared between projects? The only thing I think we would have to move out would be GetBaseSettingsPath.

That said, that's probably better as a CodeHealth follow-up, so I don't mind this for now.

@zadjii-msft Mike Griese (zadjii-msft) added the AutoMerge Marked for automatic merge by the bot when requirements are met label Sep 29, 2021
@ghost

Copy link
Copy Markdown

Hello Mike Griese (@zadjii-msft)!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

dialog->SetDefaultFolder(folderShellItem.get());
}
CATCH_LOG(); // non-fatal
THROW_IF_FAILED(dialog->SetFileTypes(ARRAYSIZE(supportedFileTypes), supportedFileTypes));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

std::size is the modern ARRAYSIZE.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

huh, to think i've been using std::extent<decltype(x)>::value all this time. thanks!

@ghost
ghost merged commit 85f0674 into main Oct 1, 2021
@ghost
ghost deleted the dev/migrie/b/export-text-nits branch October 1, 2021 18:33
@ghost ghost removed the Needs-Second It's a PR that needs another sign-off label Oct 11, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-UserInterface Issues pertaining to the user interface of the Console or Terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Issue-Task It's a feature request, but it doesn't really need a major design. Priority-2 A description (P2) Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree.

Projects

None yet

4 participants