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

chore: update the appearance filled styles on text-field, text-area and number-field components #17595

Merged
merged 7 commits into from
Mar 31, 2021

Conversation

khamudom
Copy link
Contributor

@khamudom khamudom commented Mar 27, 2021

Pull request checklist

  • Addresses an existing issue: Fixes #0000
  • Include a change request file using $ yarn change

Description of changes

The updated style involves adding the active state for text-field text-area and number-filed, the active state has a small underline and when focused the underline fills the width of the input.

Created a file in the patterns directory called input.ts. This is where we will put different helper styles for the different types of input appearance. Currently, the only helper object is for the filled appearance.

Additional changes were in the text-area component, where the display was changed to inline-flex, this removes an extra space that was being set on the bottom of the component.
High contrast style was also addressed to match the updated design.

text-field (rest, hover, active and focus)
image
image
image
image

text-area (rest, hover, active and focus)
image
image
image
image

number-field (rest, hover, active and focus)
image
image
image
image

High Contrast (active and focus states)
image
image
image
image
image
image

Focus areas to test

(optional)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 27, 2021

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 a6eda29:

Sandbox Source
Fluent UI Button Configuration
codesandbox-react-template Configuration
codesandbox-react-northstar-template Configuration

@fabricteam
Copy link
Collaborator

fabricteam commented Mar 27, 2021

Perf Analysis

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1013 1031 5000
BaseButton mount 1031 1022 5000
Breadcrumb mount 45173 45054 5000
ButtonNext mount 610 633 5000
Checkbox mount 1700 1735 5000
CheckboxBase mount 1458 1470 5000
ChoiceGroup mount 5253 5268 5000
ComboBox mount 1063 1126 1000
CommandBar mount 10691 10764 1000
ContextualMenu mount 6672 6668 1000
DefaultButton mount 1248 1279 5000
DetailsRow mount 4008 4030 5000
DetailsRowFast mount 3966 3993 5000
DetailsRowNoStyles mount 3773 3767 5000
Dialog mount 1587 1615 1000
DocumentCardTitle mount 1867 1891 1000
Dropdown mount 3559 3645 5000
FocusTrapZone mount 1929 1961 5000
FocusZone mount 1867 1917 5000
IconButton mount 1934 1910 5000
Label mount 363 358 5000
Layer mount 1954 1949 5000
Link mount 527 524 5000
MakeStyles mount 1916 1957 50000
MenuButton mount 1589 1623 5000
MessageBar mount 2109 2121 5000
Nav mount 3619 3596 1000
OverflowSet mount 1123 1092 5000
Panel mount 1551 1469 1000
Persona mount 873 880 1000
Pivot mount 1562 1519 1000
PrimaryButton mount 1392 1417 5000
Rating mount 8573 8445 5000
SearchBox mount 1437 1501 5000
Shimmer mount 2852 2841 5000
Slider mount 2165 2173 5000
SpinButton mount 5507 5498 5000
Spinner mount 446 431 5000
SplitButton mount 3468 3472 5000
Stack mount 540 570 5000
StackWithIntrinsicChildren mount 1666 1666 5000
StackWithTextChildren mount 5100 5090 5000
SwatchColorPicker mount 10990 11055 5000
Tabs mount 1498 1559 1000
TagPicker mount 3091 3107 5000
TeachingBubble mount 12422 12396 5000
Text mount 466 469 5000
TextField mount 1605 1535 5000
ThemeProvider mount 1269 1261 5000
ThemeProvider virtual-rerender 631 606 5000
ThemeProviderNext mount 16109 16093 5000
Toggle mount 908 883 5000
buttonNative mount 121 123 5000

Perf Analysis (Fluent)

Perf comparison
Status Scenario Fluent TPI Fabric TPI Ratio Iterations Ticks
🦄 Avatar.Fluent 0.19 0.51 0.37:1 2000 385
🦄 Button.Fluent 0.12 0.22 0.55:1 5000 623
🔧 Checkbox.Fluent 0.67 0.4 1.68:1 1000 673
🎯 Dialog.Fluent 0.17 0.24 0.71:1 5000 832
🔧 Dropdown.Fluent 3.24 0.46 7.04:1 1000 3242
🔧 Icon.Fluent 0.14 0.07 2:1 5000 687
🦄 Image.Fluent 0.09 0.14 0.64:1 5000 455
🔧 Slider.Fluent 1.68 0.5 3.36:1 1000 1679
🔧 Text.Fluent 0.08 0.04 2:1 5000 419
🦄 Tooltip.Fluent 0.16 0.97 0.16:1 5000 801

🔧 Needs work     🎯 On target     🦄 Amazing

Perf tests with no regressions
Scenario Current PR Ticks Baseline Ticks Ratio
AttachmentMinimalPerf.default 206 188 1.1:1
AvatarMinimalPerf.default 246 224 1.1:1
RadioGroupMinimalPerf.default 532 486 1.09:1
SegmentMinimalPerf.default 426 396 1.08:1
ButtonMinimalPerf.default 219 205 1.07:1
PortalMinimalPerf.default 192 179 1.07:1
TextAreaMinimalPerf.default 598 558 1.07:1
Text.Fluent 419 391 1.07:1
DividerMinimalPerf.default 428 405 1.06:1
DropdownManyItemsPerf.default 815 769 1.06:1
SkeletonMinimalPerf.default 419 394 1.06:1
TreeWith60ListItems.default 209 197 1.06:1
Tooltip.Fluent 801 753 1.06:1
AlertMinimalPerf.default 326 311 1.05:1
ImageMinimalPerf.default 459 438 1.05:1
MenuButtonMinimalPerf.default 1793 1711 1.05:1
PopupMinimalPerf.default 792 751 1.05:1
IconMinimalPerf.default 694 663 1.05:1
AccordionMinimalPerf.default 190 182 1.04:1
ButtonSlotsPerf.default 640 613 1.04:1
ListMinimalPerf.default 584 561 1.04:1
TableMinimalPerf.default 462 445 1.04:1
ToolbarMinimalPerf.default 1073 1036 1.04:1
AnimationMinimalPerf.default 464 449 1.03:1
BoxMinimalPerf.default 408 397 1.03:1
FlexMinimalPerf.default 334 323 1.03:1
ItemLayoutMinimalPerf.default 1445 1398 1.03:1
LayoutMinimalPerf.default 439 425 1.03:1
MenuMinimalPerf.default 1012 979 1.03:1
Avatar.Fluent 385 375 1.03:1
Dialog.Fluent 832 804 1.03:1
AttachmentSlotsPerf.default 1271 1240 1.02:1
CardMinimalPerf.default 656 641 1.02:1
HeaderSlotsPerf.default 892 871 1.02:1
RefMinimalPerf.default 262 256 1.02:1
TextMinimalPerf.default 407 399 1.02:1
TooltipMinimalPerf.default 1088 1071 1.02:1
ChatMinimalPerf.default 684 678 1.01:1
ChatWithPopoverPerf.default 420 415 1.01:1
DialogMinimalPerf.default 805 800 1.01:1
DropdownMinimalPerf.default 3313 3272 1.01:1
EmbedMinimalPerf.default 4464 4406 1.01:1
FormMinimalPerf.default 485 481 1.01:1
InputMinimalPerf.default 1372 1353 1.01:1
ProviderMinimalPerf.default 1059 1045 1.01:1
StatusMinimalPerf.default 773 762 1.01:1
CustomToolbarPrototype.default 4008 3980 1.01:1
TreeMinimalPerf.default 884 874 1.01:1
VideoMinimalPerf.default 727 719 1.01:1
LabelMinimalPerf.default 455 454 1:1
ProviderMergeThemesPerf.default 1746 1743 1:1
SliderMinimalPerf.default 1686 1680 1:1
Button.Fluent 623 624 1:1
Dropdown.Fluent 3242 3256 1:1
Image.Fluent 455 453 1:1
Slider.Fluent 1679 1674 1:1
GridMinimalPerf.default 383 387 0.99:1
ListWith60ListItems.default 718 726 0.99:1
ReactionMinimalPerf.default 430 436 0.99:1
TableManyItemsPerf.default 2151 2177 0.99:1
Checkbox.Fluent 673 680 0.99:1
CheckboxMinimalPerf.default 2959 3015 0.98:1
DatepickerMinimalPerf.default 50075 51098 0.98:1
HeaderMinimalPerf.default 409 418 0.98:1
RosterPerf.default 1335 1356 0.98:1
SplitButtonMinimalPerf.default 4080 4156 0.98:1
ButtonOverridesMissPerf.default 1798 1851 0.97:1
ButtonUseCssPerf.default 888 916 0.97:1
ButtonUseCssNestingPerf.default 1169 1206 0.97:1
CarouselMinimalPerf.default 533 549 0.97:1
ListNestedPerf.default 641 658 0.97:1
Icon.Fluent 687 710 0.97:1
ListCommonPerf.default 716 753 0.95:1
LoaderMinimalPerf.default 754 793 0.95:1
ChatDuplicateMessagesPerf.default 332 352 0.94:1

@size-auditor
Copy link

size-auditor bot commented Mar 27, 2021

Asset size changes

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

Baseline commit: e45eeaba8deb93e825a9d3f72e87a9c4c9225ea1 (build)

@khamudom khamudom force-pushed the users/khamu/update-filled-style branch from 57dbbf6 to 4b001cc Compare March 30, 2021 01:53
@EisenbergEffect
Copy link
Contributor

@khamudom Is this aligned with the latest versions of Fluent outlined in the specs? Just trying to get a feel for whether this is catch-up to the old versions or part of the new work.

@khamudom
Copy link
Contributor Author

@khamudom Is this aligned with the latest versions of Fluent outlined in the specs? Just trying to get a feel for whether this is catch-up to the old versions or part of the new work.

Correct, this is aligning to the latest fluent design.

@chrisdholt chrisdholt merged commit 1ddf333 into microsoft:master Mar 31, 2021
@msft-fluent-ui-bot
Copy link
Collaborator

🎉@fluentui/web-components@v0.20.2 has been released which incorporates this pull request.:tada:

Handy links:

miroslavstastny pushed a commit to miroslavstastny/fluentui that referenced this pull request May 5, 2021
…nd number-field components (microsoft#17595)

* update filled style on textfield textarea and numberfield

* Change files

* update high contrast color on placeholder and label

* create and input pattern file and applied pattern to filled inputs

* fix import order

* updated api-report

* adding transition to active line
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.

7 participants