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

✨ Added size to Dots progress indicator #1098

Merged
merged 3 commits into from
Feb 2, 2021

Conversation

mimarz
Copy link
Contributor

@mimarz mimarz commented Feb 2, 2021

resolves #417

After talking with @equinor/eds-ux we decided to a size option for Dots progress so that it may better suit loading states for pages or bigger widgets.

const { container } = render(<StyledProgress size={64} />)
const progress = container.firstChild
expect(progress).toHaveAttribute('width', '64')
})
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming that we shouldn't have knowledge of implementation details, would it be better to test for height as well? 🤔

Copy link
Contributor Author

@mimarz mimarz Feb 2, 2021

Choose a reason for hiding this comment

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

Its 1/4 of height, which we could test.. but then again, its kinda implementation detail and kinda not. Its been decided by design 🤔 @wenche

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah... Maybe it could be more of a "has height set" approach to make sure it's a circle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated tests @wenche

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@mimarz mimarz merged commit 5da9146 into equinor:develop Feb 2, 2021
@mimarz mimarz deleted the react/progress-dots-size branch February 2, 2021 12:22
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.

size property for Progress components
2 participants