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

Shared Avatar/Byline Formatters #376

Closed
wants to merge 2 commits into from
Closed

Conversation

jeffersonrabb
Copy link
Contributor

@jeffersonrabb jeffersonrabb commented Feb 20, 2020

All Submissions:

Changes proposed in this Pull Request:

Extract Avatar and Byline formatter functions to a shared file, which is access by Homepage Posts and Carousel.

Closes #370.

Note: Raised two ESLint warnings, which I'd like to resolve in a separate PR.

src/shared/js/formatters/index.js: line 15, col 4, Error - The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md (jsx-a11y/anchor-is-valid)
src/shared/js/formatters/index.js: line 33, col 6, Error - The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md (jsx-a11y/anchor-is-valid)

How to test the changes in this Pull Request:

  1. Add Homepage Posts and Carousel to a post.
  2. Verify identical bylines and avatars are shown in both.
  3. Experiment with a variety of author configurations, including normal WordPress author, Co-Authors Plus mutliples, Avatars uploaded using WP User Avatar, etc.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Member

@adekbadek adekbadek left a comment

Choose a reason for hiding this comment

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

One discrepancy I've found - while in the editor multiple authors appear as group, with square avatars:
image
On the frontend there's just the first one, with a rounded avatar:
image
Should fixing this be a part of this PR?

src/blocks/carousel/edit.js Show resolved Hide resolved
@adekbadek
Copy link
Member

Looks like the issue has been resolved by #455

@adekbadek adekbadek closed this Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Article Carousel: Author not appearing in editor
2 participants