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

Adds Slider as a web component #27165

Conversation

procload
Copy link
Contributor

Adds the Fluent Slider web component

@procload procload changed the base branch from master to web-components-v3 March 10, 2023 20:31
@fabricteam
Copy link
Collaborator

fabricteam commented Mar 10, 2023

📊 Bundle size report

🤖 This report was generated against 91c21378cefc198a8e719663cd1603b86e3edcf7

@size-auditor
Copy link

size-auditor bot commented Mar 10, 2023

Asset size changes

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

Baseline commit: 91c21378cefc198a8e719663cd1603b86e3edcf7 (build)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 10, 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 575bb52:

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

@procload procload force-pushed the users/procload/add-slider-and-sliderlabel-as-web-component branch from 038880b to 63072e5 Compare March 14, 2023 18:07
@procload procload marked this pull request as ready for review March 14, 2023 18:13
@procload procload requested a review from a team as a code owner March 14, 2023 18:13
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.

Looks good overall, a few things I think we need to clean up/fix. Also, remember to export from the package.json

packages/web-components/src/slider/slider.stories.ts Outdated Show resolved Hide resolved
packages/web-components/src/slider/slider.stories.ts Outdated Show resolved Hide resolved
packages/web-components/src/slider/slider.stories.ts Outdated Show resolved Hide resolved
packages/web-components/src/slider/slider.styles.ts Outdated Show resolved Hide resolved
packages/web-components/src/slider/slider.ts Outdated Show resolved Hide resolved
packages/web-components/src/slider/slider.ts Outdated Show resolved Hide resolved
@procload
Copy link
Contributor Author

@chrisdholt or @eljefe223 I merged in Chris' Slider code and resolved the previous comments. When you have a chance (I know it might be slow, you're busy), can you take another look?

@jpaims
Copy link

jpaims commented Mar 21, 2023

Design review:

# Issue Category
1 Check focus border style. There should be an additional inner 1px stroke (--colorStrokeFocus1) Accessibility
2 Focus border seems to appear on any mouse interaction but should only appear on keyboard tabbing Accessibility
3 In vertical orientation, steps don't seem to quite match the slider thumb position Styling

Will there be a property for showing min and max values or input fields on the ends of the slider?

@chrisdholt
Copy link
Member

Design review:

Issue Category

1 Check focus border style. There should be an additional inner 1px stroke (--colorStrokeFocus1) Accessibility
2 Focus border seems to appear on any mouse interaction but should only appear on keyboard tabbing Accessibility
3 In vertical orientation, steps don't seem to quite match the slider thumb position Styling
Will there be a property for showing min and max values or input fields on the ends of the slider?

Where do min and max values get shown? As for input fields, that would be an a11y issue as part of this component. The root element here has a role of slider and nested interactive controls would not be navigable or accessible to assistive technologies.

@procload
Copy link
Contributor Author

@eljefe223 Not a big rush, but can you take a look when you get a chance? I made some minor design updates per @jpaims after Chris approved.

@procload procload merged commit d637794 into microsoft:web-components-v3 Mar 27, 2023
@procload procload deleted the users/procload/add-slider-and-sliderlabel-as-web-component branch March 27, 2023 15:38
chrisdholt added a commit that referenced this pull request Apr 29, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 29, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 29, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit to radium-v/fluentui that referenced this pull request Apr 30, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit that referenced this pull request Apr 30, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit that referenced this pull request May 2, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit that referenced this pull request May 2, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit that referenced this pull request May 2, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit that referenced this pull request May 3, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit that referenced this pull request May 6, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit that referenced this pull request May 6, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit that referenced this pull request May 8, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
radium-v pushed a commit that referenced this pull request May 10, 2024
* Initial commit of styles and markup for slider

* Cleans up some styles and adds Stories for states

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Cleans up CSS

* Cleans up CSS and Stories for Slider

* Initial commit of styles and markup for slider

* More Slider styles and stories

* Adds stripes to slider for vertical/horizontal. Deletes SliderLabel as we don't need it

* Fixes silly math

* Fixes some styles on checkmarks

* Adds check to see if Step was set

* Generates API report

* Removes some duplicate CSS and cleans up spec

* Adds slider to index.ts and package.json

* Addresses initial round of feedback to PR

* Renames sizeChanged to stepChanged. Duh.

* Adds JSDOC comments

* update slider step rate code

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Adds export to SliderOrientation

* Adds new focus style and fixes overflow visual bug

* Fixes build errors

* Runs API report

---------

Co-authored-by: Chris Holt <chhol@microsoft.com>
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.

None yet

7 participants