Skip to content

Add descriptions to commands (namely, snippets) - #17376

Merged
Mike Griese (zadjii-msft) merged 13 commits into
mainfrom
dev/migrie/f/sxnui-tooltips-4
Jun 12, 2024
Merged

Mike Griese (zadjii-msft) merged 13 commits into
mainfrom
dev/migrie/f/sxnui-tooltips-4

Conversation

@zadjii-msft

Copy link
Copy Markdown
Member

This adds a "description" property to actions. Notably, the shell completion protocol (#3121) will now also populate that.

The suggestions UI can then use those descriptions to display an additional tooltip with that information.

TeachingTip was kinda an abject disaster last time I tried this, so this isn't a TeachingTip. It's literally a text block.

xlinks:

commit 8b19458
Author: Mike Griese <migrie@microsoft.com>
Date:   Fri Feb 16 05:49:37 2024 -0600

    I can't quite get bottom-up mode to work right

commit d77e3d5
Author: Mike Griese <migrie@microsoft.com>
Date:   Thu Feb 15 16:21:00 2024 -0600

    stash temporarily

commit 7b76ef8
Author: Mike Griese <migrie@microsoft.com>
Date:   Thu Feb 15 15:40:14 2024 -0600

    yea this looks better

commit 21ce4be
Author: Mike Griese <migrie@microsoft.com>
Date:   Thu Feb 15 14:04:04 2024 -0600

    out of body experience

commit ec36139
Author: Mike Griese <migrie@microsoft.com>
Date:   Thu Feb 15 13:48:06 2024 -0600

    an idea: just put the tooltips in the body?
@zadjii-msft

Copy link
Copy Markdown
Member Author

Gifs:
Top-down, suggestion menu
suggestions-tooltips-shell-completions

bottom-up suggestion palette
suggestions-tooltips-final

</ResourceDictionary>
</UserControl.Resources>

<Grid>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

guess what? we basically weren't using this Grid for anything. There was only ever _backdrop in it, taking up the whole thing.

This was a side-effect of command palette copypasta

@zadjii-msft Mike Griese (zadjii-msft) mentioned this pull request Jun 5, 2024
16 of 30 tasks

@PankajBhojwani PankajBhojwani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just some nits!

@zadjii-msft
Mike Griese (zadjii-msft) added this pull request to the merge queue Jun 12, 2024

// Now fill up the "subtitle" part of the "tooltip" with the actual
// description itself.
const auto& inlines{ _descriptionComment().Inlines() };

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.

Suggested change
const auto& inlines{ _descriptionComment().Inlines() };
const auto inlines{ _descriptionComment().Inlines() };

this is a bad habit, we should not perpetuate it

void SuggestionsControl::_recalculateTopMargin()
{
auto currentMargin = Margin();
// Call Measure() on the descriptions backdrop, so that it gets it's new

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.

Suggested change
// Call Measure() on the descriptions backdrop, so that it gets it's new
// Call Measure() on the descriptions backdrop, so that it gets its new

Merged via the queue into main with commit a7e2b46 Jun 12, 2024
@zadjii-msft
Mike Griese (zadjii-msft) deleted the dev/migrie/f/sxnui-tooltips-4 branch June 12, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants