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

FAT-100: Adaptations on the Manager for FTS #1279

Merged
merged 18 commits into from
Oct 13, 2022
Merged

FAT-100: Adaptations on the Manager for FTS #1279

merged 18 commits into from
Oct 13, 2022

Conversation

grsoares21
Copy link
Contributor

@grsoares21 grsoares21 commented Sep 14, 2022

📝 Description

This PR rebuilds the device selection screen, with pointers to the new onboarding and new BLE pairing flows.
It uses custom icons for the manager tab according to the last seen device.
It adds a new button on the manager for FTS device to trigger the custom image flow.
It revamps the "not onboarded" device action error with new copy, illustration and a button directing to the right onboarding flow according to the device.

❓ Context

  • Impacted projects: ledger-live-mobile
  • Linked resource(s): FAT-100

✅ Checklist

  • Test coverage
  • Atomic delivery
  • No breaking changes

📸 Demo

demo-new-manager-fts.mov

🚀 Expectations to reach

@grsoares21 grsoares21 requested a review from a team as a code owner September 14, 2022 15:11
@vercel
Copy link

vercel bot commented Sep 14, 2022

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

Name Status Preview Updated
live-common-tools ✅ Ready (Inspect) Visit Preview Oct 13, 2022 at 11:35AM (UTC)
3 Ignored Deployments
Name Status Preview Updated
ledger-live-github-bot ⬜️ Ignored (Inspect) Oct 13, 2022 at 11:35AM (UTC)
native-ui-storybook ⬜️ Ignored (Inspect) Oct 13, 2022 at 11:35AM (UTC)
react-ui-storybook ⬜️ Ignored (Inspect) Oct 13, 2022 at 11:35AM (UTC)

@changeset-bot
Copy link

changeset-bot bot commented Sep 14, 2022

🦋 Changeset detected

Latest commit: a431563

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@ledgerhq/live-common Minor
live-mobile Minor
@ledgerhq/live-cli Patch
ledger-live-desktop Patch
live-common-tools Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added common Has changes in live-common desktop Has changes in LLD mobile Has changes in LLM translations Translation files have been touched labels Sep 14, 2022
@codecov
Copy link

codecov bot commented Sep 14, 2022

Codecov Report

Base: 43.57% // Head: 43.63% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (a431563) compared to base (f7a8df0).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1279      +/-   ##
===========================================
+ Coverage    43.57%   43.63%   +0.05%     
===========================================
  Files          610      619       +9     
  Lines        25490    26280     +790     
  Branches      6982     7117     +135     
===========================================
+ Hits         11107    11466     +359     
- Misses       13255    14761    +1506     
+ Partials      1128       53    -1075     
Flag Coverage Δ
test 43.63% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...er-live-common/src/featureFlags/defaultFeatures.ts 100.00% <ø> (ø)
libs/ledger-live-common/src/hw/index.ts 20.00% <ø> (ø)
...lies/bitcoin/wallet-btc/pickingstrategies/types.ts 20.00% <0.00%> (-80.00%) ⬇️
...lies/bitcoin/wallet-btc/pickingstrategies/Merge.ts 17.94% <0.00%> (-71.80%) ⬇️
...ive-common/src/families/bitcoin/wallet-btc/xpub.ts 50.40% <0.00%> (-41.47%) ⬇️
...e-common/src/families/bitcoin/wallet-btc/wallet.ts 35.46% <0.00%> (-27.66%) ⬇️
...ve-common/src/families/bitcoin/wallet-btc/utils.ts 58.27% <0.00%> (-5.76%) ⬇️
.../src/families/bitcoin/wallet-btc/explorer/index.ts 51.18% <0.00%> (-5.52%) ⬇️
...n/src/families/bitcoin/wallet-btc/storage/index.ts 60.62% <0.00%> (-2.37%) ⬇️
...mon/src/families/bitcoin/wallet-btc/crypto/base.ts 93.02% <0.00%> (-2.33%) ⬇️
... and 252 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented Sep 14, 2022

@grsoares21

Screenshots: ✅

There are no changes in the screenshots for this PR. If this is expected, you are good to go.

@thomasrogerlux thomasrogerlux force-pushed the feat/FAT-82-LLM-new-onboarding-flow branch from ea557b9 to 3fdc645 Compare September 15, 2022 08:47
@abdurrahman-ledger
Copy link
Contributor

import { useNavigation } from "@react-navigation/native";
import { Text, Flex, Icons, BottomDrawer } from "@ledgerhq/native-ui";
import { Device } from "@ledgerhq/live-common/lib/hw/actions/types";
import { useBleDevicesScanning } from "@ledgerhq/live-common/lib/ble/hooks/useBleDevicesScanning";
Copy link
Contributor

Choose a reason for hiding this comment

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

🚨 2 imports with lib 🏃

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! fixed

import React, { useCallback, useMemo } from "react";
import { Trans } from "react-i18next";
import { useDispatch } from "react-redux";
import { Device } from "@ledgerhq/live-common/lib/hw/actions/types";
Copy link
Contributor

Choose a reason for hiding this comment

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

🚨🚨🚨

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! fixed

Copy link
Contributor

@elbywan elbywan left a comment

Choose a reason for hiding this comment

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

Please do not use any. 🙏

@@ -102,4 +102,4 @@ export default {
user,
version,
walletconnect
};
} as any;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not use any.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is this one really a problem? it's requiring a type annotation due to references in the lib. But it's the CLI, will we enforce this rule even in the CLI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

)
);
},
} as any;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not use any.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -101,13 +103,16 @@ registerTransportModule({
id.startsWith("usb|")
? Promise.resolve() // nothing to do
: null,
discovery: Observable.create(o => HIDTransport.listen(o)).pipe(
discovery: new Observable<DescriptorEvent<any>>(o =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not use any.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

using unknown as this type is not very revelant for the context here

} = this.props;
const onHideMenu = () => setShowMenu(false);

const onSelect = (result: any) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not use any.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using unknown instead as the result type from a device action is very "unknown"

if (!interactive) return events;
return events
.pipe(
rxScan((acc: any[], value) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not use any.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Typed it correctly

Copy link
Contributor

@thomasrogerlux thomasrogerlux left a comment

Choose a reason for hiding this comment

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

Except the ongoing request changes from other people, looks good to me!

Copy link
Contributor

@elbywan elbywan left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli common Has changes in live-common 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.

None yet

6 participants