microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.53k stars 2.74k forks source link

Standardize positioning attribute values to use `start` and `end` vs `after` and `before` #32343

Open eljefe223 opened 2 months ago

eljefe223 commented 2 months ago

Environment Information

Describe the issue:

For controls that have positioning attributes, ie LabelPosition or IconPosition we are inconstant in the language we use to describe where an element will layout. In some cases, we use start and end and in others we use before and after. We should standardize on start and end which is more consistent with CSS and localization properties and values like flex-start or margin-inline-start

Before and After https://react.fluentui.dev/?path=/docs/components-switch--docs#label

Start and End https://react.fluentui.dev/?path=/docs/components-accordion--docs#expand-icon-position

Actual behavior:

We are not consistent with language used.

Expected behavior:

BE consistent with language used.

If applicable, please provide a codepen repro:

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? (Yes, No)

Requested priority: (Blocking, High, Normal, Low)

Products/sites affected: (if applicable)

TristanWatanabe commented 2 months ago

This valid as our positioning prop values do contain inconsistencies (see below). Fixing these to be consistent across the board in v9 would be a breaking change but this is possibly a good RFC candidate for a naming pattern to follow for new components and beyond (v10 etc.).

TS Badge types ts packagesreact-componentsreact-b AccordionHeaderExpandiconPosition = 'start'  'end';