Skip to content

Commit

Permalink
Merge pull request #27427 from guardian/remove-discussion-frontend
Browse files Browse the repository at this point in the history
Remove discussion-frontend
  • Loading branch information
ioannakok authored Sep 5, 2024
2 parents 33f95ec + 8d02fa9 commit 19aaa61
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 108 deletions.
15 changes: 9 additions & 6 deletions common/app/views/fragments/discussionFooter.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@

@(content: Content, isCommentable: Boolean, discussionClosed: Boolean, discussionId: String)(implicit request: RequestHeader)

@sectionHeading = {

<div class="discussion__heading js-discussion-external-frontend"></div>
}

@toolbar = {
<div class="discussion__toolbar js-discussion-toolbar u-cf">

Expand Down Expand Up @@ -104,7 +99,15 @@ <h2 class="container__meta__title">
</div>

<div class="modern-visible">
@sectionHeading

<div class="discussion__heading">
<div class="container__meta">
@if(discussionClosed) {
<p class="container__meta__item">
This discussion is closed for comments.
</p>}
</div>
</div>

<div class="discussion__comment-box js-discussion-comment-box--top"></div>

Expand Down
1 change: 0 additions & 1 deletion common/app/views/support/JavaScriptPage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ object JavaScriptPage {
("membershipAccess", JsString(membershipAccess)),
("idWebAppUrl", JsString(Configuration.id.oauthUrl)),
("cardStyle", JsString(cardStyle)),
("discussionFrontendUrl", JsString(DiscussionAsset("discussion-frontend.preact.iife"))),
("brazeApiKey", JsString(Configuration.braze.apiKey)),
("ipsosTag", JsString(ipsos)),
("isAdFree", JsBoolean(isAdFree(request))),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { Component } from 'common/modules/component';
import { getUser } from 'common/modules/discussion/api';
import { CommentBox } from 'common/modules/discussion/comment-box';
import { Comments } from 'common/modules/discussion/comments';
import { loadDiscussionFrontend } from 'common/modules/discussion/discussion-frontend';
import {
handle as upvoteHandle,
closeTooltip as upvoteCloseTooltip,
Expand Down Expand Up @@ -127,7 +126,6 @@ class Loader extends Component {
this.initTopComments();
this.initMainComments();
this.initToolbar();
this.renderCommentCount();
this.initPagination();
this.initRecommend();

Expand Down Expand Up @@ -616,24 +614,6 @@ class Loader extends Component {
);
}
}

renderCommentCount() {
loadDiscussionFrontend(this, {
apiHost: config.get('page.discussionApiUrl'),
avatarImagesHost: config.get('page.avatarImagesUrl'),
closed: this.getDiscussionClosed(),
discussionId: this.getDiscussionId(),
element: document.getElementsByClassName(
'js-discussion-external-frontend',
)[0],
userFromCookie: !!getUserFromCookie(),
profileUrl: config.get('page.idUrl'),
profileClientId: config.get('switches.registerWithPhone')
? 'comments'
: '',
Promise,
});
}
}

export { Loader };

0 comments on commit 19aaa61

Please sign in to comment.