Skip to content

Comments

Change sharing note default text to a title#18735

Closed
ChristophWurst wants to merge 1 commit intomasterfrom
fix/sharing-note-title
Closed

Change sharing note default text to a title#18735
ChristophWurst wants to merge 1 commit intomasterfrom
fix/sharing-note-title

Conversation

@ChristophWurst
Copy link
Member

Fixes #18451

SHARE_TYPE_ROOM: OC.Share.SHARE_TYPE_ROOM,
},

shareHasNote: !!this.share.note
Copy link
Member

Choose a reason for hiding this comment

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

This will cause issues with the virtual dom when adding new shares.
Data is not 100% reset between vdom reuses :)

Copy link
Member Author

Choose a reason for hiding this comment

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

What is the fix?

Copy link
Member Author

Choose a reason for hiding this comment

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

A watcher on the share prop?

Copy link
Member

Choose a reason for hiding this comment

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

Computed.
Or leave it like it was before and just select the whole content when focusing the input to allow easy overwrite of the content?

Copy link
Member Author

Choose a reason for hiding this comment

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

Or leave it like it was before and just select the whole content when focusing the input to allow easy overwrite of the content?

I'm just a dev but as far as I know we should avoid this pattern where we have inline labels that vanish once you have input. With the title you can see the description of the input field also later on. But not my call.

Computed.

I don't know how to do this. Implemented it with a watcher now because that seems to work just fine. Feel free to push your enhancements if you have a better solution :)

Copy link
Member

Choose a reason for hiding this comment

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

Also, I don't really like having dedicated methods like those laying around. Automatic processing is less error prone than manually updating a static variable imo :)

Copy link
Contributor

Choose a reason for hiding this comment

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

What's wrong with the good old placeholder attribute in a textbox element?

Copy link
Member Author

Choose a reason for hiding this comment

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

You lose the description as soon as you enter your text. So, if you go back later, or just go up on a long form, you don't see the description of the input anymore.

https://www.nngroup.com/articles/form-design-placeholders/
https://joshuawinn.com/ux-input-placeholders-are-not-labels/

Anyway, leaving that decision to a11y experts @nextcloud/accessibility

@skjnldsv if you have a simpler approach that also works please push it.

Copy link
Contributor

Choose a reason for hiding this comment

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

You lose the description as soon as you enter your text. So, if you go back later, or just go up on a long form, you don't see the description of the input anymore.

Since there's still the heading, I find it acceptable in this case to lose the description what to do with a text box.

image

There are way worse cases for example in user_saml

@rullzer rullzer modified the milestones: Nextcloud 18, Nextcloud 19 Jan 9, 2020
@rullzer
Copy link
Member

rullzer commented Jan 9, 2020

master is NC19 now.
Please backport if it needs to go into 18

@wiswedel
Copy link
Contributor

wiswedel commented Jan 9, 2020

/backport to stable18

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst force-pushed the fix/sharing-note-title branch from 8dbb5e3 to 0a406ae Compare January 9, 2020 09:17
@rullzer rullzer closed this Jan 12, 2020
@skjnldsv skjnldsv deleted the fix/sharing-note-title branch January 14, 2020 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

18b2: Share note hint text too hard to get rid of

4 participants