-
Notifications
You must be signed in to change notification settings - Fork 0
GOVUKAPP-2237: Local services #567
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
Merged
+298
−216
Merged
Changes from 15 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
4cd92e2
add local widget
raphaelolu e7dd0f6
fixed indenting
raphaelolu 2f03e42
re recorded hompage widgets
raphaelolu f79a4b2
Merge branch 'feature/brand-refresh' into feature/local-services
raphaelolu ac3cc84
renamed file names and used correct ui components package
raphaelolu af7d2a0
added snapshot tests
raphaelolu b36a2d4
removed unused file
raphaelolu 99fce29
added unit tests
raphaelolu bd31b43
add local to mock config
raphaelolu c78fc6d
fix tests
raphaelolu 8b8e937
correct font
raphaelolu 8a0a806
updated snapshot
raphaelolu 5cc740d
added new snapshot tests
raphaelolu d4a55ce
removed method call
raphaelolu 6d09fd0
added back fetch widgets
raphaelolu f8c1696
refactored changes
raphaelolu e0c3c46
added horizontal padding
raphaelolu 2131b39
Merge branch 'feature/brand-refresh' into feature/local-services
raphaelolu 693f15a
re-took snapshot tests
raphaelolu 0719966
fixed broken tests
raphaelolu 7947386
removed recent activity item card
raphaelolu e182c4f
update padding and snapshot tests
raphaelolu d47030f
reverse commit
raphaelolu 4068b61
added back package.resolve
raphaelolu d46c2ff
new line
raphaelolu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
Production/govuk_ios/ViewModels/LocalAuthority/LocalAuthorityWidgetViewModel.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
Production/govuk_ios/Views/Home/LocalAuthority/LocalAuthorityWidget.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import SwiftUI | ||
raphaelolu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import Foundation | ||
import UIComponents | ||
|
||
struct LocalAuthorityWidget: View { | ||
private var viewModel: LocalAuthorityWidgetViewModel | ||
|
||
init(viewModel: LocalAuthorityWidgetViewModel) { | ||
self.viewModel = viewModel | ||
} | ||
|
||
var body: some View { | ||
Button { | ||
viewModel.tapAction() | ||
} label: { | ||
VStack { | ||
HStack { | ||
Text(viewModel.title) | ||
.font(Font.govUK.title3Semibold) | ||
.foregroundColor(Color(UIColor.govUK.text.primary)) | ||
Spacer() | ||
} | ||
.padding(.bottom, 12) | ||
HStack(alignment: .center) { | ||
Spacer() | ||
VStack(alignment: .center) { | ||
Spacer() | ||
Image(systemName: "plus.circle") | ||
.foregroundColor( | ||
Color( | ||
UIColor.govUK.text.iconTertiary | ||
) | ||
) | ||
.padding(.bottom, 6) | ||
.font(.title) | ||
Text(viewModel.description) | ||
.multilineTextAlignment(.center) | ||
.font(Font.govUK.body) | ||
.foregroundColor(Color(UIColor.govUK.text.primary)) | ||
Spacer() | ||
} | ||
.padding() | ||
Spacer() | ||
} | ||
.background { | ||
Color(uiColor: UIColor.govUK.fills.surfaceList) | ||
} | ||
.roundedBorder(borderColor: .clear) | ||
.shadow( | ||
color: Color( | ||
uiColor: UIColor.govUK.strokes.cardDefault | ||
), radius: 0, x: 0, y: 3 | ||
) | ||
} | ||
} | ||
} | ||
} |
48 changes: 0 additions & 48 deletions
48
Production/govuk_ios/Views/Home/LocalAuthority/LocalAuthorityWidgetView.swift
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.