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

Remove forced coloring of blog links #3140

Merged
merged 3 commits into from May 14, 2019
Merged

Remove forced coloring of blog links #3140

merged 3 commits into from May 14, 2019

Conversation

alanmoo
Copy link
Contributor

@alanmoo alanmoo commented May 13, 2019

Since links are always inside p elements, we don’t need to explicitly set the color.

Closes #3127

@alanmoo alanmoo requested a review from mmmavis May 13, 2019 16:08
@cadecairos cadecairos temporarily deployed to foundation-mofostaging-pr-3140 May 13, 2019 16:08 Inactive
Copy link
Collaborator

@mmmavis mmmavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also removes body-large style from <a> that is not wrapped in <p>. I'm not sure what the cleanest way is to achieve the body-large style we want just for certain elements on blog page.

image

@alanmoo
Copy link
Contributor Author

alanmoo commented May 13, 2019

How did you create that link? I couldn't find a way to add a link using the admin without it being wrapped in a paragraph tag.

@mmmavis
Copy link
Collaborator

mmmavis commented May 13, 2019

@alanmoo guess we should update our fake data generator so it's more realistic 😂

@alanmoo
Copy link
Contributor Author

alanmoo commented May 13, 2019

See #2786 :)

@alanmoo alanmoo temporarily deployed to foundation-mofostaging-pr-3140 May 13, 2019 17:18 Inactive
@cadecairos cadecairos temporarily deployed to foundation-mofostaging-pr-3140 May 13, 2019 17:41 Inactive
@alanmoo alanmoo temporarily deployed to foundation-mofostaging-pr-3140 May 13, 2019 18:59 Inactive
Since links are always inside `p` elements, we don’t need to explicitly set the color.
@alanmoo alanmoo temporarily deployed to foundation-mofostaging-pr-3140 May 13, 2019 21:07 Inactive
@alanmoo alanmoo requested a review from mmmavis May 13, 2019 21:10
Copy link
Collaborator

@mmmavis mmmavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

There's an extra </p>... I'm gonna see if I can spot the cause of it...

@mmmavis
Copy link
Collaborator

mmmavis commented May 14, 2019

Did a quick test. It seems like Wagtail only auto wraps non-block level elements in <p>.

image

@alanmoo
Copy link
Contributor Author

alanmoo commented May 14, 2019

I just destroyed and recreated the review app.

https://foundation-mofostaging-pr-3140.herokuapp.com/en/blog/role-suggest-defense/

There's no extra closing paragraph tag in there, just the one I added in the test fixture to replicate the wrapping Wagtail's rich text editor does on save.

Copy link
Collaborator

@mmmavis mmmavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mismatched <p>/</p> validation error seems to be resolved on the review app now. R+

@alanmoo alanmoo merged commit d5c61fa into master May 14, 2019
@alanmoo alanmoo deleted the gh-3127-blog-link branch May 14, 2019 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blog MVP: Link text not being differentiated from body text
3 participants