-
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
Add filters on taxonomy and post page #1373
Commits on Aug 28, 2018
-
Add a 'type' to all validation errors
Like Weston suggested, add this to the amp_validation_error term description. This will aid in searching that taxonomy page by error type. At the moment, there are only 3 types: HTML, JS, and CSS.
Configuration menu - View commit details
-
Copy full SHA for 0017edf - Browse repository at this point
Copy the full SHA 0017edfView commit details -
If an on* attribute is removed, make type js_error
For example, onclick. This will have JS in it, so this error code is more accurate. On Weston's suggestion in code review.
Configuration menu - View commit details
-
Copy full SHA for 3e9a81e - Browse repository at this point
Copy the full SHA 3e9a81eView commit details -
In unit test assertions, change to js_error
These were for an onload attribute, so update them for the latest commit.
Configuration menu - View commit details
-
Copy full SHA for 0ae789d - Browse repository at this point
Copy the full SHA 0ae789dView commit details
Commits on Aug 29, 2018
-
Add a query var to filter by type
Borrowing heavily from: add_group_terms_clauses_filter(), filter the 'where' clause, to filter the taxonomy page by type.
Configuration menu - View commit details
-
Copy full SHA for 3433791 - Browse repository at this point
Copy the full SHA 3433791View commit details -
Filter the term redirect location, to possibly add a query var
On clicking the 'Filter' button on the 'AMP Validation Errors' taxonomy page, edit-tags.php processes the POST request that this submits. Then, it redirects to a URL to display the page again. This filter callback looks for a value for VALIDATION_ERROR_TYPE_QUERY_VAR in the request. That means that the user filtered by error type, like 'js_error'. It then passes that value to the redirect URL as a query var, So that the taxonomy page will be filtered for that error type. @see AMP_Validation_Error_Taxonomy::add_error_type_clauses_filter() for the filtering of the 'where' clause, based on that query var.
Configuration menu - View commit details
-
Copy full SHA for 8dd3f01 - Browse repository at this point
Copy the full SHA 8dd3f01View commit details -
Render the taxonomy filter for this taxonomy type
Allows filtering by error_type, like only viewing JS errors. This UI now works for error_type, though work is probably needed for accepted status.
Configuration menu - View commit details
-
Copy full SHA for 5f92cc2 - Browse repository at this point
Copy the full SHA 5f92cc2View commit details -
Add a filter <select> element for error type, like 'Accepted'
This still doesn't use the new terminology, like 'Identified.' There wasn't much to change, as filtering by error type worked thanks to Weston.
Configuration menu - View commit details
-
Copy full SHA for 3d17734 - Browse repository at this point
Copy the full SHA 3d17734View commit details -
Remove views for filtering taxonomy, but reuse their counts
Though these views are now applied in a <select> filter, this uses much of their infrastructure. Also, it uses their counts for each status. For example, if there are 0 accepted errors, this won't display the <option> for 'Accepted Error'.
Configuration menu - View commit details
-
Copy full SHA for c2656a3 - Browse repository at this point
Copy the full SHA c2656a3View commit details -
Add the option value for 'All Statuses' to the whitelist
Create a new constant, NO_FILTER_VALUE. This is for the existing value of -1. And add this to the whitelist: in_array().
Configuration menu - View commit details
-
Copy full SHA for fe43d31 - Browse repository at this point
Copy the full SHA fe43d31View commit details -
Use the new terminology for the error taxonomy page name
Change this to 'Errors by Type,' to match the Sketch design.
Configuration menu - View commit details
-
Copy full SHA for 1e135d2 - Browse repository at this point
Copy the full SHA 1e135d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for f1d4bea - Browse repository at this point
Copy the full SHA f1d4beaView commit details
Commits on Aug 30, 2018
-
Restore error counts by status in <option>
There were counts earlier, when filtering by status was done by clicking an <a>. Thanks to Weston's work. Mainly copy the previous logic to add the counts.
Configuration menu - View commit details
-
Copy full SHA for caa2a26 - Browse repository at this point
Copy the full SHA caa2a26View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b937b1 - Browse repository at this point
Copy the full SHA 7b937b1View commit details -
Add error types for HTML (Element) and HTML (Attribute)
Before, there was only HTML_ERROR_TYPE. Based on comments in issues like 1361, this adds 2 types of errors for HTML.
Configuration menu - View commit details
-
Copy full SHA for 13d5caf - Browse repository at this point
Copy the full SHA 13d5cafView commit details
Commits on Aug 31, 2018
-
Refactor logic in render_taxonomy_filters() into 2 methods
The AMP validation error page also needs these filters, but it doesn't need all of render_taxonomy_filters(). So abstract it into 2 functions that can be reused.
Configuration menu - View commit details
-
Copy full SHA for b74854c - Browse repository at this point
Copy the full SHA b74854cView commit details -
Add filters on the 'Errors by URL' page
Using the functions created earlier, output the filter <select> elements on this page. There's more work remaining, like ensuring the query vars work.
Configuration menu - View commit details
-
Copy full SHA for 0397a52 - Browse repository at this point
Copy the full SHA 0397a52View commit details
Commits on Sep 3, 2018
-
Filter for error type on Errors by URL page
Mainly by using the method that Weston wrote: filter_posts_where_for_validation_error_status() Look for the query var of the error type. And if that's present, add to the WHERE clause.
Configuration menu - View commit details
-
Copy full SHA for 228eb81 - Browse repository at this point
Copy the full SHA 228eb81View commit details -
Output the 'View errors by URL' link from the design
This is at the top of the taxonomy page (Errors by Type), and links to the post page (Errors by URL).
Configuration menu - View commit details
-
Copy full SHA for a567047 - Browse repository at this point
Copy the full SHA a567047View commit details -
Simplify add_term_filter_query_var()
Instead of an if block for most of the method, simply return if the condition is false. Then, the remaining if blocks aren't nested.
Configuration menu - View commit details
-
Copy full SHA for 3bcfc03 - Browse repository at this point
Copy the full SHA 3bcfc03View commit details -
Make the error status counts accurate on the Errors by URL page
Before, that didn't take account of the filter for error type So if that filtered for js_error, the total count of error status was the same as if it were for 'All Error Types.' So look for the query var for the error type, and pass that to the WP_Query if it's valid.
Configuration menu - View commit details
-
Copy full SHA for 13a8648 - Browse repository at this point
Copy the full SHA 13a8648View commit details -
On the 'Errors by URL' page, use 'With New Errors' instead of 'New Er…
…rors' This is how the text was when it was inside a link. Check for the current screen, and conditionally add the 'With'.
Configuration menu - View commit details
-
Copy full SHA for 6c5c06d - Browse repository at this point
Copy the full SHA 6c5c06dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c262f0 - Browse repository at this point
Copy the full SHA 6c262f0View commit details -
Fix an issue where filtering by 'All Error Types' wasn't reflected in…
… redirect Before, the filter for the redirect URL did not accept -1, which is for 'All Error Types' and 'All Statuses'. This means that the URL sometimes did not redirect, and it sometimes showed the same results as before.
Configuration menu - View commit details
-
Copy full SHA for 3694bb9 - Browse repository at this point
Copy the full SHA 3694bb9View commit details -
Improve inline documentation, address Travis error.
Make PHP DocBlocks more clear, especially when they needed to be updated.
Configuration menu - View commit details
-
Copy full SHA for 8443fd8 - Browse repository at this point
Copy the full SHA 8443fd8View commit details
Commits on Sep 5, 2018
-
Configuration menu - View commit details
-
Copy full SHA for a13c91e - Browse repository at this point
Copy the full SHA a13c91eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61c6095 - Browse repository at this point
Copy the full SHA 61c6095View commit details -
Only add WHERE conditions when required in filter_posts_where_for_val…
…idation_error_status
Configuration menu - View commit details
-
Copy full SHA for 364944e - Browse repository at this point
Copy the full SHA 364944eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ea15a2e - Browse repository at this point
Copy the full SHA ea15a2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2882262 - Browse repository at this point
Copy the full SHA 2882262View commit details -
Opt to output all status options even when empty to prevent de-select…
…ion when changing selected error type
Configuration menu - View commit details
-
Copy full SHA for 3b87595 - Browse repository at this point
Copy the full SHA 3b87595View commit details