Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@nattsw
Copy link
Contributor

@nattsw nattsw commented Mar 19, 2025

This PR autoloads plugin files, and also extracts features into their own modules.

  • plugin.rb is smaller
  • external plugins like discourse-automation and discourse-assign have their own entrypoints
  • solved filters as well

This is to prepare for the "custom fields" -> "table" move, which is done to allow the feature to show which user marked an answer as reply.

Ideally, we should have a subsequent PR that consolidates wherever custom fields are used since they are now sprinkled everywhere 😮‍💨 making the migration more tedious than it should.

Comment on lines -35 to -48
require_relative "app/controllers/answer_controller"
require_relative "app/lib/first_accepted_post_solution_validator"
require_relative "app/lib/accepted_answer_cache"
require_relative "app/lib/guardian_extensions"
require_relative "app/lib/before_head_close"
require_relative "app/lib/category_extension"
require_relative "app/lib/post_serializer_extension"
require_relative "app/lib/topic_posters_summary_extension"
require_relative "app/lib/topic_view_serializer_extension"
require_relative "app/lib/user_summary_extension"
require_relative "app/lib/web_hook_extension"
require_relative "app/serializers/concerns/topic_answer_mixin"

require_relative "app/lib/plugin_initializers/assigned_reminder_exclude_solved"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no more

Comment on lines +418 to +420
DiscourseDev::DiscourseSolved.populate(self)
DiscourseAutomation::EntryPoint.inject(self) if defined?(DiscourseAutomation)
DiscourseAssign::EntryPoint.inject(self) if defined?(DiscourseAssign)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes more

@nattsw nattsw merged commit e82c6ae into main Mar 21, 2025
4 checks passed
@nattsw nattsw deleted the autoload branch March 21, 2025 03:45
nattsw added a commit that referenced this pull request Mar 25, 2025
Related: 
- #309
- #341

Requires:
- discourse/discourse#31954

This commit converts all use of post and topic custom fields into a dedicated table:
- migration for copying custom field into table
- swap app usage of custom fields to table

This commit does not attempt to fix issues or optimise, and does not delete old data from custom fields _yet_.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants