Skip to content

Command palette search results should bold the matching text #6646

Closed

Description

Omitted from initial implementation in #6635.

I'm really unsure if this is possible in XAML, but hey, I think it would be important.

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jun 23, 2020
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jun 23, 2020
  3. added
    Area-UserInterfaceIssues pertaining to the user interface of the Console or Terminal
    Issue-TaskIt's a feature request, but it doesn't really need a major design.
    on Jun 23, 2020
  4. ghost removed
    Needs-Tag-FixDoesn't match tag requirements
    on Jun 23, 2020
  5. DHowett commented on Jun 23, 2020

    @DHowett
    Member

    If we're using TextBlocks we can just fill them with Runs generated at runtime 😄

  6. DHowett commented on Jun 23, 2020

    @DHowett
    Member

    image

    <TextBlock FontFamily="Segoe UI" FontSize="32">
      <Run FontWeight="Bold">N</Run><Run>ew</Run> <Run FontWeight="Bold">T</Run><Run>ab</Run>
    </TextBlock>
  7. zadjii-msft commented on Jun 23, 2020

    @zadjii-msft
    MemberAuthor

    Yes, that's easy enough, but then we need to hook up a lot more XAML - the Palette knows which characters need to be highlighted, so it would need to set that on each of the commands in the match list, then each of those guys would need to return a Run instead of just a string.

    It's not impossible, but it's a lot more XAML binding than anything I've done

  8. removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jun 25, 2020
  9. DHowett commented on Jun 25, 2020

    @DHowett
    Member

    Mind if I bump this one into 2.0? If you don't get to it, I'd like to. 😄

  10. 4 remaining items

  11. Don-Vito commented on Oct 19, 2020

    @Don-Vito
    Contributor

    Dustin L. Howett (@DHowett), Mike Griese (@zadjii-msft) - so this was planned to be a nice warmup exercise for Saturday morning. This was a bad decision 😄.. aka how to ruin a half of your weekend..

    • Defining a model that instead of a name stores a vector of matched and not matched segments - easy
    • Now let's bind it to the runs - the WinRT Textblock::Inlines are not bindable (ouch)
    • No problem, let's register an attached property and create runs in code behind - coded everything (even with nice converter), XAML complains on the binding. Reading WinRT docs (ouch 2):
      image
    • Ha, good luck defining imperatively dynamic context without tons of code-behind. No problem, I will simply create a custom control. WinRT TextBlock is sealed (ouch 3)
    • Found myself writing a User Control 😞

    On a positive side, it work.. on a negative I need to do a lot of cleanups before this worth a PR
    SearchHighlightNoMouse

  12. DHowett commented on Oct 19, 2020

    @DHowett
    Member

    Hey! I worked on this for a bit too, actually, during a hackathon! I ended up binding the content of a Border to a property that produces a TextBlock itself with its own inline runs constructed at runtime.

    I’ve been meaning to put it up for review, but I can hold off so we don’t have conflicting changes.

    Thanks for working on this!

  13. Don-Vito commented on Oct 19, 2020

    @Don-Vito
    Contributor

    Dustin L. Howett (@DHowett) - I kinda enjoyed 😄 . In any case please let me know if you believe it is something I should continue to productize - since if you have a working solution than probably we can skip mine.

    BTW, I am not complaining and not regretting anything, but consider removing "help wanted" - I've seen some additional items, that were marked as "help wanted" but were at different stages of implementation.

  14. DHowett commented on Oct 19, 2020

    @DHowett
    Member

    That’s a very good call (about not keeping the help tag on things we start working on). I expect your solution is better than mine—after all, mine was little more than a hack—so I’d love to see you finish it. A label that can highlight specific ranges is a very useful general-purpose UserControl.

  15. Don-Vito commented on Oct 19, 2020

    @Don-Vito
    Contributor

    Dustin L. Howett (@DHowett) - from what I've learnt observing this community is that your "hacks" are much better than the best contribution I can do! 😄 In any case will continue to productize it during this week (it is in a bad shape, as I didn't work with neither C++, nor XAML in the last 8 years).

  16. zadjii-msft commented on Oct 19, 2020

    @zadjii-msft
    MemberAuthor

    Don-Vito I love it! Looking forward to the PR ☺️

  17. ghost added
    In-PRThis issue has a related PR
    on Oct 20, 2020
  18. ghost removed
    In-PRThis issue has a related PR
    on Nov 6, 2020
  19. ghost added
    Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.
    on Nov 6, 2020
  20. added a commit that references this issue on Feb 25, 2024
    1aff3bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-UserInterfaceIssues pertaining to the user interface of the Console or TerminalIssue-TaskIt's a feature request, but it doesn't really need a major design.Priority-3A description (P3)Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions