Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve the Spinner component #1586

Merged

Conversation

rgah2107
Copy link
Collaborator

fix: #1585

Changes proposed in this PR:

@nexxtway/react-rainbow

@commit-lint
Copy link

commit-lint bot commented May 27, 2020

Features

  • improve the Spinner component (321c9ff)

Bug Fixes

  • space problems (4cc5e0a)
  • change spinner animation (87a3194)
  • add helper, add test for helper, optimize code, improve spinner animation, modify comments in examples (00da31e)
  • modify code according to the last comments (0482555)
  • remove unnecessary condition (9666283)

Contributors

@rgah2107, @TahimiLeonBravo

@@ -115,3 +115,37 @@ const Loading = styled.h1.attrs(props => {
</Loading>
</InverseContainer>
```

##### list loading using spinner - brand - large - arc
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this example names are missleading, there is nothing related to lists here. I am thinking about using something like Arc Spinner large brand; same for the rest of the exampe headers

</div>
```

##### list loading using spinner - brand - x-large - arc - with logo
Copy link
Collaborator

Choose a reason for hiding this comment

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

^^ same

@HellWolf93
Copy link
Collaborator

There is a bug when spinner size is smaller than children, I believe we should limit the size of the icon to the inside of the circle.
Screenshot_20200527_215726
Screenshot_20200527_215752

@rgah2107 rgah2107 requested a review from HellWolf93 May 29, 2020 08:26
@@ -6,23 +6,42 @@ import StyledArcSpinner from './styled/arcSpinner';
import StyledSpinnerContainer from './styled/spinnerContainer';
import StyledChildContainer from './styled/childContainer';

const sizeMap = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

since you are using the same size map in StyledArcSpinner i think you could put it in a separate file and import it from both places

@TahimiLeonBravo
Copy link
Collaborator

+1


if (isVisible) {
if (type === 'arc') {
return (
<StyledSpinnerContainer>

Choose a reason for hiding this comment

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

we need to pass className and style prop to the container, all component containers receive these props in order to pass styles to positioning, margin and other styles they want to pass

Comment on lines 11 to 14
if (size) {
return sizeMap[size] || sizeMap.medium;
}
return sizeMap.medium;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the if is too much with "return sizeMap [size] || sizeMap.medium;" the case that size is undefine is covered

@LeandroTorresSicilia LeandroTorresSicilia merged commit d690060 into nexxtway:master May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: improve the Spinner component
5 participants