-
Notifications
You must be signed in to change notification settings - Fork 333
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-131 - Stax Custom lock screen tool #743
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 4de7efb The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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 |
Codecov Report
@@ Coverage Diff @@
## develop #743 +/- ##
============================================
+ Coverage 0 47.84% +47.84%
============================================
Files 0 650 +650
Lines 0 29121 +29121
Branches 0 7532 +7532
============================================
+ Hits 0 13932 +13932
- Misses 0 15131 +15131
- Partials 0 58 +58
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Screenshots: ✅
There are no changes in the screenshots for this PR. If this is expected, you are good to go. |
@@ -6,7 +6,7 @@ export type FeatureId = | |||
| "ratings" | |||
| "counterValue" | |||
| "buyDeviceFromLive" | |||
| string; |
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.
Leaving string
was not strict enough in my opinion, because of that for instance we didn't detect that a default config for llmUsbFirmwareUpdate was missing.
It was introduced in this PR: LedgerHQ/ledger-live-common#1843
It also puts string as a possible type for feature flags in order to allow us to develop even without upgrading live-common.
Now that we have the mono-repo this is useless.
@@ -64,4 +64,10 @@ export const defaultFeatures: DefaultFeatures = { | |||
counterValue: { | |||
enabled: false, | |||
}, | |||
llmUsbFirmwareUpdate: { |
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.
this was missing because the typing was not strict enough.
see https://github.com/LedgerHQ/ledger-live/pull/743/files#r930990175
apps/ledger-live-mobile/src/components/RootNavigator/CustomImageNavigator.tsx
Outdated
Show resolved
Hide resolved
apps/ledger-live-mobile/src/components/RootNavigator/CustomImageNavigator.tsx
Outdated
Show resolved
Hide resolved
apps/ledger-live-mobile/src/screens/CustomImage/ErrorScreen.tsx
Outdated
Show resolved
Hide resolved
apps/ledger-live-mobile/src/components/CustomImage/imageUtils.ts
Outdated
Show resolved
Hide resolved
apps/ledger-live-mobile/src/components/CustomImage/imageUtils.ts
Outdated
Show resolved
Hide resolved
9843ca6
to
cd7653e
Compare
75eaf25
to
3bf8651
Compare
ba4a53f
to
743264d
Compare
First poc of image processing using webview on NFTs Migrate Webview image processor to its own component Improve code injection using toString() & "show source" directive Move image fetching logic to own file Fix code injection (not calling Function.toString at compile) + add debug helper Add button to navigate to ImagePicker in NftViewer Add tip for code injection issue (first call of toString()) in debug Revert changes on NftImageViewer Add button to request compact raw data from webview script Comment Add props to set brightness & contrast (filter not working yet) Working flows on iOS: (image url / pick from gallery) -> crop at given ratio -> process Cleanup a bit the comments mess Fix android build issue by upgrading kotlin Add descriptive labelling in the main screen Gallery flow working on Android Make injected code type script Add multiple constrast filters using manual JS filter Avoid recomputing result twice in computeResult lint lint Fix import from URL on Android by downloading image in cache Improve display of the preview for each step (dimensions) Image resizing to target size (after crop, before processing) Fix expo-image-manipulator version to match expo-barcode-scanner's dependency on expo-image-loader version Fix ImageResizer: use fileURI instead of base64 (the former doesn't work on iOS) Fix rerenders Store floored value in rawResult to avoid division imprecisions Fix issues post rebase Cleanup types of image tools Implement BottomModal & CroppingScreen w/ navigation (WIP) Implement PreviewScreen Move DebugScreen to CustomImageNavigator Implement Step3Transfer with for now just a preview of the raw data Proper design of bottom modal Avoid loading source image data as base64 in JS to avoid memory issues Put back expo-file-system as it's required by expo-image-manipulator Less extreme contrast values post rebase on develop with RN upgrade Add rotate button in Step1Crop Fix contrast causing out of bound values (out of [0, 255]) Fix nav to CustomImage in NftViewer Fix gray level rounding Handle errors in loading flow Add error handling & loading state in import from gallery flow Add error handling in image preview, cropper, resizer, processor Add error handling in injected code Use regular image for debug link Add data validation: rebuild image from raw data & compare base64 with preview Fix lint & ts Add extreme aspect ratio image Add some alerts to debug importImageFromPhoneGallery more debug logs Add expo-image-picker because react-native-image-picker is buggy on samsung/xiaomi Remove debugging stuff in image importing flow Remove react-native-image-picker Move CustomImage entrypoints to debug screen Adapt cropper layout for "extreme" aspect ratio (above 2:1) Remove ImagePicker debug screen Remove unused variables Add "customImage" feature flag Update injected code doc Remove unused component Document components Remove react-native-image-picker lib Changesets Improve typing of Step1Crop params & loadImageToFileWithDimensions Remove unused imports Fix cleanup of image downloading useEffect (including cancellation) Change ImageResizer component to a hook + cleanup useEffect typing & typos Fix fitImageContain & document Improve injected code: pure functions where possible & documentation Type navigation of CustomImageNavigator Fix typing of ImageCropper (ref & style) Fix post rebase fix post rebase lint Add custom image (feature flagged) entry point in nft links panel Fix rendering logic of NftLinksPanel (with sections & separator between) update doc Disable back gesture in the Error Screen nft: add image/svg and image/svg+xml to mimeTypesMap for "image" Fix custom image entry in NFT: should only be visible if there is an "image" uri Remove fake url entrypoint Fix layout of cropping UI Revert bad change to NftViewer Remove image/svg image/svg+xml from mimetypesmap lint Add wording for screen headers Fix post rebase Fix post rebase Improve usage of the available area for the cropping UI Implement native ImagePickerModule for Android (better than expo-image-picker) Remove old dimensions logic Remove unneeded loading of original image dimensions Improve (Android) initial scaling of image in cropping UI (fills more space rather than fitting) Remove customImage flag from debug screen Fix post rebase
764f78d
to
4de7efb
Compare
QA OK cf. https://ledgerhq.atlassian.net/browse/FAT-135?focusedCommentId=220655 |
📝 Description
Tool to import an image (either from the phone's gallery or from an URL) and display a cropping UI, then resize it to a target size, pick & apply a contrast value, preview the result and output the raw data.
New feature flag:
"customImage"
Two entry points:
This is the first part of work for a bigger feature. Ask me on slack for more details about the what/why.
❓ Context
ledger-live-mobile
ledger-live-common
✅ Checklist
📸 Demo
I can send you a video on Slack
🚀 Expectations to reach
Please make sure you follow these Important Steps.
Pull Requests must pass the CI and be internally validated in order to be merged.