-
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
Finance filters refresh #767
Conversation
- Move TransfersFilters to its own component. - Make the layout work at all sizes. - Update the download button so it looks like the other icon buttons. - Update some labels: “Date range” => “Period”, “Transfer type” = “Type” (since it is already below the “Transfers” title).
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.
These changes are a great improvement to the general layout of the screen and the 'Export' action is now consistent with the style and behavior of the icon button component 🚀🤘
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.
🥇
@dizzypaty I do like having the "button" look to the download button; right now I get a bit confused if I can actually click on it or not.
On the mobile view as well, what do you think about centering the icon in the cell?
@@ -128,7 +123,7 @@ class Transfers extends React.PureComponent { | |||
const { selectedDateRange } = this.state | |||
const start = format(selectedDateRange.start, 'yyyy-MM-dd') | |||
const end = format(selectedDateRange.end, 'yyyy-MM-dd') | |||
return `Finance_(${start}_to_${end}).csv` | |||
return `transfers_${start}_to_${end}.csv` |
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.
Could we use the Finance app's proxy address here, like 0x1a0adf8909(Finance)_transfers_...
transferTypeFilter={selectedTransferType} | ||
onTransferTypeChange={this.handleTransferTypeChange} | ||
compactMode={compactMode} | ||
opened={filtersOpened} |
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.
Could we move compactMode
and opened
to the top of the props list?
compactMode={compactMode} | ||
opened={filtersOpened} | ||
symbols={symbols} | ||
transferTypes={TRANSFER_TYPES_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.
Could we rename symbols
to tokenSymbols
, and move it together with the token filter and onchange handler?
Similarly, could we move transferTypes
to be with the transfer type filter and onchange handler?
key={transfer.transactionHash} | ||
token={tokenDetails[toChecksumAddress(transfer.token)]} | ||
transaction={transfer} | ||
smallViewMode={compactMode} |
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.
Maybe we can also rename smallViewMode
to compactMode
?
margin: 0; | ||
justify-content: space-between; | ||
margin-left: 0; | ||
margin-right: 0; |
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.
Seems like we don't need these two margin declarations
{filteredTransfers.length === 0 ? ( | ||
<NoTransfers> | ||
<p> | ||
No transfers found.{' '} |
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.
Could we also add the date period here? I think it's a bit confusing that we automatically apply the dates so a lot of users will just see "No transfers found." if they haven't made a transaction in the current month.
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.
What about making it clearer that filters are applied in general?
No transfers found with the current filters.
[Clear current filters?]
/cc @dizzypaty
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.
Yes, I agree with making it general – how about we say:
"No transfers match your filter selection. Clear filters"
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.
I still think it'd be really useful to show the date range being applied, because at first glance it'll appear immediately broken if there's no transactions and the user knows their finance app had transactions previously.
This is especially true on mobile, where the filters are hidden by default.
Another problem is that we'd need a definition for what "clear filters" mean for the date range. Should we just set it to Nov of last year (since it's when it launched)? Should we be smarter and set it based on the app's initialization block time (actions are only possible on the app after it's been initialized)?
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.
Oh right, I was assuming the date range was not applied until the user selects one!
@sohkai I think your solution would be an improvement in the current state of things, but it would still be quite confusing on mobile with the current design in some cases: if there is let’s say one item, and the others are hidden, nothing would indicate the current date range as it is only displayed in the empty state.
About the “clear filters”: what about the case where a specific date range has been selected, but also another filter? Do we reset the date range as well? Or do we consider it not being a filter?
I think it could be easier for the time being to only apply the date range once the user selects it (having the field empty by default), like the other filters, at least until this part gets redesigned.
Thoughts @dizzypaty @sohkai?
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.
I think it could be easier for the time being to only apply the date range once the user selects it (having the field empty by default), like the other filters, at least until this part gets redesigned.
I think this would be preferable, but does the component allow us to do this? It might look weird being completely blank as its default state.
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.
@sohkai, @bpierre I also assumed none of filters were applied until users selection.
Having a look at this with more detail now:
- Date range should be deselected by default (until user makes a date selection)
- We should indicate today’s date with a slightly different visual style than the date selection – will do a quick mock-up!
- We should include a ‘Clear all’ button, that removes the current filter selection
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.
@sohkai , @bpierre Based on the previous comments, these are some changes to the date range filter:
Default state (no filters applied, calendar displays today's date)
Date range selected
Filters applied
Note: after trying a couple of things yesterday, I think we can leave the 'Clear filters' button out of these changes for the release and then rethink the layout properly.
3 similar comments
If we decide to go with a “solid” button style, I think we should also align the filters button with it, and have a consistent button style for “icon buttons on the blue background” (assuming the confusion comes from having these buttons on the blue background?).
Everything else (the filters on the left, and the filter button above it) is either left or right aligned. Having this specific button slightly misaligned with the filters button above wouldn’t look good IMO. But what might look a bit weird is that we are aligning the header icons on the illustrations directly, while the icon buttons are aligned on the button around it, including its padding: For these cases, I think we could shift these buttons so they look aligned, the same way we do it already with text buttons. The And after the icons internal spacing will be more consistent (see https://github.com/aragon/aragon-ui/pull/346), we could also move these buttons But if we decide to use another style for these (the filters toggle and the export button), then we could also move the label inside of it (to have an icon + label button), and maybe only have the icon in smaller views. |
Mmm the left / right alignment makes sense 👍.
Yes, I think so. The other filters "pop out" with a box shadow and look like they're meant to be interacted with. |
I agree @sohkai and I think we need to explore a different visual style for these icon buttons in general, even more so if they're displayed on the blue background. We need to define a rationale for our layer and depth logic (mainBG, buttonsBG, popovers/modals, etc.) and keep it consistent so it's clearer when UI elements are interactive. Until we do this, my inclination would be to keep the way we present these icon buttons consistent, and we have 3 of them in this screen. |
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.
👍🏻
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.
✔️ ✅ ☑️
@dizzypaty Can you make a new issue for the default state of the date picker?
|
Improve the filters layout: - Move TransfersFilters to its own component. - Make the layout work at all sizes. - Update the download button so it looks like the other icon buttons. - Update some labels: - “Date range” => “Period” - “Transfer type” => “Type” (since it is already below the “Transfers” title). - Select the last 90 days (rolling) by default.
Builds on #765 (don’t merge before).
Rationale
Before
After