-
Notifications
You must be signed in to change notification settings - Fork 384
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
Re-use styling for unmoderated comments to apply to new accepted/rejected validation errors #1458
Conversation
Hi, @westonruter. @kienstra asked me to handle
I pushed an update that applies the unmoderated comment styles to new errors in the single URL table (both the main row and the expanded details row when it's open). I'm removing the [WIP] from this PR now. |
@johnwatkins0 I added one more todo. In the list of Invalid URLs, we should also show the same styling for Invalid URLs that contain any new validation errors. |
const statusText = select.options[ select.selectedIndex ].innerText.trim(); | ||
|
||
if ( statusText ) { | ||
row.classList.toggle( 'new', 'New Rejected' === statusText || 'New Accepted' === statusText ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johnwatkins0 This will break when a different locale is active. Instead of looking at the option
text, you should use the option value which is an integer which will not change.
@westonruter I've updated this based on the new to-do and your latest comment. Could you take another look at this please? Thanks! |
WordPress has a convention for marking items that need to be actioned on, namely for comments that have not been approved yet. This styling would seem to make sense for new validation errors as well:
This would help draw attention to the validation errors that are new which the user needs to action on. Now that the number of rows that have this styling would correspond to the error count appearing with Error Index admin menu item:
Aside: The styling above was actually implemented in 58d03c9 but it got lost in dead code that no longer was loaded (
amp-validation-error-detail-toggle.js
).TODO
select
to “Accepted” or “Rejected”.