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: Kiln widget #3962

Merged
merged 54 commits into from
Sep 12, 2024
Merged

Feat: Kiln widget #3962

merged 54 commits into from
Sep 12, 2024

Conversation

compojoom
Copy link
Contributor

@compojoom compojoom commented Jul 17, 2024

Screenshot 2024-08-26 at 16 02 15

Other changes

  • Staking and Swaps share a lot of components, so we've extracted some of the Swaps components to generic components.
  • Method call and parameters for Swaps were moved to the Advanced details to be consistent with other tx types (see https://dinky.dog/?q=tx-details_f481530497111930).
  • All other tx types, where we previously weren't displaying method call and parameters at all, will have that block also in Advanced details.

Copy link

github-actions bot commented Jul 17, 2024

Copy link

github-actions bot commented Jul 17, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

github-actions bot commented Jul 17, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 953.35 KB (🟡 +3.74 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

New Page Added

The following page was added to the bundle from the code in this PR:

Page Size (compressed) First Load
/stake 589 B 953.92 KB

Thirteen Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/apps 50.18 KB (-2 B) 1003.53 KB
/apps/custom 41.79 KB (-2 B) 995.14 KB
/apps/open 54.74 KB (🟡 +1.16 KB) 1008.09 KB
/home 60.25 KB (🟢 -73 B) 1013.6 KB
/settings/safe-apps 25.55 KB (-2 B) 978.9 KB
/settings/setup 35.95 KB (-3 B) 989.3 KB
/swap 723 B (🟡 +77 B) 954.05 KB
/transactions 73.47 KB (🟢 -374 B) 1 MB
/transactions/history 73.43 KB (🟢 -376 B) 1 MB
/transactions/messages 39.12 KB (🟢 -79 B) 992.47 KB
/transactions/msg 29.5 KB (🟢 -79 B) 982.85 KB
/transactions/queue 31.22 KB (🟢 -79 B) 984.57 KB
/transactions/tx 21.05 KB (🟢 -79 B) 974.4 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link

github-actions bot commented Jul 17, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.25% (-0.2% 🔻)
11937/15254
🔴 Branches
58.3% (-0.7% 🔻)
3053/5237
🟡 Functions
65.43% (-0.39% 🔻)
1887/2884
🟡 Lines
79.74% (-0.15% 🔻)
10774/13511
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / index.tsx
75% 100% 0% 100%
🟢
... / index.tsx
60% 100% 0% 100%
🟢
... / index.tsx
85.71% 0% 0% 100%
🟢
... / Deposit.tsx
83.33% 0% 0% 90.91%
🟢
... / ConfirmationOrderHeader.tsx
75% 0% 0% 85.71%
🟡
... / index.tsx
71.43% 0% 0% 76.92%
🟢
... / index.tsx
77.78% 0% 0% 87.5%
🟡
... / index.tsx
55.56% 0% 0% 62.5%
🔴
... / index.tsx
45.45% 0% 0% 50%
🟢
... / Exit.tsx
75% 0% 0% 85.71%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / transaction-guards.ts
70.27% (-5.98% 🔻)
36.21% (-12.73% 🔻)
68.42% (-6.09% 🔻)
71.88% (-7.02% 🔻)
🟡
... / formatters.ts
74.14% (-3.22% 🔻)
57.14% (-4.4% 🔻)
76.92% (-6.41% 🔻)
74.42% (-2.5% 🔻)
🟡
... / extractTxInfo.ts
68.75% (-7.99% 🔻)
39.22% (-6.24% 🔻)
100%
68.09% (-8.11% 🔻)
🟢 src/utils/url.ts
82.35% (-2.83% 🔻)
100%
80% (+5% 🔼)
89.29% (-6.37% 🔻)
🟢
... / index.tsx
86.84% (+7.43% 🔼)
39.39% (-2.54% 🔻)
50%
86.11% (+7.99% 🔼)
🟢
... / useIsRecoverySupported.ts
100%
50% (-50% 🔻)
100% 100%
🟢
... / index.tsx
87.06% (-0.58% 🔻)
75.56% (+0.56% 🔼)
50%
86.42% (-0.64% 🔻)
🔴
... / index.tsx
56% (-0.52% 🔻)
0% 20%
59.09% (-0.91% 🔻)
🟡
... / index.tsx
71.15% (-0.54% 🔻)
11.43% (+0.32% 🔼)
66.67%
72% (-0.55% 🔻)
🟢
... / index.tsx
100%
50% (-50% 🔻)
100% 100%
🟡
... / index.tsx
66.67% (-2.08% 🔻)
0% 0%
70.97% (-2.37% 🔻)
🟢
... / index.tsx
75% (-13.89% 🔻)
100% 0% 100%
🟡
... / useTransactionType.tsx
62.22% (-5.22% 🔻)
37.78% (-1.76% 🔻)
100%
62.79% (-5.5% 🔻)
🟡
... / index.tsx
73.97% (-1.37% 🔻)
60.61% (+1.99% 🔼)
40%
73.91% (-1.45% 🔻)

Test suite run success

1484 tests passing in 203 suites.

Report generated by 🧪jest coverage report action from 5adb8ea

Copy link

github-actions bot commented Jul 30, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@compojoom compojoom changed the title Test Kiln widget Aug 6, 2024
Copy link

github-actions bot commented Aug 6, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@compojoom compojoom force-pushed the feat-staking-kiln branch 2 times, most recently from b443464 to 5d548c5 Compare August 6, 2024 15:08
Copy link

github-actions bot commented Aug 13, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

github-actions bot commented Aug 21, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

github-actions bot commented Aug 23, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

export const OrderFeeConfirmationView = ({
order,
}: {
order: Pick<SwapOrderConfirmationView | TwapOrderConfirmationView, 'fullAppData'>
Copy link
Member

Choose a reason for hiding this comment

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

Replace with AnySwapConfirmationView?

@katspaugh katspaugh marked this pull request as ready for review September 10, 2024 12:43
onDismiss={dismissQueueBar}
transactions={transactions}
/>
{!isNativeEmbed && (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a bit unclear why a native Embed wouldn't have the transactionQueueBar. I remember talking to @schmanu and I think he likes the bar and even wanted to have it for the swap feature.

Maybe a more explicit name such as "hideTransactionBar" is more appropriate? But then I see above that we are also removing the page title... and also not emitting tracking events.

Copy link
Member

Choose a reason for hiding this comment

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

I think native swaps and native staking are both basically full screen Safe apps. So I do not see a reason to hide the queue bar if there are transactions in the queue.
Especially if some actions require multiple interactions, forcing users to switch context means that likely the widgets will load back into their original state so some context could be lost.

Copy link
Member

@katspaugh katspaugh Sep 10, 2024

Choose a reason for hiding this comment

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

I'm not against keeping it. It's just not consistent with other pages. Why don't we show it on all pages except for the queue itself?

Copy link
Member

Choose a reason for hiding this comment

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

Anyway, I removed the check that hides the queue bar.

}
}

const TokenInfoPair = ({ blocks, showArrow }: { blocks: [InfoBlock, InfoBlock]; showArrow?: boolean }) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

That name is a small lie & you know it :)
Maybe a better name would be BlockInfoPair?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe ConfirmationOrderHeader?

const chainId = useChainId()
const isMethodCallInAdvanced = !showMethodCall || isMultisend
const isMultisend = !!decodedData?.parameters?.[0]?.valueDecoded
const isMethodCallInAdvanced = !showMethodCall || (isMultisend && showMultisend)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The showMultisend here is confusing. Now the name is isMethodCallInAdvanced, but since showMultisend could be false this would also be false, despite the method call being in advanced. I'm more for havign showMultisend inside of the render.

Copy link
Member

Choose a reason for hiding this comment

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

Just to make sure we understand the same logic. We move the method name and parameters to Advanced details in two cases:

  • When showMethodCall is set to false in props
  • When it's a multi-send and showMultisend from props is true

How would you make this less confusing?

Copy link
Member

Choose a reason for hiding this comment

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

Let's leave it like this for now as @clovisdasilvaneto and I are refactoring this more comprehensively.

Copy link

github-actions bot commented Sep 11, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@liliya-soroka
Copy link
Member

liliya-soroka commented Sep 11, 2024

@katspaugh , regression issue :
call .... on contract is missing on the swap tx details after refactoring
image

According to the design for staking it should not be hidden under the advanced parameters. Could we leave it , as it was previously and leave it according to the expected design - https://www.figma.com/design/ih2mM8bt8rNwbwV9EMmWF5/Staking?node-id=3166-8821&t=koQt4lxTOPWuHFVT-4


Edit by @katspaugh:

I've updated the description with a justification for this change + linked to a diagram. ✅

@liliya-soroka
Copy link
Member

liliya-soroka commented Sep 11, 2024

  1. colour of the state is also changed to the different from the expected according tot he design :
image Expected: image

Edit by @katspaugh:

Fixed ✅

Copy link

github-actions bot commented Sep 11, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@katspaugh katspaugh merged commit 2fcd8fc into dev Sep 12, 2024
16 checks passed
@katspaugh katspaugh deleted the feat-staking-kiln branch September 12, 2024 13:50
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants