Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

TokenizingTextBox remaining issues #3289

Open

Description

@michael-hawker

Describe the bug

Follow-ons from #3247 review.

  • P1 Figure out how to isolate our custom style from WinUI style changes - Michael

    • Extra padding below tokens in style (looks like TextBox is pushing box taller?) - @JustinXinLiu I haven't been able to figure out where this is from as it was working ok in our test environment, would you have time next week to take a look? Thanks!
    • This could also be the textbox's vertical alignment, but I've seen three different cases across different samples we've had, so I'm more confused now. Update I think this is due to extra styling being applied by having WinUI 2.x included in the package. I noticed in Update to WinUI 2.4 #3291 that WinUI 2.4 applied a border around the textbox, so there's a problem here of how we isolate our custom style from the WinUI updates.
  • AutoSuggestBox sizing issue (wrap to 2nd line, then remove token, query icon is now clipped as autosuggestbox doesn't resize, calling update is ignored, can repro with standard AutoSuggestBox, did I file a WinUI issue? need to find workaround)? - Michael (apparently, this works fine with keyboard input, it's only when clicking the remove on the token with the mouse that it occurs???)

  • Update code to use interface to do check for tokens vs. our specific implementation (i.e. replace PretokenStringContainer with ITokenStringContainer)?

  • P2 E-mail sample doesn't work in Release Mode???

  • P2 Keyboard token duplication issue

  • When fixed height and scroll out of view, border is behind tokens (see image below)

  • Update InterspersedObservableCollection to accept List

  • P2 Rounded corners on Tokens/Box? (had issue importing WinUI styles for this with conditional xaml before)

  • P2 Show red outline on text not parsed as token when focus lost

  • P1 Expose a object[] Tokens and a string[] Text type properties? (do we need SelectedText as well?)

    • We should audit the properties and make sure we don't have 'extras' which are no longer used too.
  • P1 Not enough padding on Right-side (partly issue with panels and ListView)

  • Missing QueryIcon (forgot about this, that we need to update it to share or only have one on the last one.)

Activity

  1. added
    bug 🐛An unexpected issue that highlights incorrect behavior
    on May 16, 2020
  2. added this to the 6.1 milestone on May 16, 2020
  3. michael-hawker commented on May 16, 2020

    @michael-hawker
    MemberAuthor

    For the release mode issue:
    image

  4. michael-hawker commented on May 17, 2020

    @michael-hawker
    MemberAuthor

    Good news is that the People Picker was quick to test out with the new control:

    image

    It apparently didn't inherit from the control though, so we should modify that to better expose the collections/events directly. Will need to do that next for more testing.

    You'll note in the screenshot though that the token alignment looks alright, but the textbox alignment is a bit high, which is different from the Sample App (so wondering if Sample App has a style that's interfering as well?)

  5. michael-hawker commented on May 26, 2020

    @michael-hawker
    MemberAuthor

    Just found out that the weird styling for the padding I was seeing was probably being inherited by changes made to styles in WinUI. We need to figure out how to isolate ourselves from these changes, as otherwise the control will look different if the developer is using WinUI in their project or not (as it's not required for the control, we just add it in to the Sample App).

    This explains why it was looking fine in our test environment, but then suddenly looked different in the Sample App.

    FYI @ranjeshj @stmoy

  6. mdtauk commented on May 28, 2020

    @mdtauk

    Don't forget to test these in a Dark Theme, as the Textboxes no longer remain in Light style when focused

  7. michael-hawker commented on May 28, 2020

    @michael-hawker
    MemberAuthor

    Thanks @mdtauk, I'm pretty sure I accounted for that already as part of another change to align to that update (as we have our own focus visuals mimicking that of a textbox). I'll double-check again though as I update the styles elsewhere.

  8. michael-hawker commented on May 29, 2020

    @michael-hawker
    MemberAuthor

    Have a solution for the WinUI padding, but hit another issue with how sizes of Icons work with styles (filed another issue here). Will need to think about how to work around this or possibly copy the resource around and listen for parent updates to modify...?

  9. michael-hawker commented on May 29, 2020

    @michael-hawker
    MemberAuthor

    Found a new issue with ScrollViewer clipping:

    image

    Might be because FocusVisual is behind the panel

  10. michael-hawker commented on May 30, 2020

    @michael-hawker
    MemberAuthor

    Huh, weird issue with filtering and keyboard in top sample box.

    1. Type 'a'
    2. Down Arrow
    3. Select 'Account'
      4 Type 'a' again
    4. Hit 'Enter'

    image

    Now have a duplicate item, of course if you then click the 'X' on the 2nd item the first item is removed (clearer if you add another different token between them, you can get the same repro). This also breaks keyboard navigation.

    Not sure if this is because of how we're filtering or an issue with AutoSuggestBox itself or timing issue???

    There should be someone to change the selection after filter?

  11. michael-hawker commented on May 30, 2020

    @michael-hawker
    MemberAuthor

    Thought I had a solution for the wrapping/icon issue when tokens are removed; however, it's only because it works fine with the keyboard. It only repros with the mouse for me. I did eliminate if Release mode made a difference, still reprod with the mouse.

  12. michael-hawker commented on Jun 1, 2020

    @michael-hawker
    MemberAuthor

    Layout issue:

    image

    When you click to remove a token:

    image

    (notice the icon isn't stretched, ignore the text being centered that's an issue with my attempt at a fix)

  13. michael-hawker commented on Jun 3, 2020

    @michael-hawker
    MemberAuthor

    Layout Issue is being resolved by #3319

  14. removed this from the 6.1 milestone on Jun 22, 2020
  15. added this to the 7.0 milestone on Jun 23, 2020
  16. modified the milestones: 7.0, 7.1 on Mar 2, 2021
  17. marcelwgn commented on Mar 13, 2021

    @marcelwgn
    Contributor

    Can we add a little padding to the right of the text so it doesn't sit flush with the close button on hove:

    Screenshot of TokenizingTextBox token on hover where text is touching the button border when hovered

  18. michael-hawker commented on Aug 31, 2021

    @michael-hawker
    MemberAuthor

    @marcpems any known issues being reported we should be aware of or has everything seemed good on your side?

  19. modified the milestones: 7.1, 7.2/8.0? on Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug 🐛An unexpected issue that highlights incorrect behavior

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions