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

Refactor the project using TCA architecture #1

Merged
merged 43 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4f20256
Create empty project
ns-vasilev Dec 5, 2023
f00a387
Create `RootTabBarView`
ns-vasilev Dec 13, 2023
5b42d32
Create `News` module
ns-vasilev Dec 21, 2023
25292d7
Create `DesignKit` module
ns-vasilev Dec 21, 2023
8550b9d
Update localization
ns-vasilev Dec 21, 2023
f7c53e0
Implement `NewsView`
ns-vasilev Jan 3, 2024
d2c65ee
Implement fetching posts
ns-vasilev Jan 8, 2024
9ea7924
Change the posts list style
ns-vasilev Jan 14, 2024
ab95808
Rename the `News` module to `Posts`
ns-vasilev Jan 14, 2024
6b31381
Implement `NavigationTitle` module
ns-vasilev Jan 14, 2024
dc897b3
Implement favicon loading
ns-vasilev Jan 14, 2024
4e7b248
Implement pagination
ns-vasilev Jan 14, 2024
5e73a34
Implement pagination for each request
ns-vasilev Jan 22, 2024
750961e
Implement pagination
ns-vasilev Jan 23, 2024
8a86a41
Refactor pagination
ns-vasilev Jan 23, 2024
2634d4d
Implement cancelling requests
ns-vasilev Jan 26, 2024
05656d7
Implement scrolling to the top
ns-vasilev Jan 26, 2024
1285921
Implement an item's selection
ns-vasilev Jan 27, 2024
25337bd
Temp
ns-vasilev Jun 17, 2024
0d9db08
Implement the `PostDetails` page
ns-vasilev Jul 18, 2024
d416e58
Implement loading comments
ns-vasilev Jul 30, 2024
fd9313a
Generate the `Settings` module
ns-vasilev Jul 30, 2024
0101236
Implement displaying menu items
ns-vasilev Jul 30, 2024
ea5fdae
Update localiazation
ns-vasilev Aug 12, 2024
00e670a
Update the `RepliesCommentView` layout
ns-vasilev Aug 12, 2024
d4d8648
Change the iPad layout
ns-vasilev Aug 12, 2024
1aa0f5e
Update the loading logic
ns-vasilev Aug 15, 2024
6f54fc3
Implement dismissing a details screen
ns-vasilev Aug 15, 2024
5e529a6
Add the app's icon
ns-vasilev Aug 19, 2024
c28239d
Update `RootSettingsView`
ns-vasilev Aug 19, 2024
4e7bfc2
Add a new `job` section
ns-vasilev Aug 19, 2024
4e75d05
Update localizations
ns-vasilev Aug 19, 2024
4c02e49
Update `AppDelegate`
ns-vasilev Aug 19, 2024
878a815
Update the iPad layout
ns-vasilev Aug 26, 2024
83a8262
Remove useless modules
ns-vasilev Aug 28, 2024
a366ab5
Add Github Action Workflow to Run Tests
ns-vasilev Aug 28, 2024
0fedc8f
Fix typos
ns-vasilev Aug 28, 2024
418edae
Update `README.md`
ns-vasilev Aug 28, 2024
d330619
Update `ios.yml`
ns-vasilev Aug 28, 2024
e2ce3aa
Add `.gitkeep`
ns-vasilev Aug 28, 2024
833cc14
Update `ios.yml`
ns-vasilev Aug 28, 2024
30bc799
Update `project.yml`
ns-vasilev Aug 28, 2024
9c59e12
Update fastlane
ns-vasilev Aug 28, 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
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .fastlane/.env

This file was deleted.

10 changes: 0 additions & 10 deletions .fastlane/Fastfile

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "HackerNews"

on:
push:
branches:
- dev
- main
pull_request:
paths:
- '.swiftlint.yml'
- ".github/workflows/**"
- "HackerNews/**"
- "HackerNewsTests/**"
- "Modules/**"

jobs:
iOS:
name:
runs-on: macos-14
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=17.0,name=iPhone 14 Pro"
name: "iOS"
scheme: "Debug"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: make setup_build_tools
- name: Generate resources
run: make swiftgen
- name: Generate project
run: xcodegen generate
- name: Select Xcode version
run: sudo xcode-select -s '/Applications/Xcode_15.4.app/Contents/Developer'
- name: Run tests
run: |
bundle add fastlane
bundle exec fastlane test

discover-typos:
name: Discover Typos
runs-on: macOS-12
env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
steps:
- uses: actions/checkout@v4
- name: Discover typos
run: |
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
python3 -m pip install --upgrade pip
python3 -m pip install codespell
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*,./fastlane/*"
73 changes: 51 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/

## Various settings
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
Expand All @@ -15,16 +21,11 @@ DerivedData/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
!project.pbxproj

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM
Expand All @@ -38,6 +39,13 @@ playground.xcworkspace
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
Expand All @@ -46,31 +54,52 @@ playground.xcworkspace
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/
Podfile.lock
.Podfile.swp
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build
Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/screenshots/**/*.png
fastlane/test_output

# Other
.DS_Store
fabric.apikey
fabric.buildsecret
GoogleService-Info.plist
# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/

# Modules

Modules/Common/HackerNewsLocalization/Sources/HackerNewsLocalization/Classes/Strings.swift
Modules/Common/DesignKit/Sources/DesignKit/Classes/Design/Generated/Colors.swift
Modules/Common/DesignKit/Sources/DesignKit/Classes/Design/Generated/Fonts.swift
Modules/Features/Settings/Sources/Settings/Classes/Generated/Assets.swift

# Others

.cache
*.xcodeproj
*.env.default
*.p8
fastlane/api-key.json
5 changes: 0 additions & 5 deletions .sourcery.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Stream rules

--swiftversion 5.7

# Use 'swiftformat --options' to list all of the possible options

--header "\nHackerNews\nCopyright © {created.year} Nikita Vasilev. All rights reserved.\n//"

--enable blankLinesBetweenScopes
--enable blankLinesAtStartOfScope
--enable blankLinesAtEndOfScope
--enable blankLinesAroundMark
--enable anyObjectProtocol
--enable consecutiveBlankLines
--enable consecutiveSpaces
--enable duplicateImports
--enable elseOnSameLine
--enable emptyBraces
--enable initCoderUnavailable
--enable leadingDelimiters
--enable numberFormatting
--enable preferKeyPath
--enable redundantBreak
--enable redundantFileprivate
--enable redundantGet
--enable redundantInit
--enable redundantLet
--enable redundantLetError
--enable redundantNilInit
--enable redundantObjc
--enable redundantParens
--enable redundantPattern
--enable redundantRawValues
--enable redundantReturn
--enable redundantSelf
--enable redundantVoidReturnType
--enable semicolons
--enable sortedImports
--enable sortedSwitchCases
--enable spaceAroundBraces
--enable spaceAroundBrackets
--enable spaceAroundComments
--enable spaceAroundGenerics
--enable spaceAroundOperators
--enable spaceInsideBraces
--enable spaceInsideBrackets
--enable spaceInsideComments
--enable spaceInsideGenerics
--enable spaceInsideParens
--enable strongOutlets
--enable strongifiedSelf
--enable todos
--enable trailingClosures
--enable unusedArguments
--enable void
--enable markTypes
--enable isEmpty
--enable redundantExtensionACL

# format options

--wraparguments before-first
--wrapcollections before-first
--maxwidth 140
Loading
Loading