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

File Block looks unpolished in the Reader #15533

Open
startuptester opened this issue Dec 17, 2020 · 5 comments
Open

File Block looks unpolished in the Reader #15533

startuptester opened this issue Dec 17, 2020 · 5 comments

Comments

@startuptester
Copy link
Contributor

Expected behavior

In the Reader, File blocks should look similar to they do on my site
IMG_1D187540CE79-1

Actual behavior

IMG_2D550EB66A69-1

Steps to reproduce the behavior

  1. Add a file block to a post
  2. View in Reader
Tested on iPad and iPhone 12 Pro, iOS 14.2, WPiOS 16.4.0.0
@startuptester
Copy link
Contributor Author

startuptester commented Dec 17, 2020

@yaelirub this is not happening on the Reader in Android

Screenshot_20201217-111032_WordPress

But it IS happening on the web

Screen Shot 2020-12-17 at 11 13 42 AM

So I should report to Calypso and close this one? It doesn't make sense to me that it's working on Android and nowhere else, how can that happen?

@emilylaguna
Copy link
Contributor

emilylaguna commented Dec 21, 2020

After a discussion with @leandroalonso about this issue today it looks like this is happening because iOS strips out the style attribute from the tags to prevent styling issues in reader.

Because of that, this issue is larger than originally anticipated and adding a local style for the button isn't the correct fix, and we should look further into changing how the reader parses the element styles to better support the work done.

@leandroalonso
Copy link
Contributor

Just adding a little bit more info:

  • We strip style tags because we want the Reader to have a "generic" look 'n feel, which means that weird colors or custom styles that the user adds won't be rendered;
  • If we revert this change, this will fix this issue but will cause a regression in Reader is applying custom styles #14531 (and probably many other side effects)
  • We can add "exceptions" in the code — which CSS classes/blocks we accept custom styles. But that doesn't feel right because it seems an app-side solution (see next topic)
  • Another team has recently worked in supporting rendering blocks at the API level (paYKcK-M3-p2), we can probably check the outcome and come up with a solution that takes advantage of that while preventing strange style from being rendered

@jkmassel jkmassel modified the milestones: 16.4 ❄️, 16.5, 16.6 Jan 8, 2021
@jkmassel jkmassel modified the milestones: 16.6 ❄️, 16.7 Jan 25, 2021
@jkmassel jkmassel modified the milestones: 16.7 ❄️, 16.8 Feb 8, 2021
@startuptester startuptester removed this from the 16.8 ❄️ milestone Feb 22, 2021
@daniloercoli
Copy link
Contributor

Checked on Jetpack 24.2, and I can still reproduce the issue.

@dangermattic
Copy link
Collaborator

dangermattic commented Jan 10, 2025

Thanks for reporting! 👍

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

No branches or pull requests

7 participants