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/update launch send modal mechanism #16718

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Khushboo-dev-cpp
Copy link
Contributor

@Khushboo-dev-cpp Khushboo-dev-cpp commented Nov 5, 2024

What does the PR do

Changes the SendModal launching mechanish.

Update signals in Global for openSendModal to be parameterised, instead of having to pass sendModal instance across the app.

Affected areas

SendModal Invocations points from-

  1. Wallet footer
  2. Asset/Collectibles context menu
  3. Asset/Collectibles details view
  4. Send Via 1-1 chat
  5. TokenOwnership flows
  6. Profile showcase
  7. Ens name
  8. Stickers
  9. Saved address (wallet + settings)
  10. History view and Transaction details

Architecture compliance

Screenshot of functionality (including design for comparison)

  • I've checked the design and this PR matches it
SendVia1-1Chat.mov
TransferOwnership.mov
TransactionsHistorySend.mov
Screen.Recording.2024-11-05.at.9.49.43.PM.mov
profileShowcaseMenu.mov
BuyStickers.mov
MainWalletSavedAddresses.mov
MainWalletViewSend.mov
RegisterEns.mov

@Khushboo-dev-cpp Khushboo-dev-cpp force-pushed the feat/UpdateLaunchSendModalMechanism branch from 379561d to db6dafa Compare November 5, 2024 18:56
@status-im-auto
Copy link
Member

status-im-auto commented Nov 5, 2024

Jenkins Builds

Click to see older builds (16)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ db6dafa #2 2024-11-05 19:04:00 ~6 min macos/aarch64 🍎dmg
✔️ db6dafa #2 2024-11-05 19:04:40 ~7 min tests/nim 📄log
✔️ db6dafa #2 2024-11-05 19:09:05 ~11 min tests/ui 📄log
✔️ db6dafa #2 2024-11-05 19:16:43 ~19 min linux-nix/x86_64 📦tgz
✔️ db6dafa #2 2024-11-05 19:17:52 ~20 min linux/x86_64 📦tgz
✔️ db6dafa #2 2024-11-05 19:25:17 ~28 min windows/x86_64 💿exe
✔️ 9845809 #3 2024-11-05 20:02:49 ~5 min macos/aarch64 🍎dmg
✔️ 9845809 #3 2024-11-05 20:05:55 ~8 min tests/nim 📄log
✔️ 9845809 #3 2024-11-05 20:09:58 ~12 min macos/x86_64 🍎dmg
✔️ 9845809 #3 2024-11-05 20:10:05 ~12 min tests/ui 📄log
✔️ 9845809 #3 2024-11-05 20:14:48 ~17 min linux/x86_64 📦tgz
✔️ 9845809 #3 2024-11-05 20:17:46 ~20 min linux-nix/x86_64 📦tgz
✔️ ab5fe7f #4 2024-11-06 09:24:19 ~4 min macos/aarch64 🍎dmg
✔️ ab5fe7f #4 2024-11-06 09:27:30 ~7 min tests/nim 📄log
✔️ ab5fe7f #4 2024-11-06 09:30:46 ~11 min macos/x86_64 🍎dmg
ab5fe7f #4 2024-11-06 09:30:56 ~11 min tests/ui 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 5c1e2e7 #5 2024-11-06 09:37:07 ~4 min macos/aarch64 🍎dmg
✔️ 5c1e2e7 #5 2024-11-06 09:40:39 ~7 min tests/nim 📄log
✔️ 5c1e2e7 #5 2024-11-06 09:43:06 ~10 min macos/x86_64 🍎dmg
5c1e2e7 #5 2024-11-06 09:44:32 ~11 min tests/ui 📄log
✔️ 5c1e2e7 #5 2024-11-06 09:52:14 ~19 min linux/x86_64 📦tgz
✔️ 5c1e2e7 #5 2024-11-06 09:53:21 ~20 min linux-nix/x86_64 📦tgz
✔️ 5c1e2e7 #6 2024-11-06 10:16:39 ~13 min tests/ui 📄log
✔️ d389808 #6 2024-11-07 10:48:49 ~5 min macos/aarch64 🍎dmg
✔️ d389808 #6 2024-11-07 10:52:17 ~8 min tests/nim 📄log
✔️ d389808 #6 2024-11-07 10:55:19 ~11 min macos/x86_64 🍎dmg
✔️ d389808 #7 2024-11-07 10:56:36 ~12 min tests/ui 📄log
✔️ d389808 #6 2024-11-07 11:01:47 ~18 min linux/x86_64 📦tgz
✔️ d389808 #6 2024-11-07 11:01:52 ~18 min linux-nix/x86_64 📦tgz
✔️ d389808 #6 2024-11-07 11:11:31 ~27 min windows/x86_64 💿exe

@Khushboo-dev-cpp Khushboo-dev-cpp force-pushed the feat/UpdateLaunchSendModalMechanism branch from db6dafa to 9845809 Compare November 5, 2024 19:57
@Khushboo-dev-cpp Khushboo-dev-cpp marked this pull request as ready for review November 6, 2024 09:18
@Khushboo-dev-cpp Khushboo-dev-cpp requested review from Cuteivist and removed request for a team November 6, 2024 09:18
@Khushboo-dev-cpp Khushboo-dev-cpp force-pushed the feat/UpdateLaunchSendModalMechanism branch from 9845809 to ab5fe7f Compare November 6, 2024 09:19
@Khushboo-dev-cpp Khushboo-dev-cpp force-pushed the feat/UpdateLaunchSendModalMechanism branch from ab5fe7f to 5c1e2e7 Compare November 6, 2024 09:32
… architecture guidelines.

After this change there is not need to pass sendModal instance from AppMain to other parts of app.
Then SendModal should be launched simply by calling Global.openSendModal(....)
@Khushboo-dev-cpp Khushboo-dev-cpp force-pushed the feat/UpdateLaunchSendModalMechanism branch from 5c1e2e7 to d389808 Compare November 7, 2024 10:43
Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

Could be done in a much easier way :)

@@ -241,7 +238,7 @@ QtObject {
Global.openFinaliseOwnershipPopup(actionData)
return
case ToastsManager.ActionType.OpenSendModalPopup:
root.sendModalPopup.open()
Global.openSendModal()
Copy link
Member

Choose a reason for hiding this comment

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

This won't work most likely; the signal needs to be passed all the params

@@ -72,7 +71,13 @@ QtObject {
signal setNthEnabledSectionActive(int nthSection)
signal appSectionBySectionTypeChanged(int sectionType, int subsection, int subSubsection, var data)

signal openSendModal(string address)
signal openSendModal(int sendType, string senderAddress,
Copy link
Member

Choose a reason for hiding this comment

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

... that said, this should/could be a simple function instead, with defaulted parameters, and then you can just re-emit a similar signal with all the parameters, instead of having to fill all the params to this signal here

if (interactive === undefined) interactive = true
if (publicKey === undefined) publicKey = ""
if (ensName === undefined) ensName = ""
if (stickersPackId === undefined) stickersPackId = ""
Copy link
Member

Choose a reason for hiding this comment

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

... and this will become much easier because you will have all the defaults already in

req.preSelectedRecipientType, //recipientType
false, //onlyAssets
true, //interactive
"", //publicKey
Copy link
Member

Choose a reason for hiding this comment

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

... and finally you could omit all the empty/default/uninteresting parameters here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants