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

✨(llm/lld): add dynamic learn more for LS activation #7825

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

LucasWerey
Copy link
Contributor

@LucasWerey LucasWerey commented Sep 16, 2024

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • LS activation LLD and LLM

πŸ“ Description

Add a field to the feature flag so we can dynamically change the learn more url when activate ledger sync.
The learmore link will appears only if a value is provided
The UI has changed on both LLD and LLM

Good and bad case integration tests added

The new field is learnMoreLink

LLD :
https://github.com/user-attachments/assets/92fae350-6a76-4b0f-920c-efbfa6aeb3e9

LLM :
https://github.com/user-attachments/assets/bc0fec2d-8b05-4673-aa08-33feb6ec6eaf

❓ 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)

Copy link

vercel bot commented Sep 16, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
web-tools ❌ Failed (Inspect) Sep 17, 2024 9:10am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview Sep 17, 2024 9:10am
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Sep 17, 2024 9:10am
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Sep 17, 2024 9:10am
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Sep 17, 2024 9:10am

@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 translations Translation files have been touched labels Sep 16, 2024
@LucasWerey LucasWerey marked this pull request as ready for review September 17, 2024 07:58
@LucasWerey LucasWerey requested a review from a team as a code owner September 17, 2024 07:58
@mcayuelas-ledger
Copy link
Contributor

Comment on lines 13 to 14
onPressLearnMore: () => void;
hasLearnMoreLink?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

You can simplify just by onPressLearnMore as optional ?


useInitMemberCredentials();

const onPressSyncAccounts = () => onSyncMethodPress();

const onPressHasAlreadyCreatedAKey = () => onSyncMethodPress();

const onPressLearnMore = () => learnMoreLink && Linking.openURL(learnMoreLink);
Copy link
Contributor

Choose a reason for hiding this comment

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

you may have an eslint problem here for no-unused-expressions rule. For a better readability and code maintainability the better is to use an if bloc and invoke your openURL function there.

const learnMoreUrl = ledgerSyncFF?.params?.learnMoreLink;
const hasLearnMoreLink = !!learnMoreUrl;

const onLearnMore = () => hasLearnMoreLink && openURL(learnMoreUrl);
Copy link
Contributor

Choose a reason for hiding this comment

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

@LucasWerey
Copy link
Contributor Author

themooneer
themooneer previously approved these changes Sep 17, 2024
@LucasWerey LucasWerey merged commit 7865dcb into develop Sep 17, 2024
53 of 56 checks passed
@LucasWerey LucasWerey deleted the feat/LIVE-14081-14082 branch September 17, 2024 09:48
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 translations Translation files have been touched
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants