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

GOVUKAPP-975 Recent Activities modularisation #224

Merged
merged 26 commits into from
Jan 15, 2025

Conversation

joshdubey
Copy link
Contributor

This PR introduces two new SPM modules: GOVKit and RecentActivity

GOVKit contains objects that are shared across the app and other modules. The intent is that modules for future features would be able to utilize GOVKit to accelerate development and create a consistent architecture.
GOVKit has two products: GOVKit and GOVKitTestUtilities. GOVKit has core classes and components for developing additional modules. GOVKitTestUtilities contains mocks and helper classes for more easily setting up unit tests.

RecentActivity encapsulates the RecentActivity feature, containing components for creating the UI, as well as service and repository classes. It relies on the consumer (i.e. GOVUK app) to supply the concrete core data implementation, including the xcdatamodel. Testing is facilitated by creating the core data model programatically, as it is not possible to have an xcdatamodel as a testing resource.

Much of the PR involves movement of code from the app to the modules, with little change except for imports. A change of note was to remove the use of @injected from BaseViewController, and instead inject the Analytics service in the initializer, as is done for all other services. This was to remove the Factory dependency from GOVKit, to help simplify the refactor.

The new packages have their own test plans, as trying to include them in the app test plan was proving difficult, and one would assume they will ultimately be in their own repositories and be tested separately anyway.

@joshdubey joshdubey force-pushed the feature/GOVUKAPP-975-modularisation branch from e350bba to a5d1cd0 Compare January 8, 2025 15:33
@joshdubey joshdubey marked this pull request as ready for review January 8, 2025 15:48
@joshdubey joshdubey requested a review from a team as a code owner January 8, 2025 15:48
@joshdubey joshdubey requested a review from batesyuk January 8, 2025 15:48
batesyuk
batesyuk previously approved these changes Jan 13, 2025
# Conflicts:
#	GOVKit/Sources/GOVKit/Views/Common/TopAlignedBarButtonItem.swift
#	GovUK.xcodeproj/project.pbxproj
#	Production/govuk_ios/Builders/ViewControllerBuilder.swift
#	Production/govuk_ios/ViewControllers/TestViewController.swift
#	RecentActivity/Sources/RecentActivity/Model/RecentActivity/RecentActivitySection.swift
#	RecentActivity/Sources/RecentActivity/ViewControllers/RecentActivityListViewController.swift
#	Tests/govuk_ios/govuk_ios_unit_tests/Mocks/Builders/MockViewControllerBuilder.swift
#	Tests/govuk_ios/govuk_ios_unit_tests/Specs/Builders/ViewControllerBuilderTests.swift
@joshdubey joshdubey force-pushed the feature/GOVUKAPP-975-modularisation branch from 40850b7 to 9053330 Compare January 14, 2025 11:57
@joshdubey joshdubey requested a review from batesyuk January 14, 2025 14:15
@joshdubey joshdubey merged commit fea7235 into develop Jan 15, 2025
5 checks passed
@joshdubey joshdubey deleted the feature/GOVUKAPP-975-modularisation branch January 15, 2025 10:31
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.

2 participants