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

fix: Combobox text attribute ignored when empty string is passed #24665

Merged
merged 4 commits into from
Oct 27, 2022

Conversation

Sebbiv
Copy link
Contributor

@Sebbiv Sebbiv commented Sep 5, 2022

Current Behavior

ComboBox Component:
When using text property empty string is ignored, meaning you can't clear the ComboBox freeform value

New Behavior

Empty string is not ignored and you are able to use text property to clear ComboBox freeform value

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 5, 2022

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 314e6bb:

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

@size-auditor
Copy link

size-auditor bot commented Sep 5, 2022

Asset size changes

Project Bundle Baseline Size New Size Difference
office-ui-fabric-react fluentui-react-ComboBox 236.76 kB 236.77 kB ExceedsBaseline     10 bytes
office-ui-fabric-react fluentui-react-TimePicker 225.769 kB 225.779 kB ExceedsBaseline     10 bytes

ExceedsTolerance Over Tolerance (1024 B) ExceedsBaseline Over Baseline BelowBaseline Below Baseline New New Deleted  Removed 1 kB = 1000 B

Baseline commit: fe895d6bb4f9df0304f63f7e77acafef4b912925 (build)

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 5, 2022

📊 Bundle size report

🤖 This report was generated against fe895d6bb4f9df0304f63f7e77acafef4b912925

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 5, 2022

Perf Analysis (@fluentui/react)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
BaseButton mount 1197 1190 5000
Breadcrumb mount 2784 2811 1000
Checkbox mount 2624 2625 5000
CheckboxBase mount 2363 2368 5000
ChoiceGroup mount 4239 4281 5000
ComboBox mount 1170 1185 1000
CommandBar mount 9200 9304 1000
ContextualMenu mount 10122 10083 1000
DefaultButton mount 1372 1349 5000
DetailsRow mount 3358 3363 5000
DetailsRowFast mount 3371 3368 5000
DetailsRowNoStyles mount 3247 3201 5000
Dialog mount 2952 2978 1000
DocumentCardTitle mount 590 570 1000
Dropdown mount 3146 3138 5000
FocusTrapZone mount 1952 1947 5000
FocusZone mount 1926 1926 5000
GroupedList mount 48321 54133 2
GroupedList virtual-rerender 22928 23156 2
GroupedList virtual-rerender-with-unmount 82196 82994 2
GroupedListV2 mount 559 548 2
GroupedListV2 virtual-rerender 533 528 2
GroupedListV2 virtual-rerender-with-unmount 556 566 2
IconButton mount 1796 1786 5000
Label mount 744 752 5000
Layer mount 4158 4093 5000
Link mount 871 849 5000
MenuButton mount 1609 1603 5000
MessageBar mount 2383 2351 5000
Nav mount 3046 3039 1000
OverflowSet mount 1385 1412 5000
Panel mount 2485 2504 1000
Persona mount 1241 1257 1000
Pivot mount 1520 1534 1000
PrimaryButton mount 1478 1462 5000
Rating mount 7016 7010 5000
SearchBox mount 1483 1495 5000
Shimmer mount 2913 2894 5000
Slider mount 2116 2117 5000
SpinButton mount 4252 4297 5000
Spinner mount 825 834 5000
SplitButton mount 2794 2832 5000
Stack mount 856 853 5000
StackWithIntrinsicChildren mount 2219 2166 5000
StackWithTextChildren mount 4898 4879 5000
SwatchColorPicker mount 9511 9436 5000
TagPicker mount 2350 2466 5000
TeachingBubble mount 74713 74120 5000
Text mount 828 821 5000
TextField mount 1544 1559 5000
ThemeProvider mount 1446 1453 5000
ThemeProvider virtual-rerender 1130 1133 5000
ThemeProvider virtual-rerender-with-unmount 2010 1998 5000
Toggle mount 1132 1138 5000
buttonNative mount 526 535 5000

@Sebbiv Sebbiv marked this pull request as ready for review September 6, 2022 00:02
@Sebbiv Sebbiv requested review from a team as code owners September 6, 2022 00:02
@Hotell Hotell removed their assignment Sep 12, 2022
Copy link
Contributor

@smhigley smhigley left a comment

Choose a reason for hiding this comment

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

Just the one changefile suggestion, otherwise thanks for making this PR! It seems like a good change.

Change - patch to minor
@Sebbiv Sebbiv requested a review from smhigley September 25, 2022 22:26
@Sebbiv
Copy link
Contributor Author

Sebbiv commented Oct 17, 2022

@smhigley Hello, could I please request merge of this commit?

@Sebbiv Sebbiv marked this pull request as draft October 22, 2022 17:15
@Sebbiv Sebbiv marked this pull request as ready for review October 22, 2022 17:16
@micahgodbolt micahgodbolt enabled auto-merge (squash) October 26, 2022 17:40
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Allow empty string as valid value for text property of ComboBox",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"comment": "Allow empty string as valid value for text property of ComboBox",
"comment": "fix: Allow empty string as valid value for text property of ComboBox.",

@micahgodbolt
Copy link
Member

Going to force merge this as it's getting hung up on northstar and v9 screener jobs.

@micahgodbolt micahgodbolt merged commit 6682e6f into microsoft:master Oct 27, 2022
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Oct 31, 2022
* master: (22 commits)
  fix(react-menu): removes exposing of internal type FluentTriggerComponent (microsoft#25410)
  fix(react-popover): removes exposing of internal type FluentTriggerComponent (microsoft#25411)
  applying package updates
  fix(react-tooltip): removes exposing of internal type FluentTriggerComponent (microsoft#25409)
  chore: Reducing bundle size of Stack by moving selector used in multiple places to local const (microsoft#25429)
  docs(rfcs): Simple component implementation (microsoft#25139)
  Fix migration publishing (microsoft#25422)
  Integrate storywright for story tests - As part of exploring screener alternative (microsoft#25399)
  fix(react-utilities): exposes internal methods used in API surface (microsoft#25406)
  fix(react-dialog): removes exposing of internal type FluentTriggerComponent (microsoft#25408)
  fix(react-context-selector): exposes internal type ContextSelector (microsoft#25404)
  fix(react-aria): exposes internal leaking types (microsoft#25403)
  fix(react-shared-contexts): exposes internal leaks used in the API surface (microsoft#25405)
  fix(react-positioning): exposes new typings to avoid exposing internal methods (microsoft#25407)
  applying package updates
  fix: Allowing DatePicker to be focusable within FocusZones by default (microsoft#25428)
  fix: Pad in slider so the thumb does not render outside the bounds of the root element (microsoft#25378)
  feat: Add enableScopedSelectors prop to Stack that, when true, makes the Stack styles selectors be more scoped to not be as expensive in style recalculation (microsoft#25397)
  fix(react-avatar): Remove gaps between AvatarGroupItem/OveflowButton and its outline (microsoft#25382)
  fix: Combobox text attribute ignored when empty string is passed (microsoft#24665)
  ...
NotWoods pushed a commit to NotWoods/fluentui that referenced this pull request Nov 18, 2022
…rosoft#24665)

* fix: Combobox text attribute ignored when empty string is passed

* Change file

* Update change file

Change - patch to minor

Co-authored-by: Micah Godbolt <[email protected]>
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