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

Profile: Profile Details module - Inline Edit component #193

Open
nicksp opened this issue Aug 23, 2018 · 2 comments
Open

Profile: Profile Details module - Inline Edit component #193

nicksp opened this issue Aug 23, 2018 · 2 comments

Comments

@nicksp
Copy link
Collaborator

nicksp commented Aug 23, 2018

A follow-up task for https://zube.io/x-team/xp-formerly-auto/c/1956

To facilitate the functionality development, we'll need a generic inline-edit component that will support onSave and onCancel custom callbacks to do respectively saving data and reverting it to the previous version. We should keep in mind it might be used for different unrelated fields on the admin dashboard, so it should be a generic one. Also, it would be great to support saving by clicking Enter and canceling edit mode by clicking Esc.

On one of the last projects I implemented a similar component and would like to share a recording of how it works:

2018-08-24 00.19.59.gif

It was implemented the way it replicates Trello's similar component, but for our purposes, we can simplify that. I can share the code if required 😄

@mccrodp Do we want to have similar Save/Cancel button when in edit mode? Or what are your expectations of in-edit mode?

@mccrodp
Copy link

mccrodp commented Aug 24, 2018

@nicksp, considering my comment on respecting the controls shown to edit fields based on their type, I'd like to choose the option that is as generic as possible for fields of simple string/text type. If this means having a textfield where clicking Enter is save and clicking out of the area equates to cancel, then that's fine also (if it preserves edits locally while in the window if you need to go back to the edit component after scrolling or clicking elsewhere on the page for example).

What do you suggest in relation to this, I'm open to options?

@nicksp
Copy link
Collaborator Author

nicksp commented Aug 24, 2018

@mccrodp Given the current scope, we will have 3 types of in-edit controls: number field (for rate), textarea for text fields, and date picker for availability dates. To make the editing flow clear and consistent regardless of the control type, I suggest showing extra Save/Cancel buttons (as shown in the gif above) for all of the controls in edit mode. Additionally, for all types of controls, we might have a common Enter/Esc functionality to respectively Save or Dismiss changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants