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

Proposal: add a new default block (para) when tapping Enter on Image caption #426

Closed
mzorz opened this issue Dec 20, 2018 · 11 comments · Fixed by #2352
Closed

Proposal: add a new default block (para) when tapping Enter on Image caption #426

mzorz opened this issue Dec 20, 2018 · 11 comments · Fixed by #2352
Labels
[Type] Enhancement Improves a current area of the editor Writing Flow

Comments

@mzorz
Copy link
Contributor

mzorz commented Dec 20, 2018

I labelled this issue Writing Flow, because of the following:

Imagine I'm writing, hit enter, get a new block, keep writing, all looks good. Decide to insert an image and add a caption. I expect that adding a caption and hitting ENTER gets me a new Paragraph block to keep writing. Instead, it dismisses the keyboard and no new block is added, so I need to figure out what happened for a second and then if I want to keep writing I need to add a block myself.

I think we could try making it add a new default block, to keep the writing flow going.

On the Web, ENTER does not have a special treatment but only adds a new line to the caption:
gutenbergwebcaption

wdyt?

@mzorz mzorz added [Type] Enhancement Improves a current area of the editor Writing Flow labels Dec 20, 2018
@mzorz mzorz added this to the Beta milestone Dec 20, 2018
@koke
Copy link
Member

koke commented Dec 21, 2018

Possibly a duplicate of #324

@mzorz
Copy link
Contributor Author

mzorz commented Dec 21, 2018

Possibly a duplicate of #324

I prefixed this as a proposal, as it deviates from the behavior that the Gutenberg web has, as described above. If we decide this proposed behavior gets through, then possibly yes fixing #324 would also bring us #426 :)

@koke
Copy link
Member

koke commented Dec 21, 2018

Looking at WordPress/gutenberg#2173 and WordPress/gutenberg#2664 I'm not sure that behavior on the web is intentional, but they postponed the fix and it never happened.

@mzorz
Copy link
Contributor Author

mzorz commented Dec 21, 2018

I'm not sure that behavior on the web is intentional, but they postponed the fix and it never happened.

nice catch !

@mchowning
Copy link
Contributor

Any update or conclusion on this?

I'm working on adding styling to the image caption, and I'm going to need to do some custom work to get the Enter key working, so I would like to implement it so it has our preferred behavior. Now I just need to figure out what that is! 😄

@hypest
Copy link
Contributor

hypest commented Apr 12, 2019

👋 @mchowning , even though I personally like the proposal in this ticket, I think that for the time being, mirroring what the web side does is a good compromise. So, when tapping Enter while in the caption, the focus should stay in the caption in a new line inside it. Do you think that might be problematic perhaps?

@SergioEstevao SergioEstevao removed this from the Beta milestone May 2, 2020
@SergioEstevao
Copy link
Contributor

@mchowning I'm thinking on closing this issue, because it reflects the behaviour on the web. What do you think?

@mchowning
Copy link
Contributor

It seems like we still want a change along these lines according to @hypest 's comment above and @iamthomasbishop 's more recent comment about this.

With that said, this issue has been open for well over a year now with virtually no movement toward actually implementing it. I'm not sure how to best handle old issues like this that seem to be very low priority. As much as I would like to close this in order to clean up our issues list, I'm not sure that is the best approach since it seems like it's still a desired improvement. I would lean towards keeping this open myself, but I do not feel strongly about that.

@iamthomasbishop
Copy link
Contributor

@mchowning @SergioEstevao I still agree with the sentiment behind the issue (I still expect enter on caption to create a new block, however rare the occurance), and my feelings about keeping open vs. closing (is there a "dormant" status? 😆) are not strong. Considering it is low priority and I'm not aware of any specific user feedback — not to mention it's been dormant for over a year — perhaps we should close it and we can re-open if we end up tackling in the future?

@SergioEstevao
Copy link
Contributor

After this PR: WordPress/gutenberg#22290, the behaviour on the web changed to:

  • If you press Enter inside a caption it creates a new paragraph block after the image block
  • If you press Shift+Enter it inserts a newline (br) in the caption.

@iamthomasbishop Am I correct to assume that we want in mobile that Enter creates a new paragraph block?

@iamthomasbishop
Copy link
Contributor

Am I correct to assume that we want in mobile that Enter creates a new paragraph block?

I think so — it seems that was the original proposal by @mzorz and now web has the desired behavior, so we should match it 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement Improves a current area of the editor Writing Flow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants