mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Update topic/comment embedding parameters (#20181)
This commit implements many changes to topic and comments embedding. It deprecates the class_name field from EmbeddableHost and suggests using the className parameter. discourse_username parameter has been deprecated and it will fetch it from embedded site from the author or discourse-username meta. See the updated code sample from Admin > Customize > Embedding page. * FEATURE: Add className parameter for Discourse embed * DEV: Hide class_name from EmbeddableHost * DEV: Deprecate class_name field of EmbeddableHost * FEATURE: Use either author or discourse-username meta tag * DEV: Deprecate discourse_username parameter * DEV: Improve embed code sample
This commit is contained in:
@@ -56,7 +56,6 @@ RSpec.describe Admin::EmbeddableHostsController do
|
||||
params: {
|
||||
embeddable_host: {
|
||||
host: "test.com",
|
||||
class_name: "test-class",
|
||||
category_id: category.id,
|
||||
},
|
||||
}
|
||||
@@ -67,7 +66,7 @@ RSpec.describe Admin::EmbeddableHostsController do
|
||||
UserHistory.where(
|
||||
acting_user_id: admin.id,
|
||||
action: UserHistory.actions[:embeddable_host_update],
|
||||
new_value: "category_id: #{category.id}, class_name: test-class, host: test.com",
|
||||
new_value: "category_id: #{category.id}, host: test.com",
|
||||
).exists?
|
||||
|
||||
expect(history_exists).to eq(true)
|
||||
@@ -82,7 +81,6 @@ RSpec.describe Admin::EmbeddableHostsController do
|
||||
params: {
|
||||
embeddable_host: {
|
||||
host: "test.com",
|
||||
class_name: "test-class",
|
||||
category_id: category.id,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user