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

Merge NavBar feature branch into main #1731

Merged

Conversation

amgleitman
Copy link
Member

@amgleitman amgleitman commented May 5, 2023

Platforms Impacted

  • iOS
  • macOS

Description of changes

This brings all the navigation bar enhancements into the main branch, including the ability to host two-line title views and tokenization.

This change also includes two new features that ended up being requirements: an autolayout-based TwoLineTitleView and a decoupling of TextColorStyle from Label.

This change involved a temporary revert of #1699 (with 5af0153) because it didn't play nicely with TwoLineTitleView's manual layout mechanism. Naturally, this is a moot point now.

Binary change

As of f85784a:

Total increase: 859,384 bytes
Total decrease: -184,072 bytes

File Before After Delta
Total 30,729,400 bytes 31,404,712 bytes ⛔️ 675,312 bytes
Full breakdown
File Before After Delta
NavigationBar.o 544,856 bytes 666,840 bytes 🛑 121,984 bytes
__.SYMDEF 4,638,352 bytes 4,748,240 bytes 🛑 109,888 bytes
TwoLineTitleView.o 208,176 bytes 300,080 bytes 🛑 91,904 bytes
NavigationBarTokenSet.o 0 bytes 71,232 bytes 🛑 71,232 bytes
TwoLineTitleViewTokenSet.o 0 bytes 60,968 bytes 🛑 60,968 bytes
BadgeView.o 584,672 bytes 638,800 bytes 🛑 54,128 bytes
AvatarTitleViewTokenSet.o 0 bytes 53,568 bytes 🛑 53,568 bytes
FocusRingView.o 758,544 bytes 790,424 bytes ⚠️ 31,880 bytes
AvatarTitleView.o → LargeTitleView.o 159,488 bytes 188,288 bytes ⚠️ 28,800 bytes
UINavigationItem+Navigation.o 48,776 bytes 77,192 bytes ⚠️ 28,416 bytes
BadgeLabelButton.o 146,008 bytes 162,640 bytes ⚠️ 16,632 bytes
BadgeViewTokenSet.o 89,720 bytes 98,944 bytes ⚠️ 9,224 bytes
String+Extension.o 59,248 bytes 66,960 bytes ⚠️ 7,712 bytes
ShyHeaderView.o 123,624 bytes 127,032 bytes ⚠️ 3,408 bytes
AliasTokens.o 200,072 bytes 202,784 bytes ⚠️ 2,712 bytes
DateTimePickerView.o 279,424 bytes 281,256 bytes ⚠️ 1,832 bytes
DateTimePickerViewDataSource.o 283,392 bytes 284,960 bytes ⚠️ 1,568 bytes
LabelTokenSet.o 61,240 bytes 62,448 bytes ⚠️ 1,208 bytes
TextFieldTokenSet.o 96,432 bytes 97,072 bytes ⚠️ 640 bytes
UIView+Extensions.o 74,128 bytes 74,720 bytes ⚠️ 592 bytes
HUD.o 301,120 bytes 301,608 bytes ⚠️ 488 bytes
ShyHeaderController.o 248,928 bytes 249,120 bytes ⚠️ 192 bytes
FluentTheme+Tokens.o 62,624 bytes 62,784 bytes ⚠️ 160 bytes
ControlTokenSet.o 83,216 bytes 83,352 bytes ⚠️ 136 bytes
SegmentedControlTokenSet.o 96,560 bytes 96,592 bytes ⚠️ 32 bytes
CommandBarTokenSet.o 66,808 bytes 66,840 bytes ⚠️ 32 bytes
AvatarGroupTokenSet.o 48,584 bytes 48,616 bytes ⚠️ 32 bytes
NotificationTokenSet.o 94,128 bytes 94,160 bytes ⚠️ 32 bytes
SeparatorTokenSet.o 41,960 bytes 41,984 bytes ⚠️ 24 bytes
PersonaButtonCarouselTokenSet.o 43,512 bytes 43,536 bytes ⚠️ 24 bytes
TabBarTokenSet.o 46,648 bytes 46,672 bytes ⚠️ 24 bytes
EmptyTokenSet.o 38,824 bytes 38,848 bytes ⚠️ 24 bytes
PersonaButtonTokenSet.o 68,752 bytes 68,776 bytes ⚠️ 24 bytes
DrawerTokenSet.o 56,840 bytes 56,864 bytes ⚠️ 24 bytes
CardNudgeTokenSet.o 87,080 bytes 87,104 bytes ⚠️ 24 bytes
ButtonTokenSet.o 128,232 bytes 128,256 bytes ⚠️ 24 bytes
TooltipTokenSet.o 59,296 bytes 59,320 bytes ⚠️ 24 bytes
IndeterminateProgressBarTokenSet.o 45,456 bytes 45,480 bytes ⚠️ 24 bytes
SearchBarTokenSet.o 85,912 bytes 85,936 bytes ⚠️ 24 bytes
TableViewHeaderFooterViewTokenSet.o 83,312 bytes 83,336 bytes ⚠️ 24 bytes
TabBarItemTokenSet.o 63,440 bytes 63,464 bytes ⚠️ 24 bytes
BottomSheetTokenSet.o 48,896 bytes 48,920 bytes ⚠️ 24 bytes
ResizingHandleTokenSet.o 46,320 bytes 46,344 bytes ⚠️ 24 bytes
ActivityIndicatorTokenSet.o 65,976 bytes 65,992 bytes ⚠️ 16 bytes
SideTabBarTokenSet.o 51,896 bytes 51,912 bytes ⚠️ 16 bytes
TableViewCellTokenSet.o 114,312 bytes 114,328 bytes ⚠️ 16 bytes
SegmentPillButton.o 84,912 bytes 84,928 bytes ⚠️ 16 bytes
PopupMenuTokenSet.o 20,384 bytes 20,400 bytes ⚠️ 16 bytes
BottomCommandingController.o 725,224 bytes 725,232 bytes ⚠️ 8 bytes
ShimmerTokenSet.o 75,680 bytes 75,688 bytes ⚠️ 8 bytes
PillButtonTokenSet.o 92,968 bytes 92,976 bytes ⚠️ 8 bytes
PopupMenuItemTokenSet.o 39,096 bytes 39,104 bytes ⚠️ 8 bytes
AvatarGroup.o 361,856 bytes 361,864 bytes ⚠️ 8 bytes
HeadsUpDisplayTokenSet.o 56,120 bytes 56,128 bytes ⚠️ 8 bytes
AvatarTokenSet.o 123,416 bytes 123,424 bytes ⚠️ 8 bytes
CardView.o 275,752 bytes 274,160 bytes 🎉 -1,592 bytes
NavigationController.o 162,176 bytes 160,504 bytes 🎉 -1,672 bytes
TableViewCellFileAccessoryView.o 331,608 bytes 329,488 bytes 🎉 -2,120 bytes
PopupMenuController.o 343,560 bytes 340,896 bytes 🎉 -2,664 bytes
CalendarViewMonthBannerView.o 29,640 bytes 26,576 bytes 🎉 -3,064 bytes
Label.o 123,640 bytes 110,168 bytes 🎉 -13,472 bytes

Verification

Validated the following scenarios:

  • Changing the content size category in real time
  • Rotating the device
  • Token overrides at the Label, TwoLineTitleView, and NavigationBar levels

There are several screenshots in the documentation folder to give you an idea of what our new navigation bars look like.

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

Adam Gleitman and others added 30 commits January 25, 2023 16:27
Add support for two-line navigation bar titles
@huwilkes
Copy link
Collaborator

Looks like there are some issues with the pod validation:

- ERROR | [MicrosoftFluentUI/Calendar_ios,MicrosoftFluentUI/TwoLineTitleView_ios] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
- ERROR | [MicrosoftFluentUI/Calendar_ios,MicrosoftFluentUI/TwoLineTitleView_ios] xcodebuild:  /Users/runner/work/fluentui-apple/fluentui-apple/ios/FluentUI/TwoLineTitleView/TwoLineTitleView.swift:10:11: error: cannot find type 'NavigationBarTitleAccessory' in scope
- ERROR | [MicrosoftFluentUI/Calendar_ios,MicrosoftFluentUI/TwoLineTitleView_ios] xcodebuild:  /Users/runner/work/fluentui-apple/fluentui-apple/ios/FluentUI/TwoLineTitleView/TwoLineTitleView.swift:20:23: error: cannot find type 'NavigationBarTitleAccessory' in scope
- ERROR | [MicrosoftFluentUI/Calendar_ios,MicrosoftFluentUI/TwoLineTitleView_ios] xcodebuild:  /Users/runner/work/fluentui-apple/fluentui-apple/ios/FluentUI/TwoLineTitleView/TwoLineTitleView.swift:31:23: error: cannot find type 'NavigationBarTitleAccessory' in scope
- ERROR | [MicrosoftFluentUI/Calendar_ios,MicrosoftFluentUI/TwoLineTitleView_ios] xcodebuild:  /Users/runner/work/fluentui-apple/fluentui-apple/ios/FluentUI/TwoLineTitleView/TwoLineTitleView.swift:325:51: error: value of type 'UINavigationItem' has no member 'titleStyle'
- ERROR | [MicrosoftFluentUI/Calendar_ios,MicrosoftFluentUI/TwoLineTitleView_ios] xcodebuild:  /Users/runner/work/fluentui-apple/fluentui-apple/ios/FluentUI/TwoLineTitleView/TwoLineTitleView.swift:330:48: error: type of expression is ambiguous without more context
- ERROR | [MicrosoftFluentUI/Calendar_ios,MicrosoftFluentUI/TwoLineTitleView_ios] xcodebuild:  /Users/runner/work/fluentui-apple/fluentui-apple/ios/FluentUI/TwoLineTitleView/TwoLineTitleView.swift:343:56: error: value of type 'UINavigationItem' has no member 'titleImage'
- ERROR | [MicrosoftFluentUI/Calendar_ios,MicrosoftFluentUI/TwoLineTitleView_ios] xcodebuild:  /Users/runner/work/fluentui-apple/fluentui-apple/ios/FluentUI/TwoLineTitleView/TwoLineTitleView.swift:343:93: error: value of type 'UINavigationItem' has no member 'subtitle'

@amgleitman
Copy link
Member Author

amgleitman commented May 15, 2023

Looks like there are some issues with the pod validation:

I'm guessing this is because TwoLineTitleView depends on the UINavigationItem extensions from Navigation. We may have to try to reorganize some things.

@amgleitman amgleitman merged commit a447e28 into microsoft:main May 15, 2023
@amgleitman amgleitman deleted the navbar-merge-main-2023-05-04-minus-1699 branch May 15, 2023 20:07
@amgleitman amgleitman restored the navbar-merge-main-2023-05-04-minus-1699 branch May 15, 2023 23:23
@joannaquu joannaquu mentioned this pull request May 16, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants