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

fix: grid not showing in swap confirmation modal #226

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

0xneves
Copy link
Member

@0xneves 0xneves commented Mar 19, 2024

Bug Fixes

TL;DR

  • Fixed missing grid on swap confirmation modal
  • Fixed grid glitches regarding overflow(scrolling)
  • Commented on empty cards logic for the grids

Changes:

  • added the grid sizes to the card
  • added a new type called isConfirmationModal for confirmations when creating swaps in the swap station and when confirming accept swaps in swap offers. This boolean will define a single line of 5 squares
  • changed the laptop/desktop squares from 4 to 3. They were being overflowed/cutted from the frame
  • commented the entire placeholder code/logic
  • removed unnecessary Math when calculating emptySquaresCount
  • fixed overflows on offerSummary, hidden for X and auto for Y
  • fixed gap for mobile-s (was cutting out of the frame)
  • removed the scroll from the grids in all the offerSummary

- added the grid sizes to the card
- added a new type called `isConfirmationModal` for confirmations when creating swaps in the swap station and when confirming accept swaps in swap offers. This boolean will define a single line of 5 squares
- changed the laptop/desktop squares from 4 to 3. They were being overflowed/cutted from the frame
- commented the entire placeholder code/logic
- removed unnecessary Math when calculating emptySquaresCount
- fixed overflows on offerSummary, hidden for X and auto for Y
- fixed gap for mobile-s (was cutting out of the frame)
- removed the scroll from the grids in all the offerSummary
@0xneves 0xneves added bug Something isn't working enhancement New features labels Mar 19, 2024
@0xneves 0xneves self-assigned this Mar 19, 2024
Copy link

vercel bot commented Mar 19, 2024

@0xneves is attempting to deploy a commit to the Shared Blockful's projects Team on Vercel.

A member of the Team first needs to authorize it.

@heronlancellot
Copy link
Member

hey yo @0xneves ! I can't test for some reason IDk with the GH the PR.. probably because you made by your develop branch

I would like to add in TokenLists that:

  • Old
    <div key={`token-${index}`}>
      <TokenCard
        styleType={tokenCardStyleType}
        onClickAction={tokenCardClickAction}
        displayERC20TokensAmount={displayERC20TokensAmount}
        openTokenAmountSelectionModal={openTokenAmountSelectionModal}
        withSelectionValidation={withSelectionValidation}
        ownerAddress={ownerAddress}
        tokenData={token}
      />
    </div>
  • New
    • Remove the key div and put the key in tokenCard. Just one another update to this pr
<TokenCard
        key={index}
        styleType={tokenCardStyleType}
        onClickAction={tokenCardClickAction}
        displayERC20TokensAmount={displayERC20TokensAmount}
        openTokenAmountSelectionModal={openTokenAmountSelectionModal}
        withSelectionValidation={withSelectionValidation}
        ownerAddress={ownerAddress}
        tokenData={token}
 />

Copy link
Contributor

@eduramme eduramme left a comment

Choose a reason for hiding this comment

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

Cool!

@eduramme
Copy link
Contributor

@0xneves By the way, I wasn't able to test as well. But it looks OK from the code perspective

@@ -11,44 +11,62 @@ interface TokenCardsPlaceholderProps {
desktopTotalSquares?: number;
tabletTotalSquares?: number;
mobileTotalSquares?: number;
confirmationModalTotalSquares?: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

This logic is looking pretty complex. I will approve this PR now since I understand that refactoring it would be more painful than what we can handle atm. Let's come back to this logic later and rethink some things.

@0xneves 0xneves merged commit 53ff5ee into blockful-io:develop Mar 20, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New features
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants