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

Improvement: Betters Card and PlainListRow #479

Merged
merged 2 commits into from
May 8, 2023
Merged

Conversation

kugel3
Copy link
Contributor

@kugel3 kugel3 commented May 7, 2023

Description

(This PR is the same as #476 but that one was automatically closed when I renamed the branch, and now can't be reinstated)

We have a helper view called Card that when wrapped around another view gives it rounded corners and a shadow. It's used for a number of list items and is mostly tappable. This PR refactors Card and PlainListRow that are often used together. It also introduces TappableListRow, for PlainListRows that should be tappable.

The main reason to do this is to make the APIs cleaner, the reason to do it now is that the Card shaped buttons currently don't behave like other buttons when highlighted. Instead of darkening the background the text is lightened. This PR gives us control over this behaviour.

How to test

Tap any button that looks like the one in the screenshot. They appear in Settings > Authorized dApps and Settings > Personas, as well as their sub views.

Screenshot

The first button is pressed:

PR submission checklist

  • I have tested account to account transfer flow and have confirmed that it works

Copy link
Contributor

@CyonAlexRDX CyonAlexRDX left a comment

Choose a reason for hiding this comment

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

Lgtm

Copy link
Contributor

@GhenadieVP GhenadieVP left a comment

Choose a reason for hiding this comment

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

LGTM!
Just added a simple suggestion.

Sources/Core/DesignSystem/Components/PlainListRow.swift Outdated Show resolved Hide resolved
kugel3 added 2 commits May 8, 2023 09:56
# Conflicts:
#	Sources/Core/DesignSystem/Components/PlainListRow.swift
@kugel3 kugel3 force-pushed the improvement/better-cards branch from db21237 to dbcba1a Compare May 8, 2023 07:56
@kugel3 kugel3 merged commit 54d1197 into main May 8, 2023
@kugel3 kugel3 deleted the improvement/better-cards branch May 8, 2023 08:43
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants