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

Image Block Link Settings - Remember Link Settings #9404

Closed
grappler opened this issue Aug 28, 2018 · 6 comments
Closed

Image Block Link Settings - Remember Link Settings #9404

grappler opened this issue Aug 28, 2018 · 6 comments
Labels
[Block] Image Affects the Image Block [Feature] Blocks Overall functionality of blocks Needs Decision Needs a decision to be actionable or relevant [Type] Enhancement A suggestion for improvement.

Comments

@grappler
Copy link
Member

Describe the bug
The Image Block does not remember what the previous setting for the link setting was.

To Reproduce
Steps to reproduce the behavior:

  1. Add an image block
  2. Change the link setting to media
  3. Add a new image and the link setting will be still at none instead of media.

Expected behavior
The image link setting should be remembered for future image blocks. This is currently done in the classic editor with the cookie wp-settings-1 and value %26urlbutton%3Dfile

Additional context

  • Gutenberg 3.6.2
@designsimply designsimply added [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks Needs Decision Needs a decision to be actionable or relevant labels Aug 28, 2018
@draganescu
Copy link
Contributor

Howdy @grappler I wonder if the new Variations API could solve this by adding an image block whose linkDestination attribute is fixed?

@skorasaurus skorasaurus added the [Block] Image Affects the Image Block label Jan 26, 2021
@paaljoachim
Copy link
Contributor

paaljoachim commented Feb 10, 2021

Testing using

WordPress 5.7 beta 1
Only the WordPress Beta Tester plugin is active.
Theme: Twenty Twenty One
Local site
Chrome

OSX 10.15.7

Testing instructions:

  1. Add an image block
  2. Change the link setting to media
  3. Add a new image and the link setting will be still at none instead of media.

I added an image block. Added an image. Clicked link and selected Media File.
Clicked Replace image. The Media File link is still selected.

The Image block link settings is remembered even when switching image.
Issue has been fixed and I will close this issue.

@grappler
Copy link
Member Author

Thank you @paaljoachim for testing this issue and the detailed documentation.

I realised from your documentation that my steps were not very clear. The issue is not when replacing/changing the image in a block but when inserting a new image block.

The idea was to be able to change the default option for future image blocks.

I hope I was able to explain myself better.

@paaljoachim
Copy link
Contributor

paaljoachim commented Feb 21, 2021

Hi @grappler Ulrich.

Ahh gotcha!
Adding Image block. Linking to Media File.
Adding another Image block. Linking to Media File is not remembered.

Btw I see a newer issue that is basically the same as the one you made here. #23154
I am thinking we can close your issue and have the newer with more comments open.
Does that sound alright? If so can you close your issue here?

@paaljoachim paaljoachim reopened this Feb 21, 2021
@draganescu
Copy link
Contributor

This is an interesting ticket @grappler and it speaks about remembering per user settings for blocks. But, how far should this reach? Adding a whole feature just for the image block seems overkill. Would there be other similar settings that make sense to be automagically saved?

Would this be better saved by a plugin?

@grappler
Copy link
Member Author

I did not look into it that far. There seems to be an issue on saving the preference for the image size #8663

As the discussion is continuing in #23154 it may be best to pose those questions there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Image Affects the Image Block [Feature] Blocks Overall functionality of blocks Needs Decision Needs a decision to be actionable or relevant [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants