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

Users/procload/add progressbar as new component #26329

Conversation

procload
Copy link
Contributor

New Behavior

Adds ProgressBar web component variant.

@procload procload marked this pull request as ready for review January 12, 2023 21:29
@procload procload requested a review from a team as a code owner January 12, 2023 21:29
@fabricteam
Copy link
Collaborator

fabricteam commented Jan 12, 2023

📊 Bundle size report

🤖 This report was generated against eead74fee07339f998615fe34d8f847d0f63af6e

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 12, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit d55df45:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor
Copy link

size-auditor bot commented Jan 12, 2023

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: eead74fee07339f998615fe34d8f847d0f63af6e (build)

Copy link
Member

@chrisdholt chrisdholt left a comment

Choose a reason for hiding this comment

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

A solid start! I see a couple things to clean up and a couple things we should probably clarify together.

The one outstanding question I have here is naming. I see the name "ProgressBar" here and in the nav on the Fluent react site, but the component name being imported and used in the repo is Progress. I think we should align on Progress if that's what's being used in code and as an import elsewhere.

packages/web-components/src/index.ts Outdated Show resolved Hide resolved
packages/web-components/src/progressbar/progressbar.ts Outdated Show resolved Hide resolved
packages/web-components/src/progressbar/progressbar.ts Outdated Show resolved Hide resolved
@chrisdholt
Copy link
Member

@procload another thing that I see missing that I didn't see initially was an export path in the package.json for the component. That will allow users to do:

import "@fluentui/web-components/progress-bar";

@procload
Copy link
Contributor Author

@chrisdholt Made a number of requested changes. I'll wait on @miroslavstastny's comments on the issues above. There were a couple of Storybook user experience upgrades I was hoping to make, but don't know how to do so or if it's possible.

  1. It would be nice if we could only have the one component example and when value is equal to 0 it turns into an indeterminate progress-bar. The current way to trigger indeterminate is by removing the value attribute and I wasn't sure if it's possible to do that via Storybook by reducing a number to 0 or adding a separate boolean toggle.
  2. If No. 1 isn't possible, I would like to add an attribute table to the second example that has a boolean paused control to allow the user to show the indeterminate paused state.

?paused=${x => x.paused}
thickness=${x => x.thickness}
shape=${x => x.shape}
min=${x => x.min}
Copy link
Member

Choose a reason for hiding this comment

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

React implementation does not contain paused and min. I would rather not expose them here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chrisdholt Since we're inheriting from a FAST Foundation class, is there a way to restrict these in the Fluent implementation?

Copy link
Member

Choose a reason for hiding this comment

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

@miroslavstastny @procload We should check with edge but it's possible that they have scenarios where they have a "paused" (not disabled...) instance...I think that may have led to us adding. In terms of removing, you can't remove attributes but I do think that paused is specifically a visual state...so we can probably just remove it from FAST if we get agreement from folks. For now, I just wouldn't style it at all and it'll be a noop. Consider that technically in HTML I can add any attribute to any element and it'll be present in the DOM.

With regard to min that maps to aria-valuemin and I'm not sure we can as readily remove that. Min has functionality w/r/t the overall percentage complete...we can re-evaluate but that may be more nuanced in terms of removal. I'd suggest we not expose in the stories, etc for this one.

${colorBrandBackground2}
);
border-radius: var(--progress-bar-radius);
animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
Copy link
Member

Choose a reason for hiding this comment

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

I would expect some @media (prefers-reduced-motion) styles, but there is nothing in a design spec.

*/
export const ProgressBarShape = {
rounded: 'rounded',
rectangular: 'rectangular',
Copy link
Member

Choose a reason for hiding this comment

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

this is interesting - @miroslavstastny curious if this is intentionally different than square semantic found in badge, etc. Are we documenting these inconsistencies elsewhere or are some of these known and desired to be "aligned" back to something consistent?

Copy link
Member

Choose a reason for hiding this comment

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

not blocking but if we have an opportunity to do that work now...

Copy link
Member

Choose a reason for hiding this comment

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

My first guess would be "square" means "four equal straight sides and four right angles", which might be the case for Badge or Avatar where we use it in FUIR9, but we also use it in Button and Image which can render as rectangles.

ProgressBar is still unstable in FUIR9, I will discuss with engineers there.

Copy link
Member

Choose a reason for hiding this comment

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

FUIR9 will rename to square

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will rename in this implementation.

Copy link
Member

@chrisdholt chrisdholt left a comment

Choose a reason for hiding this comment

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

LGTM - Let's make sure that @miroslavstastny signs off as well.

@procload procload enabled auto-merge (squash) January 18, 2023 18:18
@procload procload merged commit 1322f3f into microsoft:web-components-v3 Jan 18, 2023
Hotell pushed a commit to Hotell/fluentui that referenced this pull request Feb 9, 2023
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
Hotell pushed a commit to Hotell/fluentui that referenced this pull request Feb 9, 2023
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
chrisdholt pushed a commit that referenced this pull request Apr 29, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 29, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 29, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 30, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit that referenced this pull request Apr 30, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit that referenced this pull request May 2, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit that referenced this pull request May 2, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit that referenced this pull request May 2, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit that referenced this pull request May 3, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit that referenced this pull request May 6, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit that referenced this pull request May 6, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit that referenced this pull request May 8, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
radium-v pushed a commit that referenced this pull request May 10, 2024
* Adds web component version of ProgressBar

* Generates change

* Renames progressbar to progress-bar

* Changes alphabetical ordering of imports

* Enumerates null value; Adds ? to boolean in Story

* Adds typedocs to progress-bar class

* Fixes class to attribute typo in CSS

* Removes duped CSS

* Adds export of progress-bar to package.json

* Removes null in validation state object

* Removes local CSS variables; Removes defaults on thickness and rounded corners

* Removes unused CSS

* Removes unused options, pause and min, that don't exist in Fluent

* Addresses remaining feedback on PR: Renames rect to square; Cleans up Storybook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants