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

[AUCT-744] iOS request condition report #2050

Merged
merged 21 commits into from
Feb 7, 2020
Merged

[AUCT-744] iOS request condition report #2050

merged 21 commits into from
Feb 7, 2020

Conversation

bhoggard
Copy link
Contributor

I don't think I can finish this PR this week, so I'm hoping @erikdstock or @yuki24 can take it over.

Screen Shot 2020-01-21 at 4 53 21 PM

@bhoggard bhoggard requested review from yuki24 and erikdstock January 21, 2020 21:54
@bhoggard bhoggard self-assigned this Jan 21, 2020
Copy link
Contributor

@yuki24 yuki24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far so good 👍 I think @dblandin might want to review this PR as well since he just worked on a similar change in Reaction artsy/reaction#3099 and I see a lot of similar bits of code here.

Let me know if you need help for writing tests.

@brainbicycle brainbicycle changed the title [AUCT-744] iOS request condition report WIP WIP - [AUCT-744] iOS request condition report Jan 30, 2020
Remove redundant condition section

Test artwork details condition section

Remove unused context module in schema
…uest

Allow modifying textAlign in Modal, center aligning lot condition request

Remove unused import
Workaround for modal layout issues, tests for feature flag, see details

Workaround modal top margin affecting layout

Undo accidental padding change in modal

Fix test add feature flag disabled test

Type assertion as string for other list items
@brainbicycle brainbicycle changed the title WIP - [AUCT-744] iOS request condition report [AUCT-744] iOS request condition report Feb 5, 2020
@brainbicycle
Copy link
Contributor

brainbicycle commented Feb 5, 2020

Alright this is finally ready for review:

Corresponding PR in reaction:

artsy/reaction#3099

Successfully requesting a condition report

requestCondtionReportSuccess

Error on requesting a condition report

requestConditionError

Notes:

  • The black background for the button loading state is not the desired behavior from palette: Slack thread. I am going to follow up with a PR there to fix this.

Copy link
Contributor

@ds300 ds300 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So good! 🙌 Amazing job on the tests ✨

Had one question about the circle config file, and then a few smaller suggestions but overall I really appreciate how thorough and clear this code is ❤️

Use optional chaining for lab option

Remove unused mutationMessage param, cleanup promise completion

Add explicit type to state

Consolidate loading state updates
@@ -58,4 +59,89 @@ describe("Artwork Details", () => {
expect(component.text()).not.toContain("Frame")
expect(component.text()).not.toContain("Signature")
})

it("shows condition description if present and not biddable", () => {
const artworkDetailsInfo = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: but is it possible to provide a type to this fixture? I think we would want to type with RequestConditionReport_artwork

Copy link
Contributor

@ds300 ds300 Feb 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call!

I think the preferred way to do this these days is to use the @raw_response_type annotation (e.g.) on the test query and then index into the generated *RawResponse type (e.g.).

Copy link
Contributor

@brainbicycle brainbicycle Feb 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I added a type for the fixtures, good idea! Here the type is ArtworkDetails_artwork and there isn't a test query (I didn't write this original test). However I am happy to refactor to use a test query if you want just let me know.

Use passed in relay environment

Use passed in relay environment

Updates tests with new relay prop

Typifying artwork in artworkDetails tests

Add relay prop to analytics tests
Copy link

@dleve123 dleve123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - merge at your discretion

Type safety in requestCondition report tests

Add return type in requestConditionReport promise
@brainbicycle brainbicycle requested a review from ds300 February 6, 2020 21:59
@ds300 ds300 merged commit 9bfdb24 into master Feb 7, 2020
@ds300 ds300 deleted the AUCT-744 branch February 7, 2020 11:02
@artsyit
Copy link
Collaborator

artsyit commented Feb 7, 2020

🚀 PR was released in v1.21.40 🚀

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

Successfully merging this pull request may close these issues.

8 participants