Skip to content
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 #4287

Closed
wants to merge 3 commits into from

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Jun 28, 2023

☑️ Resolves

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 focused, when focused the label is moved up and scaled but always shown.

Also the action input is adjusted for this change.

🖼️ Screenshots

NcInputField

new

NcActionInput

new-action

🚧 Tasks

  • Maybe adjust the datetime picker to this changes in a followup, @nextcloud/designers ?

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

@susnux susnux added 3. to review Waiting for reviews design Design, UX, interface and interaction design accessibility Making sure we design for the widest range of people possible, including those who have disabilities feature: input-field Covering the InputField, TextField, ... labels Jun 28, 2023
@dartcafe
Copy link
Contributor

I like it, but shouldn't there be a style guide to prevent, that every developer just follows his personal preference?

@ChristophWurst

Copy link
Contributor

@marcoambrosini marcoambrosini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@susnux I still think that the label should move on the border as this will conflict with leading icons like search can we still change this?

@susnux
Copy link
Contributor Author

susnux commented Jul 20, 2023

@marcoambrosini sure, I just got not much time to adjust this here, but it is still on my list :)

@ChristophWurst
Copy link
Contributor

I like it, but shouldn't there be a style guide to prevent, that every developer just follows his personal preference?

@ChristophWurst

https://docs.nextcloud.com/server/latest/developer_manual/design/index.html? :)

Copy link
Contributor

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Is there anything left to be done/discussed?

@susnux susnux force-pushed the feat/ncinput-always-shown-label branch from 109dbf8 to 149da8d Compare August 2, 2023 14:46
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.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
…nges with always shown labels

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the feat/ncinput-always-shown-label branch from 149da8d to 20cf616 Compare August 2, 2023 14:48
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
Copy link
Contributor Author

susnux commented Aug 2, 2023

@marcoambrosini

I still think that the label should move on the border as this will conflict with leading icons like search can we still change this?

I created an alternative with the label inside the border here: #4394 . So you can compare both on the preview deployments.

I personally think that the label within the border is cleaner, is allows to have multiple input elements (input field, buttons, NcSelect) side by side and all having the same "border-height".
Also I do not think that the label conflicts with the icon, as the label will always be shorter (due to font size) when shown above than on initial state.

But this is a decision for designers :)

@szaimen
Copy link
Contributor

szaimen commented Aug 8, 2023

I like #4394 more 👍

@AndyScherzinger
Copy link
Contributor

Label on the border would also match Material Design 2 and 3 btw which seems to be what we usually try to use or be inspired by.

@susnux
Copy link
Contributor Author

susnux commented Aug 23, 2023

Close in favor of #4394

@susnux susnux closed this Aug 23, 2023
@susnux susnux deleted the feat/ncinput-always-shown-label branch August 23, 2023 19:54
@susnux susnux restored the feat/ncinput-always-shown-label branch October 12, 2023 15:17
@jancborchardt jancborchardt deleted the feat/ncinput-always-shown-label branch December 14, 2023 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities design Design, UX, interface and interaction design feature: input-field Covering the InputField, TextField, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC: Visible internal label for NcInputFields within the element
7 participants