Skip to content

Commit

Permalink
comments_async: add btn and row classes back in.
Browse files Browse the repository at this point in the history
There seems to be a bug in sass which makes the css size increase around
50x when a certain number of @extends is present. As a workaround for
now I just added some of the classes back in so we don't need to extend
them.
  • Loading branch information
goapunk authored and hom3mad3 committed May 27, 2024
1 parent a3c0765 commit b64e86f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default class CommentForm extends React.Component {
const actionButton = (
<button
type="submit"
className="a4-comments__submit-input"
className="btn btn--default a4-comments__submit-input"
disabled={this.props.useTermsOfUse && !this.state.agreedTermsOfUse && !this.state.checkedTermsOfUse}
>
{translated.post}
Expand All @@ -127,7 +127,7 @@ export default class CommentForm extends React.Component {
const cancelButton = this.props.showCancel && (
<button
type="submit"
className="a4-comments__cancel-edit-input"
className="btn btn--light me-2 a4-comments__cancel-edit-input"
value={translated.cancel}
onClick={this.props.handleCancel}
>
Expand Down Expand Up @@ -175,7 +175,7 @@ export default class CommentForm extends React.Component {
<span className="a4-sr-only">{this.state.commentCharCount}/4000{translated.characters}</span>
</p>
</div>
<div className="a4-comments__comment-form__terms-and-buttons">
<div className="row a4-comments__comment-form__terms-and-buttons">
<div className="a4-comments__comment-form__terms-of-use">
{this.props.useTermsOfUse && !this.state.agreedTermsOfUse &&
<div className="form-group" id={'group_terms-of-use-checkbox' + (typeof this.props.parentIndex === 'number' ? this.props.parentIndex : 'rootForm')}>
Expand Down
10 changes: 2 additions & 8 deletions changelog/7863.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
- **Breaking Change** comments_async/comment_form: the default height of the
textarea has been increased from 46 to 75. We might have to add a way to set
the initial height dynamically in the future.
- **Breaking Change** comments_async/comment_form: remove btn class from
actionButton as we want to move away from using bootstrap classes directly.
You can extend a4-comments__submit-input instead.
- **Breaking Change** comments_async/comment_form: remove btn and me-2 classes from
- **Breaking Change** comments_async/comment_form: remove me-2 class from
submitButton as we want to move away from using bootstrap classes directly.
You can extend a4-comments__cancel-edit-input instead.
You can apply it to a4-comments__cancel-edit-input instead.
- **Breaking Change** comments_async/comment_form: rename general-form to
a4-comments__comment-form__form to be more in line with BEM naming.
- **Breaking Change** comments_async/comment_form: wrap form elements in a form-group class according to
Expand All @@ -30,9 +27,6 @@
a4-comments__comment-form__actions on the div wrapping the cancel and action button. You
can use @extend .d-flex, @extend .col-12 and @extend .col-sm-6 to retain
bootstrap behavior.
- **Breaking Change** comments_async/comment_form: replace row with
a4-comments__comment-form__terms-and-buttons on the div wrapping the terms of
use checkbox and the form actions. You can use @extend .row to retain bootstrap behavior.
- **Breaking Change** comments_async/comment_form: replace col with
a4-comments__comment-form_terms-of-use on the the div wrapping the terms of
use checkbox. You can use @extend .col-12 and @extend .col-sm-6 to retain
Expand Down

0 comments on commit b64e86f

Please sign in to comment.