Remove some code in the preview section that isn't needed #402
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
In #351, a previewer was added to the admin. This makes a request to the
Classifier::get_body
method, passing in some options. The problem here is that this method expects the options array to look like this:But all we are passing in is a single array containing features part, which looks like:
These values end up being ignored because they don't follow the format we expect. In addition, these values are the same as the default values in the
Classifier::get_body
method, so there's no real reason I can see to pass those in the first place. I discovered this while using the preview section to quickly verify a new feature and found out the values I was passing in weren't being recognized.This PR removes those and also changes the default
limit
value to match how we set the limit in other places (using our constant first). An alternative approach here is to change the format of the data we pass in to match what we expect but because we just pass in default values, doesn't seem to add any value currently.How to test the Change
Ensure the preview area still functions as expected
Changelog Entry
Credits
Props @dkotter
Checklist: