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
Group by Sender and Recipient #567
Conversation
Codecov Report
@@ Coverage Diff @@
## master #567 +/- ##
==========================================
+ Coverage 47.24% 47.27% +0.03%
==========================================
Files 338 338
Lines 17527 17560 +33
Branches 1335 1345 +10
==========================================
+ Hits 8280 8302 +22
- Misses 9214 9225 +11
Partials 33 33
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
One small change on frontend, otherwise code lgtm and tested.
Don't have enough context/looked into it enough to understand group joining strategies well
<OptGroup label={"Sender"}> | ||
{senderGroups.map(group => { | ||
return ( | ||
<Option key={group}>{allowedGroups[group]["name"]}</Option> | ||
); | ||
})} | ||
</OptGroup> | ||
} | ||
if(recipientGroups) | ||
{ | ||
<OptGroup label={"Recipient"}> | ||
{recipientGroups.map(group => { | ||
return ( | ||
<Option key={key}> | ||
{toTitleCase(replaceUnderscores(key))} | ||
</Option> | ||
<Option key={group}>{allowedGroups[group]["name"]}</Option> | ||
); | ||
}) | ||
: null} | ||
})} | ||
</OptGroup> |
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.
Taking a hint out of @enjeyw OptGroup PR, can we add showing the group name once selected. See example from filter.jsx
let subList = keys.map(key => {
//Here we show the label without the group in the dropdown, but with the group once selected
let label = replaceUnderscores(possibleFilters[key]["name"] || key);
return (
<Option key={key} label={label}>
{label.replace(userGroup, "")}
</Option>
);
});
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.
Fixed!
@@ -49,7 +69,11 @@ def build_query_group_by_with_join(self, query, query_object_model): | |||
args = (grouped_query, self.custom_attribute_field_name) | |||
else: | |||
args = (grouped_query,) | |||
return group_joining_strategies[query_object_model.__tablename__][self.group_object_model.__tablename__](*args) | |||
if self.sender_or_recipient == 'recipient': |
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.
self.sender_or_recipient == 'recipient':
sorry coming into this code without context but this seems strange?
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.
Context for this change is here, this is just extending the feature to groups from an existing feature for 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.
good to go!
* master: feat: small improvements to accessibility across the web app (#562) Group by Sender and Recipient (#567) Enable multiple chains (#496) Silence loading spinner warning (#568) Custom attribute bugfix (#549) Antify Message Bar (#566) # Conflicts: # config.py # eth_worker/eth_src/celery_app.py # eth_worker/eth_src/sql_persistence/interface.py
* master: (28 commits) Adding blockchain_task_uuid index to worker messages (#551) Make location lookup look at existing users' coordinates as a last resort (#555) Add support for Commcare (#569) Improve external transaction detection (#570) Remove unused imports (#571) Celo integration (#535) feat: small improvements to accessibility across the web app (#562) Group by Sender and Recipient (#567) Enable multiple chains (#496) Silence loading spinner warning (#568) Custom attribute bugfix (#549) Antify Message Bar (#566) Stop retrying infinitely (#565) Only update BlockchainTransaction on the worker when we absolutely have to (#564) Make SynchronizedBlock be updated in batch instead of one giant update (#563) Hide Filters and Groups (#558) adding more colors to charts, and tweaking legends (#561) Chart Tweaks (#560) Recipients filter (#533) Dynamic transfer card loaded (#559) ... # Conflicts: # app/server/api/transfer_card_api.py # app/test_app/functional/api/test_transfer_card_api.py
Describe the Pull Request
Adds ability to group by sender and recipient! Also adds ability to hide them!
Todo