Skip to content

Allow custom FeedGeneratorService implementations #44

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

BenWhite27
Copy link
Contributor

@BenWhite27 BenWhite27 commented May 27, 2025

This PR allows package consumers to implement their own feed generators.

Key changes

  • Added a FeedGenerators Collection Builder and associated factory to allow consumers to specify additional generators in startup configuration.
  • Swapped FeedType enum implementation out to use the new collection and factory.
  • Added Id, DisplayName, and Format properties to IProductFeedGeneratorService in the same implementation style as Property Extractors
  • Feed Generators can choose to implement either an XML or Json feed leaving the other implementation as not implemented.
  • ProductFeedController updated to generate the correct feed type.
  • Added abstract base class for Feed Generators to aid developers.

For consideration

  • I'm not that familiar with the database and migrations side of things in this package. I've updated the MappingProfile to map the new FeedGeneratorId property of FeedSettings to the original database column FeedType. This should mean that existing GoogleMerchantFeeds will continue to work without changes but makes things a bit inconsistant, so perhaps a Migration here would be better?
  • The GoogleMerchantFeed could be split out into its own package now.
  • I've removed the default feed property mapping for the google feed in the front-end code. Perhaps we need to make a way for consumers to define their own default property mapping?

Ben White added 6 commits May 23, 2025 15:45
@umbracotrd
Copy link
Contributor

umbracotrd commented Jun 2, 2025

Wow @BenWhite27! I appreciate the amount of effort you put into this plugin. Right now, we're focusing on the release of 16 and Codegarden, so this PR won't be reviewed over the next couple of weeks. I'm sure we'll take a look at it after those events

@BenWhite27
Copy link
Contributor Author

No worries, hope Codegarden goes well!
Do you want me to mark it as ready to review or do you need to take a closer look at the approach I used first?

@umbracotrd
Copy link
Contributor

If you've finished then mark it as ready for review and I'll take a look later.

@BenWhite27 BenWhite27 marked this pull request as ready for review June 3, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants