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-2222] Duration Picker Support #484

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

xiaoyu0722
Copy link
Contributor

@xiaoyu0722 xiaoyu0722 commented Nov 14, 2022

FUIDurationPickerFormCell SwiftUI migration
Public API

public init(selection: Binding<Int>, maximumMinutes: Int = 1439, minimumMinutes: Int = 0, minuteInterval: Int = 1, measurementFormatter: MeasurementFormatter = MeasurementFormatter())
  • selection: Binding
    A minutes binding for picker selection.
  • maximumMinutes: Int
    Maximum minutes picker allowed, maximum is 1439.
  • minimumMinutes: Int
    Minimum minutes picker allowed, minimum is 0.
  • minuteInterval: Int
    Interval for minutes.
  • measurementFormatter: MeasurementFormatter
    Formatter for picker titles.
/// Measurement formatter for duration picker.
/// - Parameter measurementFormatter: measurement formatter you wanted for picker titles.
/// - Returns: return a new duration picker with the measurement formatter.
public func measurementFormatter(_ measurementFormatter: MeasurementFormatter) -> Self

@xiaoyu0722 xiaoyu0722 requested a review from a team as a code owner November 14, 2022 08:36
@xiaoyu0722 xiaoyu0722 requested review from billzhou0223 and removed request for a team November 14, 2022 08:36
@xiaoyu0722 xiaoyu0722 force-pushed the feat-duration-picker branch 3 times, most recently from 91e13e0 to 2b83f2c Compare November 14, 2022 09:15
@billzhou0223 billzhou0223 added the Do not merge yet Do not merge yet label Nov 17, 2022
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.

Please resolve the conflicts.

@@ -0,0 +1,250 @@
import SwiftUI

struct DurationPickerViewWrapper: UIViewRepresentable {
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember we discussed last time to avoid using UIKit controls if possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried, SwiftUI Picker can't support the spec style.

FUIDurationPickerFormCell SwiftUI migration
@billzhou0223 billzhou0223 merged commit 654a1b9 into SAP:main Dec 1, 2022
@xiaoyu0722 xiaoyu0722 deleted the feat-duration-picker branch December 13, 2022 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do not merge yet Do not merge yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants