Skip to content

Conversation

jonsequitur
Copy link
Contributor

This adds support for RequestInput commands to carry type hints based on the magic command parser's type expectations. One example is implemented here, which is triggering a file dialog when the expected type is FileSystemInfo:

image

@jonsequitur jonsequitur enabled auto-merge (squash) August 31, 2022 22:10
@jonsequitur jonsequitur removed the request for review from brettfo August 31, 2022 22:10
@jonsequitur jonsequitur closed this Sep 1, 2022
auto-merge was automatically disabled September 1, 2022 16:51

Pull request was closed

@jonsequitur jonsequitur reopened this Sep 1, 2022
@jonsequitur jonsequitur closed this Sep 1, 2022
@jonsequitur jonsequitur reopened this Sep 1, 2022
@jonsequitur jonsequitur force-pushed the input-type-hints-and-file-browser branch from d68a7a0 to 0ec4844 Compare September 1, 2022 22:47
symbol switch
{
IValueDescriptor<DateTime> => "datetime-local",
IValueDescriptor<int> => "number",
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious, how did we populate this list and how do we keep it updated with new types? I'm sure it's not the end of the world if this doesn't cover everything as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#2245 makes this mechanism extensible.

@jonsequitur jonsequitur merged commit 557b07b into dotnet:main Sep 2, 2022
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.

3 participants