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: 🎸 [HCPSDKFIORIUIKIT-2791]SwiftUI: floating value support #834

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

zzchao-1999
Copy link
Collaborator

Screenshot 2024-10-18 at 17 14 37

@zzchao-1999 zzchao-1999 requested a review from a team as a code owner October 24, 2024 08:01
@zzchao-1999 zzchao-1999 requested review from billzhou0223 and dyongxu and removed request for a team October 24, 2024 08:01

/// a range of values
var stepRange: ClosedRange<Int> { get }
var stepRange: ClosedRange<Double> { get }
Copy link
Contributor

Choose a reason for hiding this comment

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

How do I control the interval of the stepper?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Did you mean the increment/decrement size? If so, you can use the "step" parameter.
var step: Double { get }

Copy link
Contributor

@dyongxu dyongxu left a comment

Choose a reason for hiding this comment

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

We may need to enhance the display of number of decimals in the StepperField.
e.g. if you have a range of 0 to 1.0, and stepper value is 0.1, when you increase/decrease, you may see values as "0.6999999999999".
This is due to "Double" is used as the new data type.
One suggestion could be, we can check the stepper value. Then use the same number of decimals, to format the StepperField value

@zzchao-1999
Copy link
Collaborator Author

We may need to enhance the display of number of decimals in the StepperField. e.g. if you have a range of 0 to 1.0, and stepper value is 0.1, when you increase/decrease, you may see values as "0.6999999999999". This is due to "Double" is used as the new data type. One suggestion could be, we can check the stepper value. Then use the same number of decimals, to format the StepperField value

Added a number formatter to ensure the display of number of decimals in the stepperField.

@dyongxu
Copy link
Contributor

dyongxu commented Oct 28, 2024

@zzchao-1999 Check with the reporter if it is needed for rel-4.1

@dyongxu dyongxu merged commit 01a4af6 into SAP:main Oct 28, 2024
12 checks passed
zzchao-1999 added a commit to zzchao-1999/cloud-sdk-ios-fiori that referenced this pull request Oct 30, 2024
* feat: 🎸 [HCPSDKFIORIUIKIT-2791]SwiftUI: floating value support

* feat: 🎸 [HCPSDKFIORIUIKIT-2791]Added a number formatter
dyongxu pushed a commit that referenced this pull request Oct 30, 2024
…#849)

* feat: 🎸 [HCPSDKFIORIUIKIT-2791]SwiftUI: floating value support

* feat: 🎸 [HCPSDKFIORIUIKIT-2791]Added a number formatter
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