552 Commits

Author SHA1 Message Date
Cody Weaver
f50ff96ac4 #Dialogs Remove legacy tests
PiperOrigin-RevId: 764821799
2025-05-29 11:51:05 -07:00
Nobody
5c9ba055ee Internal change now button height defined by the text size.
PiperOrigin-RevId: 713948536
2025-01-10 00:55:31 -08:00
Nobody
0ac0dfe5ad #Alert accessibility fix
PiperOrigin-RevId: 711922810
2025-01-03 19:29:24 -08:00
Nobody
24a0ffbd03 Annotate various Delegate protocols as NS_SWIFT_UI_ACTOR
PiperOrigin-RevId: 708413470
2024-12-20 13:33:55 -08:00
Frank Wang
610c997d82 [Dialogs] Fix issue where the line break mode is set on the wrong title label. It should be set on the M3CButton's titleLabel, instead it is set on the dialog's titleLabel.
PiperOrigin-RevId: 704766381
2024-12-10 10:44:47 -08:00
Frank Wang
d137cee34f The layout pass counter was being reset at the beginning of each layout cycle, which was causing infinite layout loops to be undetected. Since the value is always 1. This CL moves the reset of the counter to reset to 0 when the number of layout passes reach the maximum cap. This fixes the issue.
PiperOrigin-RevId: 676426260
2024-09-19 08:34:42 -07:00
Nobody
1c82353204 Implement hash for MDCAlertAction.
PiperOrigin-RevId: 675753854
2024-09-17 16:37:16 -07:00
Nobody
2ee21c0f84 Call super's viewDidLayoutSubviews.
PiperOrigin-RevId: 675590036
2024-09-17 09:07:32 -07:00
Jan Philipp Sachse
1c85f89bbd Check whether a button is actually an M3CButton before assuming so.
PiperOrigin-RevId: 644396761
2024-06-18 08:35:38 -07:00
Frank Wang
04a7740de8 Restrict the maximum number of layout passes in MDCAlertController to 10.
PiperOrigin-RevId: 644022588
2024-06-17 08:50:53 -07:00
Scott Atwood
100bbde16c Update delegate method documentation comments for accuracy.
PiperOrigin-RevId: 637973862
2024-05-28 11:48:59 -07:00
Frank Wang
2213969962 [Dialog/Codehealth] Allow M3CButton's title in the dialog to wrap to accommodate larger accessibility font sizes and longer strings.
PiperOrigin-RevId: 636960555
2024-05-24 10:24:30 -07:00
Jeff Verkoeyen
474affb1a6 [Dialogs] Delete all examples and tests.
PiperOrigin-RevId: 611482673
2024-02-29 08:36:39 -08:00
Nobody
08a152d259 Updates "left" to "leading" and "right" to "trailing" for action layout discussion.
PiperOrigin-RevId: 610869208
2024-02-27 14:12:36 -08:00
Nobody
582f031c70 Internal change
PiperOrigin-RevId: 606744858
2024-02-13 14:20:13 -08:00
Cody Weaver
086b1d5947 #MDC Delete failing Dialog tests
PiperOrigin-RevId: 606726995
2024-02-13 13:25:37 -08:00
Cody Weaver
3d3da8874a #Dialog Update dialog layout when trait collection changes
PiperOrigin-RevId: 599239755
2024-01-17 11:40:11 -08:00
Jake Rockland
3d505b98c4 Update MDCAlertControllerView to more explicitly expose the differentiated contentInsets that are used in the M3C variation of the component.
PiperOrigin-RevId: 579938835
2023-11-06 13:21:57 -08:00
Nobody
c3dc428f2a [Dialogs] Add an API that allows the accessory view to be placed on top of the message.
PiperOrigin-RevId: 555290003
2023-08-09 15:17:46 -07:00
Nobody
72d803f5b0 Update min touch target for M3CButton to 44pt to match spec. Previously was 48pt.
PiperOrigin-RevId: 537051415
2023-06-01 10:01:08 -07:00
Nobody
74cebbdb62 [Dialogs/Codehealth] Fix issue where the dialog size shrinks when dynamic type font size changes.
PiperOrigin-RevId: 532488920
2023-05-16 09:56:39 -07:00
Nobody
68b1737428 Update min touch target for M3CButton to 44pt to match spec. Previously was 48pt.
PiperOrigin-RevId: 529473500
2023-05-04 11:57:18 -07:00
Nobody
33a692f0dc Update min touch target for M3CButton to 44pt to match spec. Previously was 48pt.
PiperOrigin-RevId: 529416795
2023-05-04 08:33:14 -07:00
Nobody
5090e7835b Fix issue where dynamic type causes Dialogs with M3CButtons to violate insets.
PiperOrigin-RevId: 529118506
2023-05-03 09:54:49 -07:00
Cody Weaver
8fa0811d63 #Dialog Add an API for the Dialog insets
PiperOrigin-RevId: 525523575
2023-04-19 12:45:42 -07:00
Nobody
45dcfdfb00 [Dialog/CodeHealth] Fix issue where enabling M3CButtons multiple times via branding API causes asserts to hit.
PiperOrigin-RevId: 523722313
2023-04-12 09:32:56 -07:00
Nobody
3ca78f989b [Dialogs/Accessibility] Add responds to user interaction to message text view in Dialogs.
PiperOrigin-RevId: 519729011
2023-03-27 08:29:39 -07:00
Nobody
2403497f0b [Dialogs] Fix issue with incorrectly locating attributed links in RTL languages.
PiperOrigin-RevId: 513828597
2023-03-03 08:04:43 -08:00
Nobody
3526e335f4 [GM3/Dialogs] Update animation for dismissing the dialog.
PiperOrigin-RevId: 501576614
2023-01-12 08:49:29 -08:00
Nobody
58c100c3ed Adjust icon for dialogs to resize with dynamic type.
PiperOrigin-RevId: 496962646
2022-12-21 11:10:43 -08:00
Nobody
ce92681b38 Fix A11Y on alert views when the message contains an attributed string.
PiperOrigin-RevId: 496876783
2022-12-21 03:02:43 -08:00
Nobody
ff2b173f50 [GM3/Dialogs] Update bottom content inset for M3CButton enabled.
PiperOrigin-RevId: 493305621
2022-12-06 07:59:17 -08:00
Nobody
25c25ed49b [GM3/Dialogs] Fix issue with using incorrect min width for M3CButtons in Dialogs.
PiperOrigin-RevId: 492207399
2022-12-01 08:50:52 -08:00
Randall Li
92494ef718 [DialogsPresentationController] Change deprecation warning to point at guidance and added "🕘 Schedule time to migrate" message.
PiperOrigin-RevId: 492007974
2022-11-30 13:53:52 -08:00
Nobody
adcba263be [CodeHealth] Fix comment structure.
PiperOrigin-RevId: 490558072
2022-11-23 12:15:27 -08:00
Nobody
e6003808d0 [GM3] Add apply capsule corners to layoutSubviews.
PiperOrigin-RevId: 490540360
2022-11-23 10:54:43 -08:00
Nobody
1ffbee43b2 Fixed up imports and nullability for Dialogs
PiperOrigin-RevId: 485926719
2022-11-03 11:31:45 -07:00
Rob Moore
520dac76c6 [Dialogs] Test that setting titlePinsToTop does not cause the alert view to load.
Minor test update to validate that the new property doesn't cause the view to load.

Also removed some unused imports found during code review.

PiperOrigin-RevId: 484516340
2022-10-28 06:37:07 -07:00
Nobody
9e1c0c0a45 Internal change
PiperOrigin-RevId: 477458164
2022-09-28 08:26:32 -07:00
Jeff Verkoeyen
72dcc44075 Internal change
PiperOrigin-RevId: 468184898
2022-08-17 06:51:30 -07:00
Jeff Verkoeyen
4c6aea2a4e [Buttons+Dialogs] Disable deprecation warnings in headers.
This avoids propagation of warnings to non-Material compilation units which may have deprecation warnings enabled as errors.

PiperOrigin-RevId: 460832988
2022-07-13 16:47:50 -07:00
Jeff Verkoeyen
b2bbd50350 Mark all To Be Deprecated APIs as Deprecated.
PiperOrigin-RevId: 460478209
2022-07-12 09:13:52 -07:00
Nobody
57836c735d [Dialogs] Make the tapHandler readonly and public.
It never changes, so making it readonly reduces the amount of code generated.
When it's public, it's possible to test the code associated with the tap if the action is generated by another class without needing to also test the UI.

PiperOrigin-RevId: 459277729
2022-07-06 10:02:53 -07:00
Cody Weaver
3bb7382ce5 [Dialogs] Annotate symbols as to be deprecated
PiperOrigin-RevId: 458307676
2022-06-30 14:01:50 -07:00
Wenyu Zhang
2ff701bbbe [Dialogs] Fix the calculation for actionSize by removing the double counted actionsInsets and avoiding using fixed bounding width for justified layout, which causes multiple layout passes to stabilize the frame calculation - wrong frame.
PiperOrigin-RevId: 449314001
2022-05-17 14:22:06 -07:00
Janette James
505c27cd9f Fix dialog button layout on text size changes
PiperOrigin-RevId: 447858819
2022-05-10 16:48:06 -07:00
Cody Weaver
60493fce35 [Dialogs] Delete mdc_adjustsFontForContentSizeCategory API
PiperOrigin-RevId: 445175587
2022-04-28 09:45:32 -07:00
Cody Weaver
42bea2922d [Dialogs] Remove tests for mdc_adjustContentForSizeCategory
PiperOrigin-RevId: 443184826
2022-04-20 13:57:01 -07:00
Cody Weaver
920a8ae943 [Dialogs] Remove usage of mdc_adjustsFontForContentSizeCategory in favor of system API adjustsFontForContentSizeCategory.
PiperOrigin-RevId: 439622559
2022-04-05 10:55:30 -07:00
Cody Weaver
f92acd8380 [Dialogs] Remove usage of mdc_adjustsFontForContentSizeCategory in favor of system API adjustsFontForContentSizeCategory.
PiperOrigin-RevId: 438610447
2022-03-31 11:02:18 -07:00