-
Notifications
You must be signed in to change notification settings - Fork 166
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
Updating Segmented Control #449
Conversation
Updating Segmented Control to add support for having full screen equal width pill buttons, customizable colors with pill buttons, the primary and onBrand styles for pill buttons, and the ability to retrieve the view of a button at an index
Simplified Switch Case statements by combining similar cases. Removed Calls to #available api. Removed unnecessary call to set cornerCurve on pill button.
can you also add darkmode images and ipad images in the description of the PR? you can use markdown for table to make it look more organized with screenshots |
ios/FluentUI.Demo/FluentUI.Demo/Demos/SegmentedControlDemoController.swift
Show resolved
Hide resolved
ios/FluentUI.Demo/FluentUI.Demo/Demos/SegmentedControlDemoController.swift
Outdated
Show resolved
Hide resolved
Fixed some code style concerns along with making changes to the demo app to better present the controls on the proper background. Also fixed a safe area issue on nothced iPhones.
Some how dropped the changes I meant to commit last time. They're in this commit, along with changes to try and use the UIWindowScene screen
ios/FluentUI.Demo/FluentUI.Demo/Demos/SegmentedControlDemoController.swift
Outdated
Show resolved
Hide resolved
Update struct properties to no longer be public
Updated the demo app to center the equal width controls. Changed the name of getViewForButton(at index:) to segmentView(at index:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just found a constraint issue on the trailing button with the background.
Other than that and the pod lib lint failure, it's looking good!
Fixed a broken layout constraint on the width/trailing constraints of the control and updated the subspecs to move segmented control to its own subspec that depends on pill button. Also moved the segmented control's source file to its own folder to properly remove it from the controls subspec.
The static lib build was failing in the date time picker because SegmentedControl.swift wasn't included in the FluentUILib target. Also removed an extra SegmentedControl.swift from the top of the project that didn't belong.
@@ -87,6 +88,13 @@ Pod::Spec.new do |s| | |||
presenters_ios.dependency 'MicrosoftFluentUI/Controls_ios' | |||
presenters_ios.source_files = ["ios/FluentUI/Presenters/**/*.{swift,h}"] | |||
end | |||
|
|||
s.subspec 'SegmentedControl_ios' do |segmentedcontrol_ios| | |||
segmentedcontrol_ios.platform = :ios |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@huwilkes can you fix the indentation here? We only use spaces instead of tabs.
Platforms Impacted
Description of changes
Updating Segmented Control to add support for having full screen equal width pill buttons, customizable colors with pill buttons, the primary and onBrand styles for pill buttons, and the ability to retrieve the view of a button at an index. Also updated the demo app to show the new styles with and without equal width
Verification
Pull request checklist
This PR has considered:
Microsoft Reviewers: Open in CodeFlow