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
Added required to the required fields #216
Conversation
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.
@mehul0810 thank you for this PR.
The current change only adds "(required)" suffix to a few fields. The validation is not performed, so we are still able to save the Podcast with empty "Author", "Summary" and "Cover image" fields.
Could we add validation to both the browser and back-end before saving and provide an error message if any of the required fields are submitted empty?
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.
@mehul0810 thanks for updating this.
Looks like that with all recent changes, we have lot of things broken on the site:
- The onboarding workflow fails at step 1 (Could not insert the podcast term)
- The Quick-add from the podcasts sidebar panel doesn't work (do nothing without any error)
- Most of E2E tests fail (the test suite fails to create the podcast)
So this PR needs to be updated:
- Fix the onboarding process
- Fix E2E tests — it should also include all required fields when creating the test podcast
- Need to decide what to do with the quick-add interface from the sidebar
@cadic I pushed some changes to update the onboarding page with this functionality and use the new validation logic on that page. I updated the e2e tests. They work locally, but they are failing CI. Beside adding content to the required fields, I have added a media upload (using the 10up util) before each I did not update the block quick add. As I see it, there are three options:
|
@nateconley I think I would prefer option 2 as that allows an editor to stay within the block editor construct and add a new Podcast without having to leave the post and navigate into the plugin settings |
@jeffpaul I've added server side validation for onboarding step 1 and it also works on new term form. |
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.
Found a couple of issues, as well as a bunch of tests continuing to fail. I have some time this week to look into these issues.
includes/datatypes.php
Outdated
* | ||
* @return string | ||
*/ | ||
function validate_taxonomy_fields( $term, $taxonomy, $args ) { |
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.
On edit-tags.php?taxonomy=podcasting_podcasts&podcasts=true
, if this function throws an error, it does not save selections for the following:
- Cover image
- Category 1-3
On admin.php?page=simple-podcasting-onboarding&step=1
if it throws a Cover image
error, it resets the entire form.
@10up/open-source-practice FYI that this is back up for review, thanks! |
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.
I've added a few notes inline, unslashing data and the accessibility items are the most important.
I've used 🔢 to indicate the translation changes apply to multiple lines.
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
@faisal-alvi some updates here during your OSS time could help get this merged into the next release, thanks! |
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
# Conflicts: # package-lock.json # package.json
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.
LGTM and tests well.
I pushed a few commits to
- add a
for
attribute to the show name and category labels (& related ID on the input) - add aria-describedby attributes to each of the fields
- fix a typo
- resolve merge conflict with develop.
Description of the Change
I have added
(required)
to the podcast meta fields to ensure that it passes the podcast feed while submission.Closes #63
Alternate Designs
Possible Drawbacks
Verification Process
Checklist:
Changelog Entry
Credits
Props @