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

Implement FlareUI #28

Merged
merged 73 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
5872e62
Create `FlareUI` library
nik3212 Feb 19, 2024
8f725e5
Implement both `SubscriptionsView` & `ProductsView`
nik3212 Feb 19, 2024
2392948
Implement a user interface for products
nik3212 Feb 20, 2024
6851c13
Implement fetching & purchasing storekit product via `ProductView`
nik3212 Feb 23, 2024
0d1123f
Implement an appearing & disappearing animation
nik3212 Feb 25, 2024
837eb24
Fix UI elements
nik3212 Feb 25, 2024
3666116
Implement displaying product's icon
nik3212 Feb 25, 2024
d86db08
Implement updaing view with animation
nik3212 Feb 27, 2024
08e4611
Remove the example app
nik3212 Feb 27, 2024
aba0de1
Add code comments
nik3212 Feb 27, 2024
24739dc
Create a test target for `FlareUI` library
nik3212 Feb 28, 2024
e82cd64
Update `SwiftLint` action
nik3212 Feb 28, 2024
60349bd
Implement `upload_test_coverage_report.yml`
nik3212 Feb 28, 2024
bf670ae
Update `workflows`
nik3212 Feb 28, 2024
0a84939
Implement `build_and_test` action
nik3212 Feb 29, 2024
30e2243
Implement test cases for `ProductView`
nik3212 Mar 2, 2024
c7884d2
Implement test cases for `ProductsView`
nik3212 Mar 2, 2024
f95ab47
Implement store buttons
nik3212 Mar 8, 2024
6102bd3
Implement various product styles
nik3212 Mar 8, 2024
bbf56ae
Update the logic for generating `swiftgen` files
nik3212 Mar 8, 2024
625fe58
Displaying an error alert when restoring purchases
nik3212 Mar 8, 2024
db9e377
Displaying a subscription duration next to the price
nik3212 Mar 8, 2024
46defad
Implement the display of a placeholder icon
nik3212 Mar 8, 2024
6030a8e
Implement tests
nik3212 Mar 8, 2024
4b4d141
Update tests
nik3212 Mar 8, 2024
d38ffbf
Implement passing parameters to a view
nik3212 Mar 8, 2024
83cc8d2
Update the `FlareUITests` target's configuration
nik3212 Mar 9, 2024
158a076
Update `CHANGELOG.md`
nik3212 Mar 9, 2024
5faa49f
Create a test plan for snapshot testing
nik3212 Mar 9, 2024
faf880c
Update the snapshot tests
nik3212 Mar 9, 2024
c013f6f
Implement the snapshot tests target
nik3212 Mar 9, 2024
419dff0
Refactor the finish transaction logic
nik3212 Mar 9, 2024
a4be364
Implement `compact` & `large` product style for iOS
nik3212 Mar 11, 2024
689219e
Make the `large` and `compact` product styles public
nik3212 Mar 12, 2024
9be5de1
Remove unnecessary test cases for specific platforms
nik3212 Mar 12, 2024
fc69c8f
Implement passing assemblies using `environment`
nik3212 Mar 12, 2024
afb9227
Fix displaying price for compact product style
nik3212 Mar 12, 2024
4dd388f
Make `ProductView` & `ProductsView` public
nik3212 Mar 13, 2024
275bcbc
Implement wrappers in `UIKit` for `ProductView` & `ProductsView`
nik3212 Mar 13, 2024
193907f
Implement UIKit wrappers for `tvOS` and `macOS`
nik3212 Mar 13, 2024
9148593
Add Russian localization
nik3212 Mar 13, 2024
c6f822a
Implement the passing of view styles to UIKit wrappers
nik3212 Mar 13, 2024
372513f
Implement scrolling for products
nik3212 Mar 13, 2024
50c1da5
Implement sorting for fetched products
nik3212 Mar 13, 2024
d93ed83
Implement the `loading` & `error` state for `SubscriptionsView`
nik3212 Mar 14, 2024
aad7911
Implement customization of subscription item styles
nik3212 Mar 15, 2024
1d10402
Update the footer view
nik3212 Mar 15, 2024
ac97bb4
Implement passing tint colors
nik3212 Mar 15, 2024
ce40e65
Implement the creation of marketing content for the subscription view
nik3212 Mar 15, 2024
416920a
Implement settings background for subscription view
nik3212 Mar 15, 2024
4dcb1c8
Implement constast text
nik3212 Mar 15, 2024
d3b8a06
Implement the formatting of a subscription price
nik3212 Mar 15, 2024
b7bbe3f
Implement bold button style
nik3212 Mar 15, 2024
4fee826
Implement `Privacy Policy` & `Terms of Service` buttons
nik3212 Mar 15, 2024
9c282ec
Fix tests
nik3212 Mar 15, 2024
2d3000b
Temp commit
nik3212 Mar 20, 2024
604d1a0
Refactor `SubscriptionsWrapperView`
nik3212 Mar 21, 2024
10ad3d8
Update `CardButtonSubscriptionStoreControlStyle`
nik3212 Apr 11, 2024
6f10d3f
Implement `PoliciesButtonStyle`
nik3212 Apr 11, 2024
604a93a
Update the `CardButtonSubscriptionStoreControlView` style
nik3212 Apr 11, 2024
6f3af02
Add `MARK`
nik3212 Apr 11, 2024
1775a32
Implement auto-detection of active subscriptions
nik3212 Apr 20, 2024
79141e7
Implement `SubscriptionStatusVerifierProvider`
nik3212 Apr 21, 2024
ed2ce46
Fix building `Flare` for macOS
nik3212 Apr 21, 2024
a7a2454
Implement displaying a header for tvOS
nik3212 Apr 29, 2024
3578788
Implement the `SubscriptionsViewController` wrapper
nik3212 Apr 29, 2024
d139a33
Implement `SubscriptionsPresenterTests`
nik3212 Apr 29, 2024
0dd82df
Fix typos
nik3212 Apr 29, 2024
cc6aa5c
Fixing the project build for Xcode 14
nik3212 Apr 29, 2024
b23735f
Disable support for `watchOS`
nik3212 Apr 29, 2024
f04843c
Implement snapshot tests
nik3212 Apr 29, 2024
8c41b36
Fix project building
nik3212 Apr 29, 2024
402726f
Fix tests
nik3212 Apr 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions .github/actions/build_and_test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and Test Action

inputs:
scheme:
required: true
type: string
destination:
required: true
type: string
name:
required: true
type: string
test_plan:
required: false
type: string
generate_project:
required: false
type: boolean
default: true

runs:
using: "composite"

steps:
- name: Install Dependencies & Generate project
shell: bash
run: |
if [ "${{ inputs.generate_project }}" = "true" ]; then
make setup_build_tools
make generate
fi
- name: ${{ inputs.name }}
shell: bash
run: |
if [ -n "${{ inputs.test_plan }}" ]; then
xcodebuild clean test \
-scheme ${{ inputs.scheme }} \
-destination "${{ inputs.destination }}" \
-testPlan ${{ inputs.test_plan }} \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ inputs.name }}.xcresult" || exit 1
else
xcodebuild clean test \
-scheme ${{ inputs.scheme }} \
-destination "${{ inputs.destination }}" \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ inputs.name }}.xcresult" || exit 1
fi
34 changes: 34 additions & 0 deletions .github/actions/upload_test_coverage_report/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Upload a Test Coverage Report

inputs:
filename:
required: true
type: string
scheme_name:
required: true
type: string
token:
description: 'A CodeCov Token'
required: true

runs:
using: "composite"

steps:
- name: Dir
shell: bash
run: pwd && ls -al
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ inputs.token }}
xcode: true
flags: ${{ inputs.scheme_name }}
xcode_archive_path: test_output/${{ inputs.filename }}.xcresult
- name: Dir
shell: bash
run: pwd && ls -al
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.filename }}
path: test_output
96 changes: 43 additions & 53 deletions .github/workflows/ci.yml → .github/workflows/flare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,13 @@ on:
paths:
- '.swiftlint.yml'
- ".github/workflows/**"
- "Package@swift-5.7.swift"
- "Package@swift-5.8.swift"
- "Package.swift"
- "Source/**"
- "Source/Flare/**"
- "Tests/**"

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
with:
args: --strict
env:
DIFF_BASE: ${{ github.base_ref }}
macOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
Expand All @@ -49,17 +41,18 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Flare" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
uses: ./.github/actions/build_and_test
with:
scheme: Flare
destination: "platform=macOS"
name: ${{ matrix.name }}
path: test_output
generate_project: false
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
scheme_name: Flare
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

iOS:
name: ${{ matrix.name }}
Expand All @@ -81,16 +74,19 @@ jobs:
runsOn: macos-13
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: make setup_build_tools
- name: Generate project
run: make generate
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- uses: actions/upload-artifact@v4
uses: ./.github/actions/build_and_test
with:
scheme: Flare
destination: ${{ matrix.destination }}
name: ${{ matrix.name }}
path: test_output
test_plan: AllTests
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
scheme_name: Flare
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

tvOS:
name: ${{ matrix.name }}
Expand All @@ -112,22 +108,19 @@ jobs:
runsOn: macos-13
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: make setup_build_tools
- name: Generate project
run: make generate
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan AllTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
uses: ./.github/actions/build_and_test
with:
scheme: Flare
destination: ${{ matrix.destination }}
name: ${{ matrix.name }}
path: test_output
test_plan: AllTests
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
scheme_name: Flare
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

watchOS:
name: ${{ matrix.name }}
Expand All @@ -153,22 +146,19 @@ jobs:
runsOn: macos-13
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: make setup_build_tools
- name: Generate project
run: make generate
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "Flare" -destination "${{ matrix.destination }}" -testPlan UnitTests clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: test_output/${{ matrix.name }}.xcresult
- uses: actions/upload-artifact@v4
uses: ./.github/actions/build_and_test
with:
scheme: Flare
destination: ${{ matrix.destination }}
name: ${{ matrix.name }}
path: test_output
test_plan: UnitTests
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
scheme_name: Flare
filename: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

spm:
name: ${{ matrix.name }}
Expand Down
Loading
Loading