Skip to content

Latest Comments block: minor code cleanup#9832

Closed
ZebulanStanphill wants to merge 1 commit intoWordPress:masterfrom
ZebulanStanphill:update/latest-comments-minor-code-cleanup
Closed

Latest Comments block: minor code cleanup#9832
ZebulanStanphill wants to merge 1 commit intoWordPress:masterfrom
ZebulanStanphill:update/latest-comments-minor-code-cleanup

Conversation

@ZebulanStanphill
Copy link
Copy Markdown
Member

@ZebulanStanphill ZebulanStanphill commented Sep 12, 2018

Description

This PR reorders the attributes in the Latest Comments block's index.php alphabetically and removes an unnecessary '' item from the enum array of the align object that has no effect on what classes get applied and what alignments are considered valid.

Notably, the values in enum actually do have an effect on what alignments are considered valid. There is no documentation for this, as far as I can tell, and no way to use this same enum array in JavaScript.

How to test

Try setting alignments on the Latest Comments block. Ensure that the correct classes (or lack thereof) are applied in both the editor and the front-end. If you notice an issue, compare to master as it may be a bug there as well.

@ZebulanStanphill
Copy link
Copy Markdown
Member Author

This PR needs a rebase, but #10635 modifies one of the same files as this PR, so I'll wait until that is merged first.

Could this be milestoned for 4.1?

@earnjam earnjam added [Type] Code Quality Issues or PRs that relate to code quality [Block] Latest Comments Affects the Latest Comments Block labels Nov 2, 2018
@ZebulanStanphill
Copy link
Copy Markdown
Member Author

Closing in favor of #11411.

@ZebulanStanphill ZebulanStanphill deleted the update/latest-comments-minor-code-cleanup branch November 2, 2018 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Latest Comments Affects the Latest Comments Block [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants