Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Make sure buttons update when their enablement has changed #trivial #926

Merged
merged 1 commit into from
Jan 8, 2018

Conversation

sarahscott
Copy link
Contributor

@sarahscott sarahscott commented Jan 8, 2018

Fixes https://github.com/artsy/collector-experience/issues/849

This button relies on the presence of an onPress prop to be enabled/disabled; before, this check only happened in the constructor. Now it should check to see if its status has changed in componentDidUpdate.

This shows the button being enabled and then disabled based on consignments information (ignore animation warnings):

buttonstatechanges

#skip_new_tests

@sarahscott sarahscott assigned orta and alloy and unassigned orta Jan 8, 2018
@sarahscott sarahscott requested a review from orta January 8, 2018 11:13
@ArtsyOpenSource
Copy link

ArtsyOpenSource commented Jan 8, 2018

Warnings
⚠️

Missing Test Files:

  • src/lib/Components/Buttons/__tests__/Button-tests.tsx

If these files are supposed to not exist, please update your PR body to include "#skip_new_tests".

Generated by 🚫 dangerJS

@alloy
Copy link
Contributor

alloy commented Jan 8, 2018

This logic in the button component sorely needs some unit tests. Can you please do that asap after we’ve shipped 4.0.0?

@sarahscott
Copy link
Contributor Author

Agreed! I'll file a ticket.

@alloy alloy merged commit a91d866 into master Jan 8, 2018
@alloy alloy deleted the sos-button-state-fix branch January 8, 2018 12:28
@artsy-peril
Copy link
Contributor

artsy-peril bot commented Jan 8, 2018

Warnings
⚠️

It looks like code was changed without adding anything to the Changelog

Generated by 🚫 dangerJS

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants