Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Checkbox spec: clarifying conversion table & adding work items to track conversion. #2212

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aneeshack4
Copy link
Contributor

We arrived at the final props list in this conversion table by comparing the props lists of the current Fabric and Stardust Checkboxes and the conversion was meant to track the progress of the conversion from the Fabric Checkbox, not the current Stardust/Fluent Checkbox in this repo. So added some clarification of that and added a list of work items to track the conversion of the current Stardust/Fluent Checkbox to the new Fluent Checkbox we're trying to build with this spec.

Aneesha Kommineni added 2 commits January 7, 2020 14:57
…le more clear, adding work items to track conversion of current Fluent/Stardust to new Fluent Checkbox.
@DustyTheBot
Copy link
Collaborator

DustyTheBot commented Jan 7, 2020

Warnings
⚠️ There are no updates provided to CHANGELOG. Ensure there are no publicly visible changes introduced by this PR.

Perf comparison

Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🔧 Avatar.Fluent 0.57 0.36 1.58:1 2000 1150
🔧 Button.Fluent 1.22 0.15 8.13:1 1000 1224
🔧 Checkbox.Fluent 1.4 0.27 5.19:1 1000 1399
🔧 Dialog.Fluent 0.36 0.17 2.12:1 5000 1800
🔧 Dropdown.Fluent 3.45 0.34 10.15:1 1000 3451
🔧 Icon.Fluent 0.25 0.03 8.33:1 5000 1229
🔧 Image.Fluent 0.11 0.07 1.57:1 5000 535
🔧 Slider.Fluent 1.8 0.31 5.81:1 1000 1795
🦄 Text.Fluent 0.06 0.16 0.38:1 5000 294
🦄 Tooltip.Fluent 0.36 16.22 0.02:1 5000 1783

🔧 Needs work     🎯 On target     🦄 Amazing

Generated by 🚫 dangerJS

@@ -156,9 +129,10 @@ Removing the following two props because the ARIA spec dictates role='checkbox'
| `ariaLabelledBy` | User provided | ❌ | ❌ | ❌ |
| `ariaPositionInSet` | Won't be transitioned| ❌ | ❌ | ❌ |
| `ariaSetSize` | Won't be transitioned| ❌ | ❌ | ❌ |
Copy link
Member

Choose a reason for hiding this comment

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

I believe all aria* attributes we weren't going to carry over the camelCased variants and instead use aria-* native attributes.

Copy link
Member

Choose a reason for hiding this comment

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

The most recent thing I remembered (from before the holidays) was the opposite, using camelCased instead of native.

Copy link
Contributor

Choose a reason for hiding this comment

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

as the acccessibility behaviors are platform independent, we opted for using aria-* initially istead of camel case. camel case is react specific and having just one approach in both components and behaviors brings consistency. @ecraig12345 it would be good to cover these decisions in design principles, so that we can refer to them and discsus them - I see pros and cons of this but the dicsussion might be lost when done under checkbox.

- [ ] Decide if `onClick` is too similar to `onChange` and if so, remove it. If not, change its type to native instead of the current `ComponentEventHandler`.
- [ ] Remove `toggle` - it will be a separate variant component of Checkbox.
- [ ] Remove `variables` - theming will be handled differently in the new Fluent.
- [ ] Remove `design` prop.
Copy link
Member

Choose a reason for hiding this comment

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

@levithomason was saying there were reasons to keep this that you all discussed in the second week, I thought.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To keep the design prop? I don't recall or see anything about it on the hackmd notes.

- [ ] Remove `variables` - theming will be handled differently in the new Fluent.
- [ ] Remove `design` prop.
- [ ] Decide on the TBD props `as`, `styles`, and `theme` which will apply to other components across the new Fluent library.
- [ ] Keep `labelPosition`, `checked`, `defaultChecked`, `className`, and `disabled` props unchanged.
Copy link
Member

Choose a reason for hiding this comment

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

The docs don't really mention that unrecognized native "div" (?) props should be mixed into root. I believe we expected that to continue to work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean the spec & not the docs? It's mentioned like this under the screenreader accessibility section but I'll add it here too:

should mix in native props expected for the element type defined in as.


### Work items and tracking progress on conversion from the current Fluent (Stardust) checkbox to the new Fluent checkbox we're building with this spec:
- [ ] Remove `animation` prop.
- [ ] Remove `accessibility` prop.
Copy link
Contributor

Choose a reason for hiding this comment

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

as discussed on the sync last week, we should not remove accessibility prop. We can have a separate discsussion about a replacement for it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I wasn't aware of this - what is this separate plan/is it documented anywhere?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants