-
Notifications
You must be signed in to change notification settings - Fork 26
feat: improve onboarding import process #1145
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
Conversation
|
Plugin build for 6e9d107 is ready 🛎️!
Note You can preview the changes in the Playground |
|
@girishpanchal30, The preview of the import currently shows all posts, without reflecting the filters applied (title keyword). This can be confusing for users, as they may assume the filters are not working. To avoid this confusion, I suggest updating the notice in the preview modal to: At the moment, the preview modal displays this message: Since this message is more relevant to repeated imports and not onboarding, I recommend replacing it with the updated text above to make the experience clearer.
|
279ea6f to
8a082bf
Compare
|
@girishpanchal30, for this, you can temporarily enable, in dry_run, the Here is how I did it. diff --git a/includes/admin/feedzy-rss-feeds-import.php b/includes/admin/feedzy-rss-feeds-import.php
index 1a15d210..f05d6802 100644
--- a/includes/admin/feedzy-rss-feeds-import.php
+++ b/includes/admin/feedzy-rss-feeds-import.php
@@ -1389,6 +1389,7 @@ class Feedzy_Rss_Feeds_Import {
$fields = urldecode( isset( $_POST['fields'] ) ? sanitize_url( $_POST['fields'] ) : '' );
parse_str( $fields, $data );
+ $environment = isset( $data['environment'] ) ? sanitize_text_field( $data['environment'] ) : 'default';
$feedzy_meta_data = $data['feedzy_meta_data'];
@@ -1467,8 +1468,8 @@ class Feedzy_Rss_Feeds_Import {
$feedzy_meta_data['import_feed_limit'],
'', // should be empty.
$feedzy_meta_data['inc_key'],
- feedzy_is_pro() ? 'keywords_exc' : '',
- feedzy_is_pro() ? $feedzy_meta_data['exc_key'] : '',
+ feedzy_is_pro() || 'wizard' === $environment ? 'keywords_exc' : '',
+ feedzy_is_pro() || 'wizard' === $environment ? $feedzy_meta_data['exc_key'] : '',
feedzy_is_pro() ? 'keywords_ban' : '',
feedzy_is_pro() ? $feedzy_meta_data['exc_key'] : '',
implode( ',', $tags )
diff --git a/includes/layouts/setup-wizard.php b/includes/layouts/setup-wizard.php
index f493602d..852957fd 100644
--- a/includes/layouts/setup-wizard.php
+++ b/includes/layouts/setup-wizard.php
@@ -223,7 +223,7 @@ add_thickbox();
<?php esc_html_e( 'Exclude posts with title not containing', 'feedzy-rss-feeds' ); ?>
</label>
<div class="fz-form-group">
- <input type="text" id="feedzy_exclude_title" name="feedzy_meta_data[exclude_post_title]" class="form-control" value="" />
+ <input type="text" id="feedzy_exclude_title" name="feedzy_meta_data[exc_key]" class="form-control" value="" />
<div class="help-text pt-8">
<?php esc_html_e( 'Posts will not be imported if their title includes these keywords.', 'feedzy-rss-feeds' ); ?>
</div>
diff --git a/js/feedzy-setup-wizard.js b/js/feedzy-setup-wizard.js
index 603308c2..48a40e60 100644
--- a/js/feedzy-setup-wizard.js
+++ b/js/feedzy-setup-wizard.js
@@ -212,7 +212,7 @@ jQuery(function ($) {
'select[name="feedzy_meta_data[import_post_status]"]'
).val(),
fallback_image: $('input[name="feedzy_meta_data[default_thumbnail_id]"]').val(),
- excluded_post_title: $('input[name="feedzy_meta_data[exclude_post_title]"]').val(),
+ excluded_post_title: $('input[name="feedzy_meta_data[exc_key]"]').val(),
action: 'feedzy',
_action: 'wizard_import_feed',
},
@@ -466,6 +466,7 @@ jQuery(function ($) {
fields: $.param($fields),
action: 'feedzy',
_action: 'dry_run',
+ environment: 'wizard',
},
function(data) {
$('#TB_ajaxContent').addClass('loaded');@ineagu, @poonam279, what do you think about having the Preview at Step 2 with the feed URL input? This way we do not have to worry about the settings, and the user can see what he expects to process with that feed.
|
|
That would work.Sent from my iPhoneOn Aug 18, 2025, at 10:42 AM, Soare Robert Daniel ***@***.***> wrote:Soare-Robert-Daniel left a comment (Codeinwp/feedzy-rss-feeds#1145)
@girishpanchal30, for this, you can temporarily enable, in dry_run, the exc_key functionality if you want to make that filter work.
Here is how I did it.
diff --git a/includes/admin/feedzy-rss-feeds-import.php b/includes/admin/feedzy-rss-feeds-import.php
index 1a15d210..f05d6802 100644
--- a/includes/admin/feedzy-rss-feeds-import.php
+++ b/includes/admin/feedzy-rss-feeds-import.php
@@ -1389,6 +1389,7 @@ class Feedzy_Rss_Feeds_Import {
$fields = urldecode( isset( $_POST['fields'] ) ? sanitize_url( $_POST['fields'] ) : '' );
parse_str( $fields, $data );
+ $environment = isset( $data['environment'] ) ? sanitize_text_field( $data['environment'] ) : 'default';
$feedzy_meta_data = $data['feedzy_meta_data'];
@@ -1467,8 +1468,8 @@ class Feedzy_Rss_Feeds_Import {
$feedzy_meta_data['import_feed_limit'],
'', // should be empty.
$feedzy_meta_data['inc_key'],
- feedzy_is_pro() ? 'keywords_exc' : '',
- feedzy_is_pro() ? $feedzy_meta_data['exc_key'] : '',
+ feedzy_is_pro() || 'wizard' === $environment ? 'keywords_exc' : '',
+ feedzy_is_pro() || 'wizard' === $environment ? $feedzy_meta_data['exc_key'] : '',
feedzy_is_pro() ? 'keywords_ban' : '',
feedzy_is_pro() ? $feedzy_meta_data['exc_key'] : '',
implode( ',', $tags )
diff --git a/includes/layouts/setup-wizard.php b/includes/layouts/setup-wizard.php
index f493602d..852957fd 100644
--- a/includes/layouts/setup-wizard.php
+++ b/includes/layouts/setup-wizard.php
@@ -223,7 +223,7 @@ add_thickbox();
<?php esc_html_e( 'Exclude posts with title not containing', 'feedzy-rss-feeds' ); ?>
</label>
<div class="fz-form-group">
- <input type="text" id="feedzy_exclude_title" name="feedzy_meta_data[exclude_post_title]" class="form-control" value="" />
+ <input type="text" id="feedzy_exclude_title" name="feedzy_meta_data[exc_key]" class="form-control" value="" />
<div class="help-text pt-8">
<?php esc_html_e( 'Posts will not be imported if their title includes these keywords.', 'feedzy-rss-feeds' ); ?>
</div>
diff --git a/js/feedzy-setup-wizard.js b/js/feedzy-setup-wizard.js
index 603308c2..48a40e60 100644
--- a/js/feedzy-setup-wizard.js
+++ b/js/feedzy-setup-wizard.js
@@ -212,7 +212,7 @@ jQuery(function ($) {
'select[name="feedzy_meta_data[import_post_status]"]'
).val(),
fallback_image: $('input[name="feedzy_meta_data[default_thumbnail_id]"]').val(),
- excluded_post_title: $('input[name="feedzy_meta_data[exclude_post_title]"]').val(),
+ excluded_post_title: $('input[name="feedzy_meta_data[exc_key]"]').val(),
action: 'feedzy',
_action: 'wizard_import_feed',
},
@@ -466,6 +466,7 @@ jQuery(function ($) {
fields: $.param($fields),
action: 'feedzy',
_action: 'dry_run',
+ environment: 'wizard',
},
function(data) {
$('#TB_ajaxContent').addClass('loaded');
@ineagu, @poonam279, what do you think about having the Preview at Step 2 with the feed URL input? This way we do not have to worry about the settings, and the user can see what he expects to process with that feed.
***@***.*** (view on web)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
@girishpanchal30, If the preview is displayed before applying any filters, then adding a notice might not be necessary. Currently, you can select multiple images for the fallback image:
The title filter we added during onboarding isn’t working in the import process and the filter option is locked.
|
I agree. No need for the notice, we just show what the feed contains.
@poonam279, this will work after we merge #1143 |
|
I have removed the notice. |
@girishpanchal30, will it remain like this? |
|
@poonam279, While creating a new import, we allow adding multiple fallback images, and the same logic applies here. However, if we want to restrict it to only one fallback image, we can do that as well. @Soare-Robert-Daniel, what are your thoughts on this? |
I think we can keep it to one, since it is an onboarding, I do not expect the user to want many fallback images from the begging. |
|
I have fixed it with the latest commit. |
099eacf to
e07ba94
Compare
Remove the old suggestion for filter since preview is now before the filter
|
I will merge this. Any issue will be reported and fixed on the Release PR |
|
@girishpanchal30 @Soare-Robert-Daniel, everything is working fine here. However, I noticed a change in the font size of heading in the onboarding wizard. I am not sure if it's intentional. |
|
we can keep the smaller text here as well. |
|
🎉 This PR is included in version 5.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |









Summary
Add the option for a fallback image and exclude the posts based on the keywords.
Will affect the visual aspect of the product
YES
Screenshots
Check before Pull Request is ready:
Closes https://github.com/Codeinwp/feedzy-rss-feeds-pro/issues/906