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

fix: filter key for select components #898

Merged
merged 4 commits into from
Mar 6, 2024

Conversation

Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented Mar 4, 2024

Closes https://github.com/Codeinwp/feedzy-rss-feeds-pro/issues/684

Summary

This is an odd problem. When you change the values of the select component and then add some filter keywords in the input field, the last modified select component loses its values (sometimes happens to both) .

I could NOT find the cause of this problem (I could not determine if it is a problem with Chosen lib or Tagify one.). This does not happen to other select components of the page.

As a temporary fix, I am saving the values in the session storage and re-apply them before sending the form to the server.

Fixed the input reset query when a new tag is added.

Testing

  1. Create a new Import Feed;
  2. On the Filter tab, set Author on both Select Component;
  3. Add some keywords in the input fields;
  4. Make some changes to other options, then Save;
  5. Re-enter the feed settings;
  6. You should see the Author set for both Select Components.

image

@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this Mar 4, 2024
@pirate-bot
Copy link
Contributor

pirate-bot commented Mar 4, 2024

Plugin build for ff7776c is ready 🛎️!

@preda-bogdan
Copy link
Contributor

@Soare-Robert-Daniel Do you think we can find the root cause of the issue and fix that instead of patching around that? Since it is not critical, I would investigate in more detail and find a permanent fix for this. What do you think?

@Soare-Robert-Daniel
Copy link
Contributor Author

@preda-bogdan so I take a more radical approach in stripping down the external libs, and then checking one by one the functions from our scripts. I found the problematic function, but the bug was not so obvious.

The problem was a jQuery line of code resetting all the input fields attached to the main parent when adding a new tag. I was not aware of the behavior from the JQuery function.

I found using copilot pointed with the explain command. It is pretty handy, but I'm a little sad that it did not work in my early attempts to find out if the errors reside in our code.

@irinelenache
Copy link

@Soare-Robert-Daniel Tested and everything's fine on this PR ✔️

@Soare-Robert-Daniel Soare-Robert-Daniel merged commit fafe61d into development Mar 6, 2024
9 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the fix/feed-author-form branch March 6, 2024 07:19
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 4.4.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants