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

Did minor UI fixes #5

Merged
merged 7 commits into from
Feb 11, 2024
Merged

Did minor UI fixes #5

merged 7 commits into from
Feb 11, 2024

Conversation

hilalalhakani
Copy link
Owner

I made some subtle adjustments to the UI

@VilemKurz VilemKurz force-pushed the screenshot-status-segregation branch 3 times, most recently from bfefedb to 639824f Compare January 31, 2024 11:11
Base automatically changed from screenshot-status-segregation to main January 31, 2024 11:29
@hilalalhakani hilalalhakani force-pushed the minorUIFixes branch 3 times, most recently from 5574235 to 85666c2 Compare January 31, 2024 19:51
@hilalalhakani
Copy link
Owner Author

I will rebase this into main.
I think It's done

Copy link
Collaborator

@VilemKurz VilemKurz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more comment regarding the image precision - it seemed that only five screens were failing recently, in ConnectWalletSnapshotsTests? Lowering the percentage is fine and it works, but please be aware that XCTExpectFailure can warn you as soon as the issue is fixed in future snapshot testing lib updates, or screen changes - so that you can move back to normal 0.98. Writing just so that you are aware of this option, do as you prefer.

Text("This page will open another application.", bundle: .module)
.multilineTextAlignment(.center)
.foregroundStyle(Color.neutral2)
.font(Font(FontName.poppinsRegular, size: 12))
.frame(width: 215)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be removed. The width of the text should be driven by the VStack width, which is driven by padding 32 (this is fine as you have it)

.background(
Color.neutral8
Color.connectWalletAlertBackground
.clipShape(RoundedRectangle(cornerRadius: 32))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one spacing missing - the padding of 48 between the alert background and leading/trailing layout margins. The alert is too wide.

.stroke(Color.neutral6)
)
.frame(minHeight: 40)
Button(
Copy link
Collaborator

@VilemKurz VilemKurz Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is way too long, which makes you add vertical spaces to logically divide the code. You can introduce this method func makeButton(foregroundStyle:tint:isBordered:label:action) -> Button to dedupe and simplify the code.

@@ -207,50 +207,51 @@ struct PopUpModifier: ViewModifier {
.transition(.opacity.animation(.easeInOut))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the environment colorScheme still used?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No i deleted it

foregroundStyle: .neutral2,
tint: .clear,
label: {
Text("Cancel")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also dedupe the text

@hilalalhakani hilalalhakani reopened this Feb 11, 2024
@hilalalhakani hilalalhakani merged commit 9fcdfd3 into main Feb 11, 2024
1 check passed
@hilalalhakani hilalalhakani deleted the minorUIFixes branch February 11, 2024 11:59
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