This repository was archived by the owner on Apr 21, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
assets/javascripts/discourse/api-initializers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ export default apiInitializer((api) => {
99 return ;
1010 }
1111
12+ const router = api . container . lookup ( "service:router" ) ;
13+ if ( router . currentRouteName ?. startsWith ( "nested" ) ) {
14+ dag . delete ( "replies" ) ;
15+ }
16+
1217 dag . add ( "nested-replies-expand" , NestedRepliesExpandButton ) ;
1318 } ) ;
1419
Original file line number Diff line number Diff line change 2626 expect ( nested_view ) . to have_root_post ( root_reply )
2727 end
2828
29+ it "does not show the standard replies button on the OP" do
30+ nested_view . visit_nested ( topic )
31+
32+ expect ( nested_view ) . to have_no_show_replies_button_for ( op )
33+ end
34+
2935 it "shows the original post content" do
3036 op . update! ( raw : "This is the original post content" )
3137 op . rebake!
Original file line number Diff line number Diff line change @@ -107,6 +107,10 @@ def has_no_replies_toggle_for?(post)
107107 )
108108 end
109109
110+ def has_no_show_replies_button_for? ( post )
111+ has_no_css? ( "[data-post-number='#{ post . post_number } '] .post-action-menu__show-replies" )
112+ end
113+
110114 def has_depth_line_for? ( post )
111115 wrapper = nested_post_wrapper ( post )
112116 wrapper . find ( ".nested-post__gutter" , match : :first ) . has_css? ( ".nested-post__depth-line" )
You can’t perform that action at this time.
0 commit comments