-
Notifications
You must be signed in to change notification settings - Fork 5
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
IOS-9146: BottomSheet actions #299
Conversation
73eb260
to
847decc
Compare
ActionItem( | ||
id: UUID().uuidString, | ||
style: .primary, | ||
title: "Primary Button" | ||
) |
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 would add a secondary and a link actions to have a complete example. WDYT?
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.
Ok. I'll add it for a better testing
case .singleSelection: | ||
return false | ||
case .actionList: | ||
return false | ||
case .actions: | ||
return false |
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.
maybe we can merge those cases which return false like:
case .a, .b, ...:
return false
|
||
// MARK: Actions | ||
|
||
func testAction() { |
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 would replace this test with:
- Test with all actions (primary, secondary and link [no matter if it has or not chevron since it belongs to the link component])
- Test with min actions (primary)
more realistic, wdyt?
// MARK: Actions | ||
|
||
func testAction() { | ||
assertSnapshotForAllBrandsAndStyles( |
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.
do we need to test it in all of our brands? I would avoid it since it generates a lot of snapshots and only the palette changes :/ (which is not a good place to test it IMO)
@@ -189,26 +189,40 @@ final class SheetTests: XCTestCase { | |||
|
|||
// MARK: Action list type | |||
|
|||
func testActionWithoutUrls() { | |||
func testActionListWithoutUrls() { | |||
assertSnapshotForAllBrandsAndStyles( |
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.
as I commented below, I think we don't need to test it in every brand. We can save a lot of snapshots which tests other system (color palettes). WDYT?
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.
This is just a rename of an old test to match with the correct naming
Screenshot tests report βοΈ All passing |
dacf632
to
515c972
Compare
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.
there are two weird vertical lines around the button. Is it expected?
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.
Yes as it comes from the Button component that shows like that. Maybe is something only happens on screenshots
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.
yes, it's something weird that @idenjoe already faced π€
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 have created a new JIRA task for this.
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.
these files also have a vertical line around the buttons
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.
check why there are some vertical lines that appear in some screenshots:
Missing designers in this PR! And please, generate a new version for MΓstica Catalog for test the new component |
id: UUID().uuidString, | ||
style: .link, | ||
title: "Link action", | ||
rightImage: .chevron |
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.
By default, the chevron wouldn't be displayed on the sheet link, as the sheet typically performs actions. Following the guideline of "if it's an action, it doesn't have a chevron; if it's navigation, it has a chevron," the chevron on the sheet will be used only on rare occasions.
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.
This file only for test purpose. Link button can be configured with or without chevron. By default Link style on buttons don't show any chevron. Check those links: Default right image, Default link style and Default link inverse style
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.
Nice job!
Already handled in an other task
# [26.0.0](v25.4.0...v26.0.0) (2023-08-31) ### Bug Fixes * **BottomSheet:** Changed SVG coder ([#296](#296)) ([4480d47](4480d47)) * **Checkbox:** set color for filling and rounded border ([#297](#297)) ([076343d](076343d)) * IOS-9146: BottomSheet actions (#299) ([e380ecc](e380ecc)), closes [#299](#299) ### Features * **BottomSheet:** Added SVG image format support. ([#293](#293)) ([fe71624](fe71624)) * **Button:** iOS-9080 button chevron ([977b1d9](977b1d9)) ### BREAKING CHANGES * Action type has been renamed as ActionList. To use the previous actions(items: [ActionItem]) rename the case in your project as actionList(items: [ActionListItem]). Also ActionItem has been renamed as ActionListItem.
π This PR is included in version 26.0.0 π The release is available on GitHub release Your semantic-release bot π¦π |
ποΈ Jira ticket
IOS-9146
π₯ What's the goal?
π§ How do we do it?
π§ͺ How can I verify this?
π AppCenter build
https://install.appcenter.ms/orgs/tuenti-organization/apps/mistica-swiftui-ios/distribution_groups/public/releases/26