New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Add visible inner label for NcInputField
on border
#4394
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good and the text has more space around which makes it more readable. All the while using less height. It's true that the icon is not a problem with the other approach either.
I would probably avoid moving the label left in the transition when there's a leading icon. What do you think @susnux?
I like it, but the initial state looks like the field already has a content, although it seems to be a placeholder/the label. I fear this could mislead users. |
I agree. Otherwise looks good to me :) |
Thank you for your feedback, so far I would change it to:
|
Sounds good to me 👍 |
dacb6e8
to
d05b825
Compare
@szaimen @dartcafe @marcoambrosini I fixed the label color and the horizontal shift, it looks like this now: input.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! :)
But didnt review the code
Looks good! :)
With those fixes it would look like this: Recording.2023-08-18.160931.mp4Also, on my system there is some text getting cut off, and it changes according to the zoom level. ccing @marcoambrosini as well :) |
This comment was marked as outdated.
This comment was marked as outdated.
277dc6f
to
cfd6e06
Compare
wow, that is great! Thanks a lot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Could you please increase a contrast of labels on not focused state? see nextcloud/server#36948 If contrasts are enough - just ignore it ;)
cfd6e06
to
0d17b9f
Compare
Fixed that, the label is now start-aligned with the input and with the focused label (So the first letter is always on the same x position)
Was a regression of the last commit, fixed again. On question for me is: Should the text stay that color? Currently it will be max-contrast when not focused to have a visual hover / focus state (as the border color can not change).
Would you mind try again? I fixed the label height. |
The contrast is currently 4.54 : 1 |
Works now 👍
That's a good point. I would say that it could just stay |
The inner label is now visible, to disable any label set `label-outside` to true, `label-visible` property is removed. The label is shown instead of the placeholder if the input is empty and not focussed, when focussed the label is moved up and scaled but always shown. Make label color max-contrast so it does not look like content and remove horizontal label movement Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
…nges with always shown labels Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
0d17b9f
to
916ba53
Compare
Squashed the fixup commits |
NcInputField
on border
…ield In previous versions the label was shown above the input which gives the text more space which might be better than the inline label from #4394 in some scenarios. This is a breaking change as it renames the previous labelVisible property to a labelOutside property. The label should always be visible with the new NcInputField, however we can optionally decide to have the label outside. Signed-off-by: Julius Härtl <jus@bitgrid.net>
…ield In previous versions the label was shown above the input which gives the text more space which might be better than the inline label from #4394 in some scenarios. This is a breaking change as it renames the previous labelVisible property to a labelOutside property. The label should always be visible with the new NcInputField, however we can optionally decide to have the label outside. Signed-off-by: Julius Härtl <jus@bitgrid.net>
☑️ Resolves
Alternative to #4287 as requested by @marcoambrosini
🖼️ Screenshots
vokoscreenNG-2023-08-02_17-42-57.mp4
🏁 Checklist