-
Notifications
You must be signed in to change notification settings - Fork 177
feat: implement remaining Figma designs for multi-step tracker #7989
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
Merged
Changes from 83 commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
6df8ef8
feat: add multi-step tracker for EOA TWAP order creation flow
Danziger 799edf8
Merge branch 'develop' into feat/eoa-twap-order-tracker
Danziger 2362af0
chore(i18n): extract i18n strings [automatic]
cowswap-release-sync[bot] e53d630
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] 9780b1c
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] 425e295
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] fac5579
fix: check allowances based on sell amount + buffer
Danziger 2b741c8
Merge branch 'feat/eoa-twap-order-tracker' of github.com:cowprotocol/…
Danziger 4cb0c7e
chore: merge develop and resolve conflicts
Danziger a9c09ca
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] f7502a3
feat: set EOA_TWAP_POC_DEBUG to true
Danziger f92bde9
Merge branch 'feat/eoa-twap-order-tracker' of github.com:cowprotocol/…
Danziger 5e93d66
chore: update TSDoc comment
Danziger e431071
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] cb2cb1e
fix: abort TWAP flow if dismissed, improve allowance checks
Danziger 8ab8a91
Merge branch 'feat/eoa-twap-order-tracker' of github.com:cowprotocol/…
Danziger 56f49e6
chore: merge develop
Danziger d16ecfb
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] 70cdce7
fix: keep old 2-step tracker and new multi-step tracker independent
Danziger 18f59cd
Merge branch 'feat/eoa-twap-order-tracker' of github.com:cowprotocol/…
Danziger 5410080
chore(i18n): extract i18n strings [automatic]
cowswap-release-sync[bot] 8beb263
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] c46438d
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] 37a53b1
feat: check approva tx receip
Danziger 28d731b
Merge branch 'feat/eoa-twap-order-tracker' of github.com:cowprotocol/…
Danziger 3eb6de6
chore: merge develop
Danziger b2946d0
feat: updated designs for mutli-step tracker
Danziger 1828d49
fix: check for -1 from indexOf when building signing plan
Danziger 9070a2c
Merge branch 'develop' into feat/eoa-twap-order-tracker
Danziger f8290ba
chore(i18n): extract i18n strings [automatic]
cowswap-release-sync[bot] 365f253
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] 284baac
feat: update multi expandable button hover styles
Danziger 0ecdf22
Merge branch 'feat/eoa-twap-order-tracker' of github.com:cowprotocol/…
Danziger ab53e95
chore: merge develop
Danziger d8a5964
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] b9642a8
fix: fix test
Danziger 2c68566
Merge branch 'feat/eoa-twap-order-tracker' of github.com:cowprotocol/…
Danziger 91e9b59
chore: merge develop and resolve conflicts
Danziger 04b52be
Merge branch 'develop' into feat/eoa-twap-order-tracker
Danziger 204842d
fix: fix unit test
Danziger 693b771
Merge branch 'develop' into feat/eoa-twap-order-tracker
Danziger b4a77a7
chore: merge develop and resolves conflicts
Danziger 5f0f156
fix: fix minor styling issue in StepItem
Danziger 7aa4323
fix: fix buildEoaTwapConfirmationPendingSteps params
Danziger eac5975
chore(i18n): extract i18n strings [automatic]
cowswap-release-sync[bot] e1615d4
feat: extract reusable logic related to approvals
Danziger 99d44e6
Merge branch 'feat/eoa-twap-order-tracker' of github.com:cowprotocol/…
Danziger 5154fb1
Merge branch 'develop' into feat/eoa-twap-order-tracker
Danziger a5a50b1
feat: add TWAP trade summary and token info to stepper header
Danziger 00cbcc9
chore(i18n): extract i18n strings [automatic]
cowswap-release-sync[bot] b4e430b
Merge branch 'develop' into feat/eoa-twap-order-tracker
Danziger 3141dc9
fix: fix deadlinePartsDisplay pluralization
Danziger 33c62d2
chore(i18n): extract i18n strings [automatic]
cowswap-release-sync[bot] 63f0b2a
Merge branch 'feat/eoa-twap-order-tracker' into feat/eoa-twap-order-t…
Danziger 3325bed
feat: keep trade details collapsed but visible in tracker view
Danziger 28fca36
chore(i18n): extract i18n strings [automatic]
cowswap-release-sync[bot] 192f68e
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] 7ebef2c
feat: improve close/back icons and add transitions to token logos
Danziger ff5f023
Merge branch 'feat/eoa-twap-order-tracker-continuation' of github.com…
Danziger 709c1e2
fix: fix missing border in setting panels in light theme
Danziger 84195d7
chore: merge develop and resolve conflicts
Danziger 50a07cc
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] 1862c8f
feat: reorg TwapConfirmModal to have a common header, amounts, order …
Danziger e6f454f
Merge branch 'feat/eoa-twap-order-tracker-continuation' of github.com…
Danziger eeaf10e
chore(i18n): extract i18n strings [automatic]
cowswap-release-sync[bot] c2c67d4
feat: add animation util to use later
Danziger 65c420a
Merge branch 'feat/eoa-twap-order-tracker-continuation' of github.com…
Danziger 5b92c37
Merge branch 'develop' into feat/eoa-twap-order-tracker-continuation
Danziger 07775ce
chore: remove debug transitions and styling
Danziger 74bdb7b
Merge branch 'feat/eoa-twap-order-tracker-continuation' of github.com…
Danziger 70a02c9
feat: remove unused component
Danziger 1b2c5df
feat: remove unused component
Danziger 79fb20a
fix: remove unused element
Danziger 5f18af4
chore(i18n): extract i18n strings [automatic]
cowswap-release-sync[bot] 086ecfa
chore: update bundle sizes [automatic]
cowswap-release-sync[bot] 332adac
feat: use transition util in TokenLogo
Danziger 3ed79b5
Merge branch 'feat/eoa-twap-order-tracker-continuation' of github.com…
Danziger b1a027f
fix: fix border that's not visible
Danziger 26c660e
fix: fix module imports and incorrect aria-expanded value
Danziger 2ab030a
fix: add type button to IconButton
Danziger a00e042
fix: require aria-label for IconButton
Danziger 1ea7e5f
fix: add focus-visible styles to IconButton
Danziger bccf743
Merge branch 'develop' into feat/eoa-twap-order-tracker-continuation
Danziger cc59207
chore(i18n): extract i18n strings [automatic]
cowswap-release-sync[bot] ae683ed
fix: extract shared type to its own .types.ts file
Danziger 3cb9b7b
fix: fix CurrencyAmountPreview styles to match Figma and update font-…
Danziger 3b219dc
fix: fix steps not expanding
Danziger 918a5ff
fix: update ModalHeader back/close button colors and sizing to match …
Danziger 52305c4
fix: remove quote countdown bold
Danziger 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
5 changes: 0 additions & 5 deletions
5
apps/cowswap-frontend/src/common/pure/ConfirmationPendingContent/index.tsx
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 |
|---|---|---|
| @@ -1,6 +1 @@ | ||
| export { ConfirmationPendingContent } from './ConfirmationPendingContent' | ||
| export { MultiConfirmationPendingContent } from './multi/MultiConfirmationPendingContent' | ||
| export type { | ||
| MultiConfirmationPendingStep, | ||
| MultiConfirmationPendingStepStatus, | ||
| } from './multi/MultiConfirmationPendingContent' |
114 changes: 0 additions & 114 deletions
114
...tend/src/common/pure/ConfirmationPendingContent/multi/MultiConfirmationPendingContent.tsx
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
|
|
@@ -2,15 +2,16 @@ import { ReactNode } from 'react' | |
|
|
||
| import { Currency, CurrencyAmount } from '@cowprotocol/currency' | ||
| import { TokenLogo } from '@cowprotocol/tokens' | ||
| import { TokenAmount } from '@cowprotocol/ui' | ||
|
|
||
| import { Nullish } from 'types' | ||
|
|
||
| import { PriceImpact } from 'legacy/hooks/usePriceImpact' | ||
|
|
||
| import * as styledEl from './styled' | ||
|
|
||
| import { FiatValue } from '../FiatValue' | ||
| const TOKEN_LOGO_SIZE = 42 | ||
|
|
||
| export type CurrencyAmountPreviewVariant = 'default' | 'slim' | ||
|
|
||
| export interface CurrencyPreviewInfo { | ||
| amount: Nullish<CurrencyAmount<Currency>> | ||
|
|
@@ -20,6 +21,7 @@ export interface CurrencyPreviewInfo { | |
| } | ||
|
|
||
| export interface CurrencyPreviewProps extends Partial<BuiltItProps> { | ||
| variant?: CurrencyAmountPreviewVariant | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Figma designs have a "slim" version of this component. There's a smooth transition between one variant and the other. |
||
| id: string | ||
| currencyInfo: CurrencyPreviewInfo | ||
| isBridging?: boolean | ||
|
|
@@ -30,24 +32,31 @@ interface BuiltItProps { | |
| className: string | ||
| } | ||
|
|
||
| export function CurrencyAmountPreview(props: CurrencyPreviewProps): ReactNode { | ||
| const { id, currencyInfo, className, priceImpactParams, isBridging } = props | ||
| export function CurrencyAmountPreview({ | ||
| variant = 'default', | ||
| id, | ||
| currencyInfo, | ||
| className, | ||
| priceImpactParams, | ||
| isBridging, | ||
| }: CurrencyPreviewProps): ReactNode { | ||
| const { fiatAmount, amount } = currencyInfo | ||
| const topLabel = currencyInfo.label | ||
| const currency = amount?.currency | ||
| const containerClassName = [className, variant === 'slim' ? 'slim' : null].filter(Boolean).join(' ') | ||
|
|
||
| return ( | ||
| <styledEl.Container id={id} className={className}> | ||
| <styledEl.Container id={id} className={containerClassName}> | ||
| <div>{topLabel}</div> | ||
| <div> | ||
| <styledEl.TokenLogoWrapper> | ||
| <TokenLogo token={currency} size={42} /> | ||
| <TokenLogo token={currency} size={TOKEN_LOGO_SIZE} /> | ||
| </styledEl.TokenLogoWrapper> | ||
| </div> | ||
| <styledEl.Amount> | ||
| <TokenAmount className="token-amount-input" amount={amount} tokenSymbol={currency} /> | ||
| <FiatValue fiatValue={fiatAmount} priceImpactParams={priceImpactParams} isBridging={isBridging} /> | ||
| </styledEl.Amount> | ||
| <styledEl.Amounts> | ||
| <styledEl.Amount className="token-amount-input" amount={amount} tokenSymbol={currency} /> | ||
| <styledEl.FiatAmountSlot fiatValue={fiatAmount} priceImpactParams={priceImpactParams} isBridging={isBridging} /> | ||
| </styledEl.Amounts> | ||
| </styledEl.Container> | ||
| ) | ||
| } | ||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've installed
clsxand started using classes to avoid relaying so much on styled component's transient props. This should make an eventual migration to CSS modules or other alternatives easier and also improve performance as CSS styles won't have to be recreated at runtime when props change.