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

Reusable block name auto save #4527

Closed
karmatosed opened this issue Jan 16, 2018 · 8 comments
Closed

Reusable block name auto save #4527

karmatosed opened this issue Jan 16, 2018 · 8 comments
Assignees
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Enhancement A suggestion for improvement.

Comments

@karmatosed
Copy link
Member

This may not be possible so cc @noisysocks - please close if I am about to make work on this and it's not fairly easy to do :)

I was working through the flow of reusable blocks and it struck me as to how clicking edit, then saving or cancelling is really a long path. Could we just have the name clickable? You click in to edit and then it autosaves? This kind of interaction is becoming more common for users. I think if it is possible, this would be a nice addition.

@karmatosed karmatosed added [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks labels Jan 16, 2018
@karmatosed karmatosed changed the title Reusable block name Reusable block name auto save Jan 16, 2018
@noisysocks
Copy link
Member

Good idea! It probably isn't too hard to do.

This kind of interaction is becoming more common for users.

Do you have an example of this interaction somewhere out in the wild?

@noisysocks noisysocks added the [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) label Jan 16, 2018
@karmatosed
Copy link
Member Author

Google does this quite a lot. Gmail has a number of autosaves going on for input fields for example.

A small version of this I find super intuitive is changing a tab name in Sheets.

State 1:

2018-01-19 at 17 52

State 2:

2018-01-19 at 17 53

@mtias
Copy link
Member

mtias commented Feb 5, 2018

To expand on this, @noisysocks I think when you first create a reusable block we could focus the title field instead of just creating it with "Untitled". The flow should:

  • Create block.
  • Turn reusable.
  • Add name.

Without having to do extra steps like clicking "Edit" again.

@noisysocks noisysocks self-assigned this Feb 7, 2018
@noisysocks
Copy link
Member

noisysocks commented Feb 7, 2018

That definitely sounds like a nicer flow, @mtias. I'll look into implementing that.

Related comment for future reference: #3017 (comment)

@noisysocks
Copy link
Member

noisysocks commented Feb 27, 2018

I think when you first create a reusable block we could focus the title field instead of just creating it with "Untitled"

I started looking into this and the issue is that we need to create and save a reusable block ASAP so that the <!-- wp:block --> that is inserted into the post refers to a block that actually exists. If we don't then it's fairly likely that an invalid post will be saved or autosaved. A title is required, and so this is why I had opted for new blocks to be titled Untitled block straight away.

How about we modify the flow to look like this:

  1. The user selects a block and clicks Convert to Reusable Block.

screen shot 2018-02-28 at 10 28 02

  1. The reusable block is created and is immediately in editing mode. The title of the block is selected, allowing the user to start typing the title straight away. If the user abandons the flow at this point, the new block will be titled Untitled block.

screen shot 2018-02-28 at 10 28 18

  1. The user clicks Save to rename their reusable block.

screen shot 2018-02-28 at 10 28 41

This removes two steps from the flow of creating a reusable block without changing any of our underlying assumptions about how reusable blocks work.

Question (for @karmatosed): If we had the above flow, would implementing a clickable name still be worth the additional complexity?

@karmatosed
Copy link
Member Author

karmatosed commented Mar 1, 2018

I feel it works as better than what we have now, which I think is me saying yes. I would love to explore us not having to have a save/cancel button combination but that does feel a stretch now. Could this be an edit later or are we set on a path here and it's hard to go back?

@noisysocks
Copy link
Member

Yeah, it would be good to explore implementing a clickable title field as part of a broader exploration on how we can remove having a seperate edit mode and read mode.

The thing I like about having two distinct modes is that requiring the user to click Save very clearly conveys that they are updating content that is not a part of the current post. Any alternate UI would need to somehow convey this.

I think, for now, let's go with the simple iteration described above. We can revisit this UI more holistically in the future—perhaps after the MVP of Gutenberg is merged.

@karmatosed
Copy link
Member Author

I think, for now, let's go with the simple iteration described above. We can revisit this UI more holistically in the future—perhaps after the MVP of Gutenberg is merged.

Sounds good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants