A platform for community discussion. Free, open, simple.
FIX: Allow post editing and fix fade overlap in embed mode (#39856)
Keegan Georgeec5225f25621
diff --git a/app/assets/stylesheets/common/base/embed-mode.scss b/app/assets/stylesheets/common/base/embed-mode.scssindex 39585b2309e..d3dc3da325e 100644--- a/app/assets/stylesheets/common/base/embed-mode.scss+++ b/app/assets/stylesheets/common/base/embed-mode.scss@@ -41,8 +41,9 @@ body.embed-mode {max-width: 100%;}- // Hide the standard composer in embed mode — the docked composer replaces it- #reply-control {+ // Hide the standard composer in embed mode — the docked composer replaces it.+ // Allow it to show when editing a post (composer-action-edit class).+ #reply-control:not(.composer-action-edit) {display: none !important;}@@ -179,13 +180,23 @@ body.embed-mode {background: var(--secondary);padding-inline: 0.5em;+ &::before {+ content: "";+ position: absolute;+ left: 0;+ right: 0;+ top: -2.5em;+ height: 2.5em;+ background: linear-gradient(to bottom, transparent, var(--secondary));+ pointer-events: none;+ }+.docked-composer {--docked-composer-input-min-height: 10em;margin-top: 0;&::before {- left: -0.5em;- right: -0.5em;+ display: none;}}diff --git a/spec/system/embed_mode_spec.rb b/spec/system/embed_mode_spec.rbindex 586e5e1da6f..6cfacd2d62c 100644--- a/spec/system/embed_mode_spec.rb+++ b/spec/system/embed_mode_spec.rb@@ -134,6 +134,15 @@ describe "Embed mode" doexpect(page).to have_css(".topic-post", text: "Hello from the docked composer")end+ it "shows the standard composer when editing a post" do+ own_post = Fabricate(:post, topic: topic, user: user)+ visit("/t/#{topic.slug}/#{topic.id}?embed_mode=true")++ find("#post_#{own_post.post_number} button.edit").click++ expect(page).to have_css("#reply-control.composer-action-edit")+ end+context "with many replies" dobefore { 15.times { Fabricate(:post, topic: topic) } }