feat(trade): display Limit orders promo banner in trading widgets#5325
feat(trade): display Limit orders promo banner in trading widgets#5325fairlighteth merged 18 commits intodevelopfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
anxolin
left a comment
There was a problem hiding this comment.
Looks good to me, are these text final. They felt a bit long. I was thinking sth like:
Limit Order just got better
We heard you! here are some features you've asked for:
- Lock/unlock price for finer control
- Set your price in USD or tokens
- Personalise your interface
- Estimate fill price estimation before placing the order
- More spacious, and enhanced design!
| const rateInfoParams = useRateInfoParams(inputCurrencyAmount, outputCurrencyAmount) | ||
| const widgetActions = useLimitOrdersWidgetActions() | ||
| const isWrapOrUnwrap = useIsWrapOrUnwrap() | ||
| const { chainId: _chainId, account: _account } = useWalletInfo() |
There was a problem hiding this comment.
Those variables look unused
There was a problem hiding this comment.
Addressed and removed some more unused.
shoom3301
left a comment
There was a problem hiding this comment.
I think this solution should be different.
The new banner is supposed to be a part of modules/trade or modules/tradeWidgetAddons and be injected in TradeWidgetForm component.
Following this way we can avoid multiple adding of the banner in different places.
There was a problem hiding this comment.
Hey @fairlighteth , great, thank you!
However, some issues:
-
I cannot check cases related to the 'switched off flag' (and there is no such flag in the launchdarkly)
-
I notice, that when I dismiss (press on later) then navigate to the Limit orders page, or press on the 'place limit order' button, then refresh the page, the banner may blinks (1 time). Might it be possible to fix it?
…d and improved button styling (#5330)
…omo Banner functionality
| import { TradeWidgetUpdaters } from './TradeWidgetUpdaters' | ||
| import { TradeWidgetProps } from './types' | ||
|
|
||
| import { useTradeFlowContext } from '../../../limitOrders/hooks/useTradeFlowContext' |
There was a problem hiding this comment.
trade module cannot depend on limitOrders module
There was a problem hiding this comment.
Keep it in limit orders widget
…ponsibility boundaries
…otocol/cowswap into feat/limit-ui-promo-banner # Conflicts: # apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/index.tsx
|
@elena-zh I know, there is a new |




Add Limit Orders Promotional Banner Across Trading Modes
Overview
Added a new promotional banner for limit orders that appears across various trading modes (Swap, Limit, TWAP, and Yield). The banner highlights new limit order features and can be dismissed by users, with the dismissal state persisted in local storage.
Key Changes
1. Feature Flag Implementation
SHOW_LIMIT_ORDERS_PROMOfeature flag to control the banner's visibility globallytrue), deliberately bypassing the LaunchDarkly feature flag system (fromuseFeatureFlagshook) for initial testing2. Banner Component Updates
LimitOrdersPromoBannerpure component with:limitOrdersPromoDismissedAtom3. Integration Across Trading Modes
Swap Mode:
TradeWidgetFormLimit Orders Mode:
isLimitOrdersTab={true}TWAP/Advanced Orders Mode:
isLimitOrdersTab={false}Yield Mode:
isLimitOrdersTab={false}4. UI/UX Improvements
5. State Management
limitOrdersPromoDismissedAtomfor persistent dismissal stateTesting Notes
Technical Debt
Future Work
SHOW_LIMIT_ORDERS_PROMOconstant with LaunchDarkly feature flaguseFeatureFlagshook for proper feature flag management