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

feat: 🎸 [JIRA:HCPSDKFIORIUIKIT-2686] Button update #753

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

hengyi-zhang
Copy link
Contributor

No description provided.

@hengyi-zhang hengyi-zhang requested a review from a team as a code owner July 30, 2024 02:36
@hengyi-zhang hengyi-zhang requested review from billzhou0223 and removed request for a team July 30, 2024 02:36
/// - loadingState: A state to show activity indicator or success icon, default is .unspecified.
/// - imagePosition: Place the image along the top, leading, bottom, or trailing edge of the button.
/// - imageTitleSpacing: spacing between image and title.
init(isSelectionPersistent: Bool = false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's extend existing init to support image display.

public init(isSelectionPersistent: Bool = false,
                action: ((UIControl.State) -> Void)? = nil,
                @ViewBuilder label: @escaping (UIControl.State) -> any View,
                @ViewBuilder image: @escaping (UIControl.State) -> any View = { _ in },
                imagePosition: Position = .left,
                spacing: CGFloat = 8)

You need to update other init accordingly as well. FioriButtonStyleConfiguration needs to be updated as well.

We need to provide default UI based on loading state. We can add a new style to achieve that.

FioriButton()
    .fioriButtonStyle(FioriLoadingButtonStyle(state: .inProgress // or .success))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

@hengyi-zhang hengyi-zhang force-pushed the feature/button-update branch from 060978a to 6870097 Compare August 9, 2024 08:46
Copy link
Contributor

@billzhou0223 billzhou0223 left a comment

Choose a reason for hiding this comment

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

LGTM!

@dyongxu dyongxu merged commit dda6540 into SAP:main Aug 13, 2024
12 checks passed
dyongxu added a commit that referenced this pull request Aug 16, 2024
… other fixes (#776)

* chore(release): 4.1.2

* fix: 🐛 [IOSSDKBUG-291] set line limit for MenuSelectionItem (#769)

* fix: 🐛 [JIRA: IOSSDKBUG-306] toolbar layout issue (#771)

* feat: 🎸 [JIRA:HCPSDKFIORIUIKIT-2686] Button update (#753)

Co-authored-by: Bill Zhou <bill.zhou01@sap.com>

* fix: 🐛 step progress indicator styles (#775)

* Translation Delivery (#774)

* [INTERNAL] Translation delivery: commit by LX Lab

Change-Id: I111a249ae01afea6ba8029630027e1807e471499

* [INTERNAL] Translation delivery: commit by LX Lab

Change-Id: I00c59b0e7a3bcd6346b6fddb8a51787bc132ace4

---------

Co-authored-by: dyongxu <61523257+dyongxu@users.noreply.github.com>

---------

Co-authored-by: Marco Eidinger <marco.eidinger@sap.com>
Co-authored-by: Bill Zhou <bill.zhou01@sap.com>
Co-authored-by: Xiaoyu Liu <xiaoyuliu0722@gmail.com>
Co-authored-by: hengyi-zhang <hengyizhangcn@gmail.com>
Co-authored-by: SAP LX Lab Service Account <tmsatsls+github.com_service-tip-git@sap.com>
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.

3 participants