FEATURE: Can edit category/host relationships for embedding#2
Open
akshayutture-augment wants to merge 1 commit into
Open
FEATURE: Can edit category/host relationships for embedding#2akshayutture-augment wants to merge 1 commit into
akshayutture-augment wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new model-based approach for managing embeddable hosts, replacing the previous site setting-based configuration. It adds the ability to associate each embeddable host with a specific category, improving the granularity of content organization for embedded topics.
Key changes:
- Migrates embeddable host configuration from site settings to a database-backed
EmbeddableHostmodel - Adds admin UI for managing embeddable hosts with category associations
- Updates test fixtures to support multiple embedded relationship types (singular and plural)
Reviewed Changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| spec/models/embeddable_host_spec.rb | New test suite for EmbeddableHost model validation and host checking |
| app/models/embeddable_host.rb | New model implementing host validation and lookup logic |
| db/migrate/20150818190757_create_embeddable_hosts.rb | Migration creating embeddable_hosts table and migrating data from settings |
| app/models/topic_embed.rb | Updates to use EmbeddableHost category instead of site setting |
| app/controllers/admin/embeddable_hosts_controller.rb | New controller for CRUD operations on embeddable hosts |
| app/assets/javascripts/admin/components/embeddable-host.js.es6 | New component managing individual host editing UI |
| app/assets/javascripts/discourse/models/store.js.es6 | Enhanced to handle plural embedded relationships (e.g., color_ids) |
| test/javascripts/models/store-test.js.es6 | Updated tests to verify plural embedded relationship handling |
| spec/fabricators/category_fabricator.rb | Moved category fabricators to embeddable_host_fabricator.rb |
| config/site_settings.yml | Removed deprecated embeddable_hosts and embed_category settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test 10
Replicated from ai-code-review-evaluation/discourse-copilot#10