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

New Swap Scene #4912

Merged
merged 7 commits into from
Mar 26, 2024
Merged

New Swap Scene #4912

merged 7 commits into from
Mar 26, 2024

Conversation

samholmes
Copy link
Contributor

@samholmes samholmes commented Mar 18, 2024

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@samholmes samholmes force-pushed the sam/swap-scenes branch 2 times, most recently from 633d492 to 42cf80d Compare March 18, 2024 22:09
@samholmes
Copy link
Contributor Author

Changes are needed based on new designs from yesterday

@samholmes samholmes force-pushed the sam/swap-scenes branch 3 times, most recently from d9d99df to 1fbc272 Compare March 21, 2024 22:22
Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

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

I cannot review this atomic commit style, since the forest is hidden in the trees.

I would like to see:

  1. Use flexGrow over width for LineTextDivider
  2. Update text input colors (new commit, with the changes to edgeDark.tsx)
  3. Rename CryptoExchange* components
  4. Rename exchange scene route names
  5. Literally everything else, in one commit

Notice that the first commit for ifLoggedIn should not be included, for reasons given below.

Commit 3 should also include "Rename ExchangedFlipInput component to SwapInputCard", since it's all part of the same renaming deal.

I am going to review it locally in my diff tool, and then leave comments manually.

src/components/hoc/IfLoggedIn.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

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

This is all I have for now - I would like to see these major issues resolved (squashing commits and making the wallet mandatory in the swap input component) before I review further, because right now things are just too chaotic.

Also, please do not rename FlipInput2 to FlipInputOld. If you genuinely need to for the component for the swap scene, then call your fork SwapFlipInput, but FlipInput2 isn't deprecated, so it shouldn't have a name like "Old".

src/components/scenes/SwapCreateScene.tsx Outdated Show resolved Hide resolved
src/components/scenes/SwapCreateScene.tsx Outdated Show resolved Hide resolved
src/components/themed/SwapInputCard.tsx Outdated Show resolved Hide resolved
@samholmes samholmes force-pushed the sam/swap-scenes branch 2 times, most recently from 1353194 to f2b6efe Compare March 26, 2024 00:53
Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

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

I didn't find much on this second round of reviews. I think it looks pretty reasonable now, and a lot of my confusions from before are gone - now that it's all one big commit, it's obvious which files are which, and what got renamed to what.

We will really have to test the FlipInput2 component, not only on the swap scene but in other places like the send scene where we also use it.

src/components/themed/FlipInput2.tsx Outdated Show resolved Hide resolved
src/components/themed/SwapInput.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@swansontec swansontec left a comment

Choose a reason for hiding this comment

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

One tiny tweak needed.

@@ -261,6 +263,8 @@ export const FlipInput2 = React.forwardRef<FlipInputRef, Props>((props: Props, r
</EdgeTouchableOpacity>
</SideContainer>
</InputContainerView>

{renderFooter ? renderFooter() : null}
Copy link
Contributor

Choose a reason for hiding this comment

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

renderFooter != null

This property causes less issues with overflowing containers when
the desing calls for a max width container.
Use the word "swap" instead of exchange for the scene component names
and files. Avoid naming based on implementation details such as the use
of "quotes", and instead use words that apply to the scene's semantics:
"confirmation", "success", etc.
The max button will overlap the elements or space below the SwapInput.
This is called for in the design for this scene.
@samholmes samholmes merged commit a863bf7 into develop Mar 26, 2024
2 checks passed
@samholmes samholmes deleted the sam/swap-scenes branch March 26, 2024 22:08
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