-
Notifications
You must be signed in to change notification settings - Fork 12
Feature/logo list slider #138
base: develop
Are you sure you want to change the base?
Conversation
}; | ||
|
||
initiateDelete = () => { | ||
if (confirm(__('Are you sure you want to delete this logo from the slider?'))) { // eslint-disable-line no-restricted-globals, no-alert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing textdomain from __()
call.
|
||
this.setState({ | ||
selectedSlide: selectedSlide - 1, | ||
group: (selectedSlide - 1) < this.props.attributes.perSlide ? this.props.attributes.perSlide : group - 1, // eslint-disable-line max-len |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be easier to read as a standard conditional statement, rather than a ternary.
|
||
this.setState({ | ||
selectedSlide: selectedSlide + 1, | ||
group: (selectedSlide + 1) === (this.props.attributes.slides.length - this.props.attributes.perSlide) ? this.props.attributes.perSlide : group + 1, // eslint-disable-line max-len |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be easier to read as a standard conditional statement, rather than a ternary.
checked={ attributes.hasArrows } | ||
onChange={ this.createUpdateAttribute('hasArrows') } | ||
/> | ||
<RangeControl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The props within this range control are indented incorrectly.
onChange={ updateSlide('newTab') } | ||
/> | ||
{ attributes.slides.length >= 2 && ( | ||
<p>Change milestone position:</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be translatable.
<p>Change milestone position:</p> | ||
)} | ||
<Button onClick={ this.movePrev } className="is-button is-default is-large" style={ { marginRight: '10px' } } disabled={ selectedSlide === 0 }>Move back</Button> | ||
<Button onClick={ this.moveNext } className="is-button is-default is-large" disabled={ selectedSlide === attributes.slides.length - 1 }>Move forward</Button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The button text should be translatable.
</div> | ||
</div> | ||
<nav className="logoSlider-nav logoSlider-navActions"> | ||
<button className="logoSlider-navButton logoSlider-navButtonPrev btn" onClick={ () => this.setState({ selectedSlide: selectedSlide - 1, group: group - 1 }) } disabled={group === attributes.perSlide}>{ __('Pevious Logo', 'benenson') }</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing spaces between curly braces on disabled attribute.
{ currentSlide && ( | ||
<button className="logoSlider-navButton btn" onClick={ this.addSlide }>{ __('Add Logo', 'benenson') }</button> | ||
) } | ||
<button className="logoSlider-navButton logoSlider-navButtonNext btn" onClick={ () => this.setState({ selectedSlide: selectedSlide + 1, group: group + 1 }) } disabled={group === attributes.slides.length || attributes.slides.length <= attributes.perSlide }>{ __('Next Logo', 'benenson') }</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing space after opening curly brace on disabled attribute.
background-color: $color-grey-brand; | ||
border-color: $color-grey-brand; | ||
|
||
&:enter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing :active
styles.
background-color: #c92c2c; | ||
color: $color-white; | ||
|
||
&:enter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing :active
styles.
@jonmcp This is 4 years stale, is it still needed? |
@ampersarnie i have no idea |
Proposed Changes