-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: add progress-bar component #8720
Conversation
Deploy Preview for carbon-elements ready! Built with commit 3adcb91 |
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 607caa8 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/60c0d929d153510008b48cbe 😎 Browse the preview: https://deploy-preview-8720--carbon-elements.netlify.app |
Deploy Preview for carbon-components-react ready! Built without sensitive environment variables with commit 3adcb91 https://deploy-preview-8720--carbon-components-react.netlify.app |
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 607caa8 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/60c0d9296e8baa000759775c 😎 Browse the preview: https://deploy-preview-8720--carbon-components-react.netlify.app/iframe |
@tw15egan I noticed the following quirks when using
I think it might make more sense to build up the component with regular Here is a quick demo regarding this: https://codepen.io/janhassel/pen/8802396583e1b75c55944392faab9152 Curious what you think! |
Oh, that's unfortunate, I would have hoped the native HTML element would have better voice over support 😞 Since those seem like dealbreakers, it seems like we have no choice but to go with |
I was reading the Carbon Style guide under the Testing section and I noticed the testing you implemented doesn't quite reflect the docs regarding a11y, e2e, and ssr. What are your plans for those? Other than that, this is legit. Very thorough docs. I'll definitely be leaning on this example as we build out Disclosure. |
@sstrubberg I pushed an update with some testing, though it doesn't fully follow the linked guidance as I'm running into some issues with it:
ssr test recipe errorimport ReactDOMServer from 'react-dom/server';
import ProgressBar from './ProgressBar';
describe('ProgressBar - SSR', () => {
it('should import ProgressBar in a node/server environment', () => {
expect(ProgressBar).not.toThrow();
});
it('should not use document/window/etc', () => {
expect(ReactDOMServer.renderToStaticMarkup(ProgressBar)).not.toThrow();
});
});
I tried re-cloning the repo in a different folder, install everything from scratch and see if that fixes any of my issues, but sadly it doesn't. Do you have any ideas what could be the issue here? |
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.
LGTM 👍 just one minor question
@janhassel no worries on those extra test commands/setup - that guidance is new and imo we can defer that to after this firms up and becomes stable. Those special jest-dom matchers need an import I believe, import '@testing-library/jest-dom'; |
Hey, Taylor and I just got done doing a little review session of the PR. We're good to merge and we can take a look at the ssr-test later down the line. I don't want that to be a blocker for your merging. Excellent work! I particularly enjoyed the animation using keyframes :) |
* feat: add new progress-bar component * feat(progress-bar): add support for indeterminate variant * docs(progress-bar): provide two stories and playground * refactor(progress-bar): use div markup with aria attributes * docs(progress-bar): add example * test(progress-bar): add tests Co-authored-by: Scott Strubberg <sstrubberg@protonmail.com>
Closes #3025
Adds a progress bar component. Opening as draft to already discuss the API and markup.
Current visual design is just a first idea of how a progress bar could look in Carbon, would definitely appreciate design input / specifications.
Changelog
New
ProgressBar
componentChanged
Testing / Reviewing
open for discussion around the implementation