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 size and rounding options missing on images in starter page templates #2950

Open
guarani opened this issue Dec 31, 2020 · 11 comments
Open
Labels

Comments

@guarani
Copy link
Contributor

guarani commented Dec 31, 2020

Describe the bug

Image block is missing Size and Default/Rounded options on images found in Starter Page Templates.

To Reproduce

  1. Open the WPiOS or WPAndroid apps
  2. Go to My Site → create a new Page → Choose a template with images (e.g. the Jeffrey Klein template under "Home pages")
  3. Tap Create Page
  4. Scroll down to the first image
  5. Tap the image until the Gear icon appears
  6. Tap the Gear icon
  7. Notice the lack of Size and Default/Rounded options

Expected behavior
Just like any other image, the Size and Default/Rounded options should be present

Screenshots

Expected Observed

Smartphone (please complete the following information):

  • Device: iPhone 11
  • OS: iOS 14.2
  • Version WPiOS 16.3
@guarani guarani added [Type] Bug Something isn't working [OS] iOS [OS] Android labels Dec 31, 2020
@guarani
Copy link
Contributor Author

guarani commented Dec 31, 2020

Pinging you here @chipsnyder for your insights.

@hypest
Copy link
Contributor

hypest commented Jan 4, 2021

FWIW, here's what I noticed from my testing:

  1. No issue when starting a page with the "blank page" option and adding an image block.
  2. When using the "" starter page template, the images in the "Qatar" and "Greece" parts don't have the size option, but the one in the "Thailand" part has it.

Tested on:

  • iPhone 6s
  • iOS v13.5.1
  • WPiOS v16.3

@chipsnyder
Copy link
Contributor

Thanks @guarani and @hypest for the research here.

It seems to me we should approach this from two sides.

  1. To get a more immediate fix we can update the layout on the backend. This will prevent any new issues from popping up.
  2. We probably want to set a default value for when these values aren't set.

@enejb I'm sure how much you have on your plate right now, but can you take a look at this? If needed we can split this into two efforts.

@enejb
Copy link
Contributor

enejb commented Jan 4, 2021

Looking into this now.

@guarani
Copy link
Contributor Author

guarani commented Jan 4, 2021

Just that to get this into the 16.5 apps release, the fix for this will be merged in after the 1.44.0 release is cut today which is fine (preferably early in the week). However, if this was high priority and needed to make it to the 16.4 apps release, that would require a editor betafix.

Could you share @chipsnyder in which release you think this will need to land in?

@enejb
Copy link
Contributor

enejb commented Jan 4, 2021

I think I understand the issue better now. The only difference between the image that comes with the template and the once that gets instead is that the one in with the template doesn't live with in the media library.

The html stucture is the same

<!-- wp:image {"id":42,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://enejdemoalvesmobile1.files.wordpress.com/2021/01/pexels-photo-5731892.jpg?w=683" alt="" class="wp-image-42" /></figure>
<!-- /wp:image -->

The reason why the images are not displaying the rounded and the size attributes is because the images don't currently live on the main site but are just hot linked.

So the backend solution that we should look into is updating the URLs and IDs of the media in the content as well as Importing the media. Which can be a bit tricky but would solve a bunch of other issues as well.

@chipsnyder
Copy link
Contributor

Thanks @enejb, for sharing your findings. It sounds like the defaults are already there then and the path forward is that backend fix you mentioned @enejb.

Could you share @chipsnyder in which release you think this will need to land in?

@guarani I think we can move forward with the editor release and we'll explore the backend fix.

@guarani
Copy link
Contributor Author

guarani commented Jan 5, 2021

@guarani I think we can move forward with the editor release and we'll explore the backend fix.

Thanks for checking @enejb and @chipsnyder!

@chipsnyder
Copy link
Contributor

There does seem to be some larger considerations that need to be tackled regarding the server-side fix. Enej was able to get a client-side fix in place WordPress/gutenberg#28006

@guarani what are your thoughts on including this in the release? (Note this is more a new feature than a regression technically speaking but probably more of a bug from the user's perspective.

@guarani
Copy link
Contributor Author

guarani commented Jan 7, 2021

@guarani what are your thoughts on including this in the release? (Note this is more a new feature than a regression technically speaking but probably more of a bug from the user's perspective.

Just noting we've now included this in #2957 as per our offline discussion.

@chipsnyder
Copy link
Contributor

Image size still has some dependencies with Hot-linked images to where those menu options aren't appearing. However, we are now consistent with the web experience.

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

No branches or pull requests

4 participants