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

[feat/LIVE-12118]: add buy sell ui flag to enable progressive replacement of multibuy-v2 live app #6686

Merged
merged 8 commits into from
Apr 22, 2024

Conversation

beths-ledger
Copy link
Contributor

@beths-ledger beths-ledger commented Apr 16, 2024

✅ Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • Find flag in settings: buySellUi
    • It should toggle on/off, but also accept params json: { "params": { "manifestId": "buy-sell-ui" } }
    • when using manifestId "buy-sell-ui", the URL for buy/sell live app should change to https://buy-sell.ledger.com
    • Other functionality should remain the same.

📝 Description

  • add buy sell ui flag to enable progressive replacement of multibuy-v2 live app
  • when flag is enabled, option to use "buy-sell-ui" manifest id instead of "multibuy-v2" (or to override with a custom staging manifest id)
  • allow multibuy logic to apply for either buy-sell manifest

image

image

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@beths-ledger beths-ledger requested review from a team as code owners April 16, 2024 14:51
Copy link

vercel bot commented Apr 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web-tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 19, 2024 3:14pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Apr 19, 2024 3:14pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Apr 19, 2024 3:14pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Apr 19, 2024 3:14pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Apr 19, 2024 3:14pm

@live-github-bot live-github-bot bot added desktop Has changes in LLD mobile Has changes in LLM common Has changes in live-common ledgerjs Has changes in the ledgerjs open source libs labels Apr 16, 2024
@beths-ledger beths-ledger force-pushed the feat/enable-buy-sell-ui-feature-flag branch from 28be9e2 to 44351a9 Compare April 17, 2024 16:15
@beths-ledger
Copy link
Contributor Author

beths-ledger commented Apr 17, 2024

@beths-ledger

Generating screenshots: workflow ended

Jobs status:
✅ - generate-screenshots-linux

@@ -461,6 +462,7 @@ export type Feature_LldRefreshMarketData = Feature<{

export type Feature_CounterValue = DefaultFeature;
export type Feature_MockFeature = DefaultFeature;
export type Feature_BuySellUi = DefaultFeature;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export type Feature_BuySellUi = DefaultFeature;
export type Feature_BuySellUI = DefaultFeature;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although I agree, I am hesitant to capitalise as the other flags seem to consistently use full camelCase e.g. llmFeature etc

@@ -105,7 +107,9 @@ export type ExchangeComponentParams = {

const Exchange = ({ match }: RouteComponentProps<ExchangeComponentParams>) => {
const appId = match?.params?.appId;
const buySellUiFlag = useFeature("buySellUi");
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rename this to be a little clearer for other developers ... explaining that this is a rollout on v3 of Buy Sell FE, maybe something like buySellUIV3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if we make the manifest id extendable then the version could be anything rather than always 3, so it might be best to avoid using the version actually..

Justkant
Justkant previously approved these changes Apr 18, 2024
Justkant
Justkant previously approved these changes Apr 18, 2024
@@ -71,7 +74,7 @@ function getProxyURL(url: string) {
// This is to handle links set in the useFromAmountStatusMessage in LLC.
// Also handles a difference in paths between LLD on LLD /platform/:app_id
// but on LLM /discover/:app_id
if (hostname === "platform" && [DEFAULT_MULTIBUY_APP_ID].includes(platform)) {
if (hostname === "platform" && [DEFAULT_MULTIBUY_APP_ID, BUY_SELL_UI_APP_ID].includes(platform)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Here do we want to add the buySellUiFlag.params.manifestId in the array ?

Copy link
Contributor Author

@beths-ledger beths-ledger Apr 19, 2024

Choose a reason for hiding this comment

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

Yes for completion, good plan, added! Thanks!

@beths-ledger beths-ledger force-pushed the feat/enable-buy-sell-ui-feature-flag branch from 9c758fb to 6101188 Compare April 19, 2024 09:56
@beths-ledger beths-ledger force-pushed the feat/enable-buy-sell-ui-feature-flag branch from 7d797e6 to 0d31252 Compare April 19, 2024 10:24
@beths-ledger beths-ledger force-pushed the feat/enable-buy-sell-ui-feature-flag branch from 8c1b9d9 to 11592fe Compare April 19, 2024 14:28
@beths-ledger
Copy link
Contributor Author

beths-ledger commented Apr 19, 2024

@beths-ledger

Generating screenshots: workflow ended

Jobs status:
✅ - generate-screenshots-linux

Copy link
Contributor

@ComradeAERGO ComradeAERGO left a comment

Choose a reason for hiding this comment

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

Looking good to me
Pinging @Justkant for reference when he comes back from holiday

@beths-ledger beths-ledger requested a review from a team April 22, 2024 09:07
Copy link
Contributor

@mitchellv-ledger mitchellv-ledger left a comment

Choose a reason for hiding this comment

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

LGTM

@beths-ledger beths-ledger merged commit 1b17628 into develop Apr 22, 2024
55 of 57 checks passed
@beths-ledger beths-ledger deleted the feat/enable-buy-sell-ui-feature-flag branch April 22, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Has changes in live-common desktop Has changes in LLD ledgerjs Has changes in the ledgerjs open source libs mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants