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: Add custom transactions action card #3849

Conversation

iamsamgibbs
Copy link
Contributor

@iamsamgibbs iamsamgibbs commented Dec 4, 2024

Description

This PR adds the custom transactions card to the manage colony drawer and updates it in the action select dropdown.

Figma file: https://www.figma.com/design/l1dOM5qiQYwF0ElvKDqqjg/Design-System---Colony-v3?node-id=6111-2669&t=49uR3c8BmTwlpEbS-4

Testing

  • Click "Manage colony" and check Custom transactions appears in the list
Screenshot 2024-12-04 at 17 42 05
  • Click the custom transactions card and check it appears in the action select dropdown under the admin section
Screenshot 2024-12-04 at 17 49 24
  • Disabled the arbitrary transactions feature flag and make sure it does not appear in either of these lists

Diffs

New stuff

  • Custom transactions card added to manage colony group

Changes 🏗

  • Arbitrary transaction renamed to Custom transactions and moved to admin section

Resolves #3844

@iamsamgibbs iamsamgibbs self-assigned this Dec 4, 2024
@iamsamgibbs iamsamgibbs marked this pull request as ready for review December 4, 2024 18:10
@iamsamgibbs iamsamgibbs requested a review from a team as a code owner December 4, 2024 18:10
@iamsamgibbs iamsamgibbs linked an issue Dec 4, 2024 that may be closed by this pull request
3 tasks
Copy link
Contributor

@bassgeta bassgeta left a comment

Choose a reason for hiding this comment

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

Nice one, those hooks are going to be quite handy 😎
Custom transactions appears ✔️
image
The same for the dropdown ✔️
image
Gone when disabling the feature flag 😎
image

Copy link
Collaborator

@jakubcolony jakubcolony left a comment

Choose a reason for hiding this comment

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

Looks great! 💯
Thanks for picking this up @iamsamgibbs!

image image

Comment on lines +148 to +153
if (!isFeatureFlagArbitraryTxsEnabled) {
const arbitraryTxsIndex = actionsListOptions[4].options.findIndex(
({ value }) => value === Action.ArbitraryTxs,
);

actionsListOptions[4].options.splice(arbitraryTxsIndex, 1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

To remove the hardcoded array index, how about using array spread to dynamically add arbitrary transactions to the options array?

Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

Shows up as expected. Nicely done!

Screencast.from.2024-12-06.17-18-26.mp4

@iamsamgibbs iamsamgibbs merged commit 9884ec0 into feat/arbitrary-txs Dec 6, 2024
1 check passed
@iamsamgibbs iamsamgibbs deleted the feat/3844-add-custom-transactions-action-card branch December 6, 2024 16:33
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.

[Arbitrary Txs] Add Custom transactions action card
4 participants