Show number of search results & positions of hits in scrollbar#14045
Show number of search results & positions of hits in scrollbar#14045zadjii-msft merged 80 commits intomainfrom
Conversation
Co-authored-by: Don-Vito <[email protected]>
|
1fb4331...574f30b has the diff of this, rebased onto #15858 |
|
Alrighty this is cleaned up post-#15858. No throttling or aggregating searches one at a time anymore. |
| // - enable: if true, the buttons should be enabled | ||
| // Return Value: | ||
| // - <none> | ||
| void SearchBoxControl::SetNavigationEnabled(bool enabled) |
There was a problem hiding this comment.
this is still a "property setter"; should it be modelled as such in the IDL?
| Padding="0" | ||
| BackgroundSizing="OuterBorderEdge"> | ||
| BackgroundSizing="OuterBorderEdge" | ||
| Click="CaseSensitivityButtonClicked"> |
There was a problem hiding this comment.
technically, the way to do this kind of thing is to have a bunch of data bindings and property changed callbacks. It's "right," but it's not "fun" and it confers no benefit except that of clarity... so I am not going to block over it!
| const auto fullHeight{ ScrollBarCanvas().ActualHeight() }; | ||
| const auto totalBufferRows{ update.newMaximum + update.newViewportSize }; | ||
|
|
||
| auto drawPip = [&](const auto row, const auto rightAlign, const auto& brush) { |
There was a problem hiding this comment.
LOL, auto. you could drawPip("e", 1.3f, nullptr) and it would dutifully attempt to produce a lambda that supports that.
There was a problem hiding this comment.
It's only weird for the boolean, since it's the thing that is the most convertible.
DHowett
left a comment
There was a problem hiding this comment.
Thanks so much for dragging this across the finish line, and thanks to @Don-Vito for the original work. We wouldn't have done any of the ICU stuff if not for the both of you 😄
@zadjii-msft if you haven't already, make sure to put a Co-authored-by line at the bottom of the commit message (below the Closes and stuff)
|
Tested this out with Narrator. It reads out "results found" or "no results found", which is great! I think we should announce the index too (since that's information that visual users get but non-visual users can't access it). That's basically covered by #14153 though. |

This is a resurrection of #8588. That PR became painfully stale after the
ControlCoresplit. Original description:I cleaned it up a bit, and added support for also displaying the positions of the matches in the scrollbar (if
showMarksOnScrollbaris also turned on).It's also been made SUBSTANTIALLY easier after #15858 was merged.
Similar to before, searching while there's piles of output running isn't perfect. But it's pretty awful currently, so that's not the end of the world.
Gifs below.
Co-authored-by: Don-Vito [email protected]