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

Delete selected labels #829

Merged
merged 5 commits into from Jun 14, 2019

Conversation

Projects
None yet
4 participants
@delfipolito
Copy link
Contributor

commented Jun 7, 2019

No description provided.

@luisivan luisivan referenced this pull request Jun 7, 2019

Closed

Delete single label #119

3 of 3 tasks complete

@delfipolito delfipolito changed the title [WIP] Delete selected labels Delete selected labels Jun 13, 2019

@delfipolito delfipolito requested review from AquiGorka and bpierre Jun 13, 2019

onClearAll()
}, [onClearAll])
let selectedAddresses = []
addressesSelected.forEach((value, address) => {

This comment has been minimized.

Copy link
@AquiGorka

AquiGorka Jun 14, 2019

Member

Suggestion, use reduce here:

const selectedAddresses = Array.from(addressesSelected.entries()).reduce(
  (array, [address, selected]) => [                                                                                                                                        
    ...array, ...(selected ? [address] : []),
  ], []) 

addressesSelected is an instance of Map

@@ -6,6 +6,7 @@ const identityEventTypes = {
CLEAR: 'CLEAR',

This comment has been minimized.

Copy link
@AquiGorka

AquiGorka Jun 14, 2019

Member

Let's create an issue to remove CLEAR and its accompanying flow methods and props in aragon, aragon.js and aragon-apps

This comment has been minimized.

Copy link
@2color

2color Jun 14, 2019

Contributor

Is remove is completely replacing clear?

This comment has been minimized.

Copy link
@AquiGorka

AquiGorka Jun 14, 2019

Member

Yep, you can clear by removing all

This comment has been minimized.

Copy link
@AquiGorka

AquiGorka Jun 14, 2019

Member

Follow up: #838

@AquiGorka
Copy link
Member

left a comment

🎉 🎉

@AquiGorka AquiGorka referenced this pull request Jun 14, 2019

Closed

Remove CLEAR flow from local identities #838

3 of 3 tasks complete

@AquiGorka AquiGorka force-pushed the delete-single-label branch from b012fa1 to 6333039 Jun 14, 2019

@AquiGorka AquiGorka merged commit 1ef6ec2 into master Jun 14, 2019

3 of 6 checks passed

License Compliance FOSSA is analyzing this commit
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
WIP Ready for review
Details
install install
Details
license/cla Contributor License Agreement is signed.
Details

@AquiGorka AquiGorka deleted the delete-single-label branch Jun 14, 2019

...(selected ? [address] : []),
],
[]
)

This comment has been minimized.

Copy link
@sohkai

sohkai Jul 10, 2019

Member

@AquiGorka Would addressesSelected.entries().filter(([_, selected]) => selected) work just as well in this case?

This comment has been minimized.

Copy link
@AquiGorka

AquiGorka Jul 10, 2019

Member

I do think it would :) - wait, no, scratch that, we'd need to map after the filter to get the addresses:

´addressesSelected.entries().filter(([_, selected]) => selected).map(([address])=>addresss)´

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.