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

Add: Ability to process already created content #178

Merged
merged 7 commits into from
Feb 26, 2020

Conversation

dinhtungdu
Copy link
Contributor

@dinhtungdu dinhtungdu commented Jan 27, 2020

Description of the Change

Add bulk and row actions to classify supported post types.
Add a new class: Classifai\Admin\BulkActions to manage bulk actions, not only
for posts classification, but also images.
Use the SavePostHandler::classify() method to classify posts.

Alternate Designs

n/a

Benefits

Provide UI for classifying supported post types in bulk.

Possible Drawbacks

n/a

Verification Process

  1. Allow post/page to be classified.
  2. Go to Posts list table.
  3. Select some posts (Choose posts that haven't classified yet).
  4. Choose Classify from bulk actions select box.
  5. Click Apply.
  6. See posts classified and a success notice.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Closes #121. Relate: #129.

@dinhtungdu dinhtungdu self-assigned this Jan 27, 2020
@jeffpaul jeffpaul added this to the 1.5.0 milestone Jan 27, 2020
@jeffpaul jeffpaul added the type:enhancement New feature or request. label Jan 27, 2020
@ryanwelcher
Copy link
Contributor

ryanwelcher commented Feb 18, 2020

@dinhtungdu the bulk action worked locally but when clicking on the individual Classify links in the row actions, I was getting a 404 page.

It looks like the URL is incorrectly formatted and extra items are being appended to the end:

Example:

http://classifai.test/wp-admin/edit.php&action=classify&ids=6?_wpnonce=fd5cf6de48

Copy link
Contributor

@ryanwelcher ryanwelcher left a comment

Choose a reason for hiding this comment

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

Overall the code looks good. I did run into an issue with the Classify link in the row actions.

@ryanwelcher
Copy link
Contributor

@dinhtungdu changes work as expected. I found an edge-case when testing locally, however.

Steps to reproduce:

  1. Go to Posts list
  2. Quick Edit a post
  3. Save
  4. Click on the Classify link

Expected results: Post is rescanned
Actual Results: I was redirected to the Dashboard.

@dinhtungdu
Copy link
Contributor Author

@ryanwelcher I fixed that case, this PR is ready to review again

@jeffpaul jeffpaul mentioned this pull request Feb 26, 2020
19 tasks
@ryanwelcher ryanwelcher merged commit 485d99c into develop Feb 26, 2020
@jeffpaul jeffpaul deleted the add/121-language-processing-bulk-options branch March 5, 2020 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Language Processing: Ability to process already created content
3 participants