Giter Club home page Giter Club logo

cloud-sdk-ios-fiori's Introduction

Logo
SwiftUI implementation of the SAP Fiori for iOS Design Language


Installation   |   Examples   |   API Documentation   |   Changelog


Build and Test Status Check Maintainability Rating CII Best Practices Conventional Commits Commitizen friendly REUSE status


This project is the SwiftUI implementation of the SAP Fiori for iOS Design Language, and is meant to augment and in some cases replace the UIKit-based implementation contained in the SAPFiori framework of the SAP BTP SDK for iOS.

alt text

This project currently contains three modules: FioriThemeManager, FioriSwiftUICore, and FioriCharts.

FioriThemeManager

FioriThemeManager platform support: iOS, visionOS, watchOS

This module provides a color palette and a new font family SAP 72 that conform to Fiori Design Language. It is adopted by all the Fiori components in both this package and SAPFiori.

All Fiori Colors are dynamic colors, which means they will adjust based on iOS Appearance settings (Light/Dark). Accessing Fiori Color using Color.preferredFioriColor(forStyle:).

72 is a SAP patent typeface that delivers great reading experience to our users. You can get these fonts using Font.fiori(forTextStyle:) or Font.fioriCondensed(forTextStyle:). Note that these fonts support Dynamic Type out of the box. If you want the fonts with fixed size, use Font.fiori(fixedSize:) or Font.fioriCondensed(fixedSize:) instead.

Custom fonts need to be loaded and registered during App's runtime. Make sure you call Font.registerFioriFonts() inside application(_:didFinishLaunchingWithOptions:) of your AppDelegate.

FioriSwiftUICore

FioriSwiftUICore platform support: iOS and visionOS

This module contains SwiftUI implementation for those UIKit-based components existing in SAPFiori. It provides you with an easy way to migrate your UIKit project to SwiftUI while delivering the same experience as before.

We plan to progressively bring more Fiori UI components into this module in the future releases. Check the table below for the components that are currectly available and those in the roadmap.

Refer to this document for different ways of initializing the component.

FioriSwiftUICore
ObjectItem
ObjectHeader
KPIItem
FioriButton
ListPickerItem
DimensionSelector
SideBar
DataTable
WelcomeScreen
ActivationScreen
InfoView
User Consent Form
KPIProgressItem
EULAView
ContactItem
KPIHeader
Signature Capture
DurationPicker
StepProgressIndicator
Text Input
Validation View
Card
Toolbar
Search
Tab Bar
Navigation Bar
Stepper
Switch
Tag
Avatar
Toast Message
KeyValueItem
LinearProgressIndicator
Information View
TextFieldFormView
NoteFormView
KeyValueFormView
TitleFormView
Rating Control
RatingControlFormView
SortFilter
Menu Selection
ProfileHeader
TimelineItem
Segmented Control
TimelinePreviewItem
ChartFloorplan
CollectionItem
BarcodeScanner
PasscodeView
MultiUserPasscodeView
TouchIDErrorView
Skeleton Loading

FioriCharts

FioriCharts platform support: iOS and visionOS

The FioriCharts module replaces the RoambiChartKit charting library which was already embedded in SAPFiori. Migrating to SwiftUI gives the ability to easily add new chart components (donut, bullet, stocks, etc.) while modernizing the existing supported charts with pinch-to-zoom, pan, and new design features.

SAPFiori 4.0.x, 5.0.x FioriCharts
Area
Line
Column
Stacked Column
Bar
Stacked Bar
Bubble
Scatter
Waterfall
Combo
Donut
Bullet
Stacked Bullet 🔜
Harvey Ball
Radial
Stocks (line)

The API is designed for backwards compatibility to the existing SAPFiori charting APIs, but is optimized for SwiftUI.

API Reference

Requirements

  • iOS 15 or higher
  • Xcode 14 or higher
  • Swift Package Manager

Download and Installation

The package is intended for consumption via Swift Package Manager.

  • To add to your application target, navigate to the File > Swift Packages > Add Package Dependency... tab, then add the repository URL.
  • To add to your framework target, add the repository URL to your Package.swift manifest.

In both cases, xcodebuild tooling will manage cloning and updating the repository to your app or framework project.

Configuration

Three products are exposed by the Package.swift manifest.

FioriSwiftUI as umbrella product will contain everything the package has to offer in the future.

If you are concerned about bundle size you can use either one of the individual products, e.g. FioriCharts or FioriThemeManager

Limitations

Several functional limitations exist at present, which are planned for resolution in future releases. Please check the Issues tab for an up-to-date view of the backlog and issue status.

Key gaps which are present at time of open-source project launch:

  • FioriCharts requires design specifications to improve UI

Known Issues

See Limitations.

How to obtain support

Support for the modules is provided through this open-source repository. Please file Github Issues for any issues experienced, or questions.

When SAPFiori integrates FioriCharts productively, customers should continue to report issues through OSS for SLA tracking. However, developers may also report chart-related issues directly into the Github Issues; SAP will mirror FioriCharts-related issues reported through OSS into Github Issues.

Contributing

If you want to contribute, please check the Contribution Guidelines

To-Do (upcoming changes)

See Limitations.

Examples

Functionality can be further explored with a demo app which is already part of this package (Apps/Examples/Examples.xcodeproj).

Demo app with examples

cloud-sdk-ios-fiori's People

Contributors

alexxiong-dev avatar allencao001 avatar angiexyang avatar billzhou0223 avatar charlesxu0488 avatar davxu avatar dyongxu avatar fredsap avatar github-actions[bot] avatar hengyi-zhang avatar janhuachu avatar jningsap avatar juliaschnsap avatar junsong-sh avatar justinguo avatar kevinriedelsheimer avatar kevinzk avatar marcoeidinger avatar pgobriensap avatar restaurantt avatar service-tip-git avatar shawnma16 avatar shengxu7 avatar xiaoqinggrace avatar xiaoyu0722 avatar zuopengchi avatar zzchao-1999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloud-sdk-ios-fiori's Issues

SAPFiori.FUIButton dark mode glitch when wrapped in UIViewRepresentable, SDK version 8.0.2


import SwiftUI
import SAPFiori
// https://github.com/SAP/cloud-sdk-ios.git
// exact 8.0.2

struct FUIButtonWrapper: UIViewRepresentable {
    let title: String
    let foregroundColor: Color
    let action: () -> Void

    func makeCoordinator() -> Coordinator { Coordinator(self) }

    class Coordinator: NSObject {
        var parent: FUIButtonWrapper

        init(_ actionButton: FUIButtonWrapper) {
            self.parent = actionButton
            super.init()
        }

        @objc
        func action(_ sender: Any) {
            self.parent.action()
        }
    }

    func makeUIView(context: Context) -> UIButton {
        let button = SAPFiori.FUIButton(style: .secondary)

        button.setTitle(self.title, for: .normal)
        button.setBackgroundColor(UIColor.preferredFioriColor(forStyle: .primaryFill), for: .normal)
        button.setBackgroundColor(UIColor.preferredFioriColor(forStyle: .primaryFill).withAlphaComponent(0.4), for: .highlighted)
        button.setTitleColor(UIColor(foregroundColor), for: .normal)
        button.setTitleColor(UIColor(foregroundColor).withAlphaComponent(0.4), for: .highlighted)
        button.isPersistentSelection = false
        button.isAccessibilityElement = true
        button.addTarget(context.coordinator, action: #selector(Coordinator.action(_ :)), for: .touchUpInside)
        return button
    }

    func updateUIView(_ uiView: UIButton, context: Context) {}
}

struct ContentView: View {
    var body: some View {
        VStack {
            FUIButtonWrapper(title: "title 1", foregroundColor: .red, action: {})
            FUIButtonWrapper(title: "title 2", foregroundColor: .blue, action: {})
        }
            .padding()
    }
}

Observed: glitch with shifted highlighted area in top left for dark mode:
Simulator Screen Shot - iPhone 13 Pro - 2022-09-09 at 09 21 00
Simulator Screen Shot - iPhone 13 Pro - 2022-09-09 at 09 21 06

Expected: no glitch with shifted highlighted area in top left for dark mode

Support fetching data with Request object

DataFetcher and BaseBaseCard should be configured to execute an asynchronous Request, which may load data from a local or remote resource. When JSON data is fetched, it should be sent to the Request publisher.

The URL of the Request may be parameterized, using the configuration.destinations object of the card. See spec.

The URL of the Request may also be parameterized using the app.dataSources object. See spec.

The URL of the request itself may be fully-qualified or relative. According to the spec:

If the URL is relative, it is going to be resolved based on the page instead of the manifest base path.

However, since in this case there is no page, we need to evaluate the long-term behavior. In the meantime, we should resolve either to the location of manifest.json on the remote host, or, for local bundles, relative to the manifest.json data.

ObjectHeader doesn't support `.accessibilityElement(children: .combine)` modifier

Describe the bug
When add .accessibilityElement(children: .combine) modifier VoiceOver doesn't pronounce grouped children elements, only visually selects them.

To Reproduce
For Examples.xcodeproj replace content of the ContentView.swift with following code:
`
import FioriCharts
import SwiftUI
import FioriCharts
import FioriSwiftUICore
import FioriCharts
import FioriSwiftUICore
import SwiftUI

struct ContentView: View {
var body: some View {
ObjectHeader {
Text("Some title text explaining something")
.font(.fiori(forTextStyle: .title3))
.foregroundColor(.preferredColor(.primaryLabel))
.fontWeight(.black)
} subtitle: {
Text("Some author name")
.font(.fiori(forTextStyle: .body))
.foregroundColor(.preferredColor(.secondaryLabel))
.fontWeight(.regular)
} footnote: {
Text("2 days ago")
.font(.fiori(forTextStyle: .subheadline))
.foregroundColor(.preferredColor(.tertiaryLabel))
.fontWeight(.regular)
}
.padding()
.accessibilityElement(children: .combine)
}
}
`

  1. Enable Accessibility -> Voice Over
  2. Launch the app
  3. Observe that header children text is not pronounced when .accessibilityElement(children: .combine) added, only visual grouping is visible.
    Note: when no .accessibilityElement(children: .combine) added elements pronounced separately, but I need .accessibilityElement(children: .combine) so they are grouped.

Expected behavior
Expected all grouped elements are pronounced by VoiceOver with this modifier.

Screenshots
IMG_9A1916D3DE39-1

Mobile (please complete the following information):

Device: iPhone 8
OS: iOS 15.5
Swift Package Product: FioriSwiftUICore
Swift Package Version: 2.1.0, main branch, commit a82de93
Xcode Version: Version 13.4 (13F17a), toolchain Xcode Version 13.4 (13F17a)
FioriSwiftUI / cloud-sdk-ios-fiori 2.1.0

Additional context
Add any other context about the problem here.

Button stay pressed if slightly pressed while scrolled on iPad

Describe the bug
Button stay pressed if slightly pressed while scrolled on iPad
https://github.com/dianadanylova/ButtonBug

To Reproduce
Steps to reproduce the behavior:

  1. Launch the app
  2. Scroll down
  3. While button is still moving back scroll again by slightly touching the button (but only when button is still moving)
  4. See that button stay visually in pressed state

Expected behavior
Button go back to "not pressed" state

Screenshots
simulator_screenshot_1F7C1460-CF24-4D03-9904-377103E44FED

Mobile (please complete the following information):

  • Device: iPad pro 11" 3rd gen
  • OS: iOS 15.3.1
  • Swift Package Product: FioriSwiftUICore
  • Swift Package Version: 2.1.0 main branch
  • Xcode Version: Xcode 13.3
  • FioriSwiftUI / cloud-sdk-ios-fiori 2.1.0

[Styling] override color definitions

It is impossible to override the color definitions of an existing color palette. SAP BTP SDK for iOS customers are used to override individual color definitions, e.g tintColor , either programmatically or through a style sheet.

This will become problematic for customers who built an app with SAP Fiori UIKit and SwiftUI components, download theme information from SAP Mobile Services and those downloaded color information can only be applied to the UIKit-based components provided by the SAPFiori.xcframework.

Out-of-scope for this feature request is to introduce style classes

KPIItemView Layout

maxWidth in SwiftUI frame setting is not working as expected. Should calculate based on inner text width.

subTitle should be optional.

KPIItem for VoiceOver accessibility always pronounced as button, `.accessibilityRemoveTraits([.isButton])` has no effect

Describe the bug
KPIItem for VoiceOver accessibility always pronounced as button, .accessibilityRemoveTraits([.isButton]) has no effect

To Reproduce

  1. Enable Accessibility -> Voice Over
  2. Run Examples.xcodeproj app and navigate to Core Elements -> KPI
  3. Observe that KPI pronounced as button, even no action is available, .accessibilityRemoveTraits([.isButton]) doesn't help

Expected behavior
I expect API to provide accessibility traits to work (e.g. .accessibilityRemoveTraits([.isButton])), or option to control via initializer (e.g. nil action handle means no button trait)

Mobile (please complete the following information):

Device: iPhone 8
OS: iOS 15.5
Swift Package Product: FioriSwiftUICore
Swift Package Version: 2.1.0, main branch, commit a82de93
Xcode Version: Version 13.4 (13F17a), toolchain Xcode Version 13.4 (13F17a)
FioriSwiftUI / cloud-sdk-ios-fiori 2.1.0

Additional context
Add any other context about the problem here.

Difference in translations

Describe the bug

I took a look at the translations and noticed some differences:

In German translations the infinitive is used exclusively:
e.g. "Tap to Sign" = "Zum Signieren tippen";
But in Serbian and Croatian translations is used imperative instead of infinitive and even worse there is a mix in way of addressing someone.
e.g. "Tap to Sign" = "Dodirnite da biste potpisali"; and "Tap to Sign" = "Dodirni za potpis";

I will compare it to the German so it is easier to unterstand. There is no big difference in addressing an older person and a friend in English:
e.g.
to friend: "How are you?"
to older person: "How are You?"

but in German there is a difference:
to friend: "Wie geht es dir?"
to older person: "Wie geht es Ihnen?"

The same case is in Serbian and Croatian
to friend: "Kako si?"
to older person: "Kako ste?"

The first issue is not using of infinitive:
"Dodirni za potpis" would be in German "Tipp zum Signieren"
And the second issue is mixing of way of addressing someone (Croatian and Serbian are almost identical):
"Dodirnite da biste potpisali" would be in German "Tippen Sie zum Signieren"

I could create a Pull Request, but I need to know what convention do you use?
Most likely there is the same issue with other languages, but I noticed this in Serbian and Croatian.

ObjectItem doesn't support accessibility for `detailImage` Image values

Describe the bug
ObjectItem detailImage view VoiceOver accessibility is broken. For Image(systemName: "headphones") system image not announced, For Image("pdfIcon", label: Text("Some text")) label not announced, detailImageModifier doesn't solve issue with modifiers.accessibilityLabel() or .accessibilityValue()

To Reproduce
For Examples.xcodeproj replace content of the ContentView.swift with following code:
`
import FioriCharts
import SwiftUI
import FioriCharts
import FioriSwiftUICore
import FioriCharts
import FioriSwiftUICore
import SwiftUI

/*
Image(systemName: "headphones") // system image label not announced
Image("pdfIcon", label: Text("Some text")) // some text not accounced
*/

struct ContentView: View {
var body: some View {
ObjectItem(title: "Some title 1", subtitle: "Some subtitle 2", footnote: "Some footnote", status: .text("Some status"), detailImage: Image(systemName: "headphones"))
.padding([.leading, .trailing], 16)
.accessibilityElement(children: .combine)
.environment(.horizontalSizeClass, .compact)
}
}
`

  1. Enable Accessibility -> Voice Over
  2. Launch the app
  3. Observe that image label is not pronounced, both options below handled by system correctly when used alone, but not when inside ObjectItem.
  • Image(systemName: "headphones") // system image label not announced
  • Image("pdfIcon", label: Text("Some text")) // some text not accounced

Expected behavior
Image element labels are pronounced correctly by VoiceOver as Image element used alone.

Screenshots
IMG_5E9A1EDE648D-1

Mobile (please complete the following information):

Device: iPhone 8
OS: iOS 15.5
Swift Package Product: FioriSwiftUICore
Swift Package Version: 2.1.0, main branch, commit a82de93
Xcode Version: Version 13.4 (13F17a), toolchain Xcode Version 13.4 (13F17a)
FioriSwiftUI / cloud-sdk-ios-fiori 2.1.0

Additional context
Add any other context about the problem here.

Earn "passing" CII Best Practices Badge

To show proof of high quality in our OS project we shall participate in the Linux Foundation (LF) Core Infrastructure Initiative (CII) Best Practices badge program

Target

  • Request and earn "passing" CII Best Practices Badge
  • add to README after badge was earned
  • Prepare roadmap to earn higher levels, see criteria

ObjectHeader footnote text is cut when user changes dynamic text size

Describe the bug
ObjectHeader footnote text is cut when user changes dynamic text size

To Reproduce

  1. For Examples.xcodeproj replace content of the ContentView.swift with following code:
    `
    import FioriCharts
    import SwiftUI
    import FioriCharts
    import FioriSwiftUICore
    import FioriCharts
    import FioriSwiftUICore
    import SwiftUI
    struct ContentView: View {
    var body: some View {
    BrokenObjectHeader()
    }
    }

struct BrokenObjectHeader: View {
var body: some View {
NavigationView {
NavigationLink("Open details") {
ScrollView {
VStack(spacing: 30) {
ObjectHeader {
Text("Some title text explaining something")
.font(.fiori(forTextStyle: .title3))
.foregroundColor(.preferredColor(.primaryLabel))
.fontWeight(.black)
} subtitle: {
Text("Some author name")
.font(.fiori(forTextStyle: .body))
.foregroundColor(.preferredColor(.secondaryLabel))
.fontWeight(.regular)
} footnote: {
Text("2 days ago")
.font(.fiori(forTextStyle: .subheadline))
.foregroundColor(.preferredColor(.tertiaryLabel))
.fontWeight(.regular)
}
}
}
}
}
}
}
`

  1. Launch the app
  2. Press "Open details" button and increase dynamic text size to extra extra large size using environment overrides
  3. Press "Back"
  4. Press "Open details" and decrease dynamic text size to extra extra small size using environment overrides
  5. Observe footnote clipped
clipped-text-issue.mov

Expected behavior
The text should be fully rendered with matching dynamic size

Screenshots
Simulator Screen Shot - iPhone SE (2nd generation) - 2022-04-20 at 19 38 06

Mobile (please complete the following information):

  • Device: iPhone SE - 2nd generation (Simulator)
  • OS: iOS 15.4
  • Swift Package Product: FioriSwiftUICore
  • Swift Package Version: 2.1.0, main branch, commit 0786a13
  • Xcode Version: Version 13.3 (13E113), toolchain Xcode 13.3
  • FioriSwiftUI / cloud-sdk-ios-fiori 2.1.0

Add FioriCharts Views to Xcode Library

In Xcode 12 it's possible to add custom views and modifiers to Xcode Library (https://developer.apple.com/videos/play/wwdc2020/10649) which improves API discoverability.

Currently, there is only one generic ChartView with a generic ChartModel to handle all kinds of chart types. Nevertheless, it is possible to define different entries for Xcode Libraries to serve code snippets for chart-specific ChartView+ChartModel implementations

Example

#if swift(>=5.3)
@available(iOS 14.0, *)
struct LibraryContent : LibraryContentProvider {
    @LibraryContentBuilder
    var views: [LibraryItem] {
        LibraryItem(
            ChartView(ChartModel(chartType: .stock, data: [[16.52, 15.50, 18.67, 16.70, 16.90]], titlesForCategory: [["2020-01-06 10:00:00", "2020-01-06 10:30:00", "2020-01-06 11:00:00", "2020-01-06 11:30:00", "2020-01-06 12:00:00"]])),
            title: "Stock Chart"
        )
    }
}
#endif

From an API consumer perspective, we probably want to offer chart-type specific convenience Chart Views in the future. This is not the scope of this feature request. If so then the custom views added to Xcode Library can easily be updated.

Setup infrastructure to develop and use snapshot testing

Motivation

As most of the current code (Charts, IntegrationCards) are UI components it shall be possible to write tests which verify the correctness of the UI

Concept

Record reference images of UI artifacts and then compared those against current UI artifacts

Pro:

  • Reference image changes provide an opportunity for designers to give feedback on pull requests
  • Snapshot tests are a very broad-strokes confirmation that your UI is “correct.”
  • Testing across devices, iOS versions, and size classes becomes trivial

Cons

  • iOS versions often include changes to text antialiasing, so your tests need to be tied to specific iOS versions. Updating reference images when you update your iOS versions introduces a lot of churn in reference image files

How-to

  • Use swift-snapshot-testing swift package as technical foundation
  • Reference images shall be stored in a submodule to mitigate repo bloat
  • Tests shall be written in the repo
    • not as part of the repo's swift module due to the use of submodule
  • Tests shall be executed in a test app (./Apps)
  • Tests shall be executed in CI landscape
    • not necessarily on PR but as part of a scheduled job

Donut chart type is not centred in Cell when using FUIChartPlotTableViewCell

Describe the bug
When using the Donut type chart in a Table View, the chart appears left aligned rather than centred. All other charts seem to with fill the cell width so appear to be centred.

To Reproduce
You can just use the sample code from the Chart Plot example in the Fiori Mentor and set the chart type to .donut

I have used both 5.1.x and 6.0.x versions of the SDK for this with the same result.

Expected behaviour
Chart is centre aligned - so the behaviour is the same as when using the Chart Floorplan

Screenshots
Testing using the cloud-sdk-ios-fiori examples shows the same behaviour. That said, if you up the length ratio with the slider in the example app it does finally align once the Diameter == cell width.

Example from Floorplan

image

Example from Table Cell

image

Additional context
I did see that the charts in both the latest 5 and 6 releases were SwiftUI based - is the codeline the same as in the github repo? Very cool stuff!

Please let me know if you need any more info - I have a sample project if that would help?

Al Templeton

Support in-line data in manifest.json

DataFetcher and BaseBaseCard should be configured to load json: Data and optional path: String, in-line from manifest.json.

The implementation should support the 3 locations of data object:

  1. card
  2. header
  3. content

According to the spec, if data is located in the header or content region, this should be prioritized. It also appears from the samples, that it should be support that the data is at the card level, and the path property at the header or content level should mask the card data.

Can't use UIViewRepresentable with widgets in iOS 14

Hi All

Great library - really having fun with this!

Was trying some of the Charts in various size widgets. Found that the micro charts worked well but the more complex Charts wouldn't render - see screen grab - .line, .column etc.

Found that in the GridLinesAndChartView.swift file there is a view called Background that is using UIViewRepresentable - this won't render as a widget - I have tested this by removing the Background view from the ZStack created in createBody.

Not sure how easy this will be to fix as there are a bunch of gestures attached to Background - but prob don't need these for a widget version?

Let me know if you need any more information

Al T.

image

macOS support

Prerequisites:

  • Swift package dependencies have to support macOS
    • adopt recent 1.2.0 release of github.com/sstadelman/observable-array
  • declare support for macOS in Package.swift
  • fix build issues for macOS (due to usage of UIKit)

Example of conditional handling of color

#if os(iOS) || os(tvOS) || os(watchOS)
    import UIKit
    public typealias Color = UIColor
#elseif os(OSX)
    import Cocoa
    public typealias Color = NSColor
#endif

Another area of work is the use of UIViewRepresentable vs. NSViewRepresentable, see here for details

Use `main` as primary branch instead of `master`

As you may or may not be aware, the United States is undergoing a period of acute focus on racial and ethnic relationships in society. This is certainly not the first of such times in our country which has a history of African slavery and modern segregation, and, sadly, will likely not be the last. While the issues being fought are worlds more significant than the details of our development operations, one small idea introduced and put into practice by the latest release of Xcode 12 is to default the name of the primary branch of git repositories to ‘main’, rather than ‘master’.

This resonates with us. There is a good blog here: https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBranchFromMasterToMain.aspx which outlines how to make the change and handle some of the side effects for remote developers.

Improving compile time

Our project has some issue with compile time, it takes around 12-13 sec for compilation (clean and build) and the project doesn't have big code base.

I found some problem parts in your sdk. For example func columnsView(in: ) -> some View in ColumnMicroChart.swift, this method needs ~7 sec for compilation, I guess, it's hard for compiler to calculate a final type of the expression.

What do you think about it? Could you do some refactoring these methods/expressions?

  1. and 2) points from this article could be helpful.

ChartDetailView error when running in iOS 14

Hi All

Found some odd behaviour when running the Examples app under iOS 14 beta. There must be something different happening in Swift when it handles the onTapGesture closure - meaning that the currentModel is not being set (or not in the correct self?) when the ChartDetailView is called. I tried using [self] in for the closure but made no difference. Fixed it briefly using a global but this is just a dodgy work around :)

Works perfectly under iOS 13 - so bit of an odd one.

iOS 14 error attached below

Thx!

Screen Shot 2020-08-05 at 8 08 45 am

Being able to run Examples app without manual prerequisite steps

Running examples requires the manual prerequisite step of creating an Xcode project for a workspace. This is inconvenient for non-collaborators and hinders exploration.

The goal is to add the package as a local dependency to Xcode project which still allows contributors to easily test local changes

Pending Tasks For Side Bar

As discussed with @billzhou0223, based on current MVP version, I will complete the following tasks going forward:

  • Add custom styling protocol (similar to Button) to handle background style based on tap state.
  • Add similar styling protocol to allow developer customize the style change for chevron in section header.
  • Research the way of supporting navigation view customization.

Timeline Card flickers in iOS 14 (Xcode 12)

Describe the bug
Infinite flickering of timeline card when running with Xcode 12 / iOS 14.

Works fine with Xcode 11 and iOS 13

Screenshots
flicker

Mobile:

  • Device: iPhone 8
  • OS: iOS 14
  • Xcode: 12
  • Swift Package: FioriIntegrationCards
  • Version: 0.5.5 (current main)

Additional Information
Caused by TimelinItemView.swift as alignmentGuide modifier is called endlessly. One solution (might impact design) is to remove line 32 which adds -30 bottom padding to icon

 var body: some View {
        HStack(alignment: .top) {
            VStack {
                SafeView(self.model.icon)
                    .frame(width: iconWidth, height: iconWidth, alignment: .top)
                    //.padding(.bottom, -30)

Result:
Screen Shot 2020-08-10 at 4 21 21 PM

CollectionView in the Integration Cards was created multiple times.

Describe the bug
CollectionView in the Integration Cards was created multiple times.

To Reproduce
Steps to reproduce the behavior:
Please build and run the example app with iPhone.

  1. Go to ‘Integrations Cards’
  2. Click on ‘list_dataInCardLevel’

Expected behavior
On iPad, you will see an endless print statements in the console.

Screenshots
If applicable, add screenshots to help explain your problem.

Mobile (please complete the following information):

  • Device: iPad Pro 11
  • OS: iOS 14
  • Swift Package: Integration Cards
  • Version master branch

CollectionView in the Integration Cards is flashing

Describe the bug
CollectionView in the Integration Cards is flashing.

To Reproduce
Steps to reproduce the behavior:
Please build and run the example app with iPhone.

  1. Go to 'Integrations Cards'
  2. Click on 'Collection View' tab

Expected behavior
You will see the collection view screen is flashing.

Screenshots
If applicable, add screenshots to help explain your problem.

Mobile (please complete the following information):

  • Device: Phone 11
  • OS: iOS 14

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.