-
Notifications
You must be signed in to change notification settings - Fork 212
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
Agent: read-only UI #1082
Agent: read-only UI #1082
Conversation
Thanks for opening this pull request! Someone will review it soon 🔍 |
…ify badges, cosmetic enhancements
They got included in the merge commit 0fe37e3, even though the merge commit indicates a clean merge (no changes at all).
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.
Haven't looked at a few of the components, but leaving a few notes here first :).
Overall looking really good, let's save some of the web3-specific stuff that I commented on for the end!
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.
A couple more notes and suggestions on the components themselves and most should be pretty quick to address!
I noticed we could do another round of clean up in the agent/app
folder itself; let's:
- Run the linter
- Remove any unused components and assets
@@ -47,6 +50,8 @@ function useFilteredTransactions({ transactions, tokens }) { | |||
|
|||
// Exclude by date range | |||
if ( | |||
// We're not checking for and end date because we will always |
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.
Finance checks both the start and end dates in its filtering implementation, but a small change we could make is to program defensively (and against any "app assumptions") in both of these apps by using something like:
!selectedDateRange.start && isAfter(new Date(date), selectedDateRange.start) &&
!selectedDateRange.end && isAfter(new Date(date), selectedDateRange.end)
apps/agent/app/src/script.js
Outdated
@@ -278,20 +289,9 @@ async function newExecution(state, event, settings) { | |||
}) | |||
.filter(Boolean) | |||
|
|||
if (ethValue && ethValue !== '0') { | |||
tokenTransfers.push({ |
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.
Ah actually, I just realized a better way to do this is with [].unshift()
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.
Just a few last comments but looks good to merge otherwise!
Let's just make sure to update the current app's text before merging this one :).
* Agent: add initial background script * Agent: update script to pass transaction hashes * Agent: rename `address` to `token` for token address inside tokenTransfers * Agent: handle ProxyDeposit events * Integrate darkmode, fix script initialization, heavy component refactor * Add correct transaction types * Temporarily correct transfer bugs to repair build * Fix dataview design debt * Working multiple token transfers * Update aragon ui, use tokenIconUrl() for tokens * Fix token icons * Add custom badge functionality * Fix token display, add colors to entry expansion * Fix double scroll UI bug :-) * Fix mobile network bug, add initial filtering * Demo-ready * Find target contract interaction if there are no token transfers, modify badges, cosmetic enhancements * Minor cosmetic refactor * Refactor script, memoize transaction list * Cosmetic code cleanup * Revert empty results memoization * Refactor transactions, add proper mobile view and other points from design QA * Code cleanup * ESLint: add exhaustive deps * ESLint fixes * Optimize SVG * Add code review suggestions * Correct format error, remove console logs * Remove lodash throttle, remove firefox translate3d fix * Remove unused prop * Use ROUNDING_AMOUNT * Fix addresses not resolving on CSV * Fix badges taking column width * Non-breaking spaces * Create CSV data on demand * Date formats * Use DataView empty state * Code style * CSV files: escape double quotes in content * CSV: add type * Remove TRANSACTION_TYPES_STRING * Fix aragonUI update breaking changes * Manually checkout the other apps They got included in the merge commit 0fe37e3, even though the merge commit indicates a clean merge (no changes at all). * Manually checkout future-apps * More cleanup after the manual checkout * Remove unused component * Apply most code review suggestions * Change 'marshal' to 'marshalTransactionDetails' * Remove agent ABIs, fix entity logic for badges, minor cosmetic code changes * Add agent app address and transaction hash to file * use event target to get the target contract * Remove console log and unused findTargetFromReceipt function in token-utils * Update manifest.json and add screenshots * Agent: Fix test color on dataview expansion Co-authored-by: Brett Sun <qisheng.brett.sun@gmail.com> Co-authored-by: Pierre Bertet <hello@pierre.world>
This PR gives the Agent App a read-only UI for balances and transactions. Further improvements will be made in the future with this initial implementation.
Todos: