Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Feature/logo list slider #138

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Feature/logo list slider #138

wants to merge 5 commits into from

Conversation

con322
Copy link
Contributor

@con322 con322 commented Feb 18, 2019

Proposed Changes

  • New component logo slider
  • Ability to add any number of logos (images) to the slider
  • Ability to display between 1 and 10 logos (images) per slide
  • Ability to add a link to a slide and choose whether or not it should open up in a new tab
  • Ability to optionally display slider arrows
  • Ability to re-order slides

};

initiateDelete = () => {
if (confirm(__('Are you sure you want to delete this logo from the slider?'))) { // eslint-disable-line no-restricted-globals, no-alert
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

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>
Copy link
Member

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 {
Copy link
Member

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 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing :active styles.

@jaymcp jaymcp added this to the v1.2.0 milestone Feb 20, 2019
@jaymcp jaymcp added the enhancement New feature or request label Feb 22, 2019
@ampersarnie
Copy link
Member

@jonmcp This is 4 years stale, is it still needed?

@jaymcp
Copy link
Member

jaymcp commented May 9, 2023

@ampersarnie i have no idea

@ampersarnie ampersarnie removed their request for review May 9, 2023 13:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants