Skip to content

TextBox with Height puts HintAssist.Hint right in the middle instead of the top. #3161

Closed

Description

@TWhidden

Bug explanation

We updated MaterialDesignThemes from 4.1 to 4.8 and noticed all the TextBox we had with a configured height will result in the materialDesign:HintAssist.Hint being put right in the middle of the TextBox instead of at the top (like it was before). For a test, I pulled latest on the MaterinalDesign repo, adjusted the height in the sample app to confirm it happens there also.

Example:
image
image

In our app with v4.8:
image

With the previous nuget package v4.1:
image

I am not sure if it's related to 4.8 directly - not sure how many changes between 4.1 and 4.8, but I suspect this is not how you want it rendering even for larger size TextBoxes.

If there is a style override, I can put that in, but wanted to report it as the Demo even shows this issue. Let me know if this is the desired behavior though so I can adjust accordingly. Thanks!

Version

4.8.0

Activity

  1. TWhidden commented on Apr 7, 2023

    @TWhidden
    ContributorAuthor

    As a follow up - going through the demo history - found this to be the reason. This commit added a VerticalAlignment="Center" - Removing it, aligns it back correctly

    image

    Result:

    image

    if this is the correct rendering, do you want me to submit a pull request for it? Any other side effects that we need to be aware of?

  2. TWhidden commented on Apr 7, 2023

    @TWhidden
    ContributorAuthor

    Related to #3056 change.

  3. TWhidden commented on Apr 7, 2023

    @TWhidden
    ContributorAuthor
  4. removed
    evaluation requiredItems is pending review or evaluation by the team
    on Apr 8, 2023
  5. added this to the 4.9.0 milestone on Apr 8, 2023
  6. Keboo commented on Apr 8, 2023

    @Keboo
    Member

    Excellent, writeup and diagnosis! Will see about getting a UI test and fix in place for this.

  7. nicolaihenriksen commented on Apr 8, 2023

    @nicolaihenriksen
    Contributor

    @TWhidden @Keboo Agree, very nice diagnosis, and spot on. As I introduced this regression, I took a look and created a draft PR to revert the not needed VerticalAlignment. I am a bit pressured on free time these days so if any of you want to take it over, please feel free to do so. The outstanding issue in the PR is the UI test(s) for the alignment scenarios.

    And perhaps also looking into what I mention in the PR as a potential "new" issue: that I don't believe the TextBox currently respects TextBox.VerticalContentAlignment which I would expect it to in a multiline scenario.

  8. TWhidden commented on Apr 8, 2023

    @TWhidden
    ContributorAuthor

    Not that this is a social forum - but really do appreciate this library. This lib has saved me many hours of styling. Thanks for knocking out a PR so fast. Not sure if 4.9 is due out any time soon, but what about just a patch-level release on 4.8? 4.8.1 ? I suspect others who have been using this lib for years will encounter it next time they update. The update is very small, no features and just a small styling bug fix. The only other option to fix this is to roll back (booo), or copy over the whole style and fix in your app (what I did). Ether way, very thankful for the quick response.

  9. Keboo commented on Apr 9, 2023

    @Keboo
    Member

    There are nightly releases that go out with preview nuget packages. You should be able to try updating to the latest preview to test the fix.

  10. nicolaihenriksen commented on Apr 10, 2023

    @nicolaihenriksen
    Contributor

    There are nightly releases that go out with preview nuget packages. You should be able to try updating to the latest preview to test the fix.

    Isn't that only from the master branch, and thus would require the PR to be merged?

  11. Keboo commented on Apr 16, 2023

    @Keboo
    Member

    Isn't that only from the master branch, and thus would require the PR to be merged?

    Opps yes that was a mistake on my part, I thought I had already merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions