feat(EMI-3174): create offer history component#17405
Conversation
10d6ea5 to
b481afd
Compare
#9086 Bundle Size — 8.96MiB (+0.15%).e7fac50(current) vs aa73561 main#9083(baseline) Warning Bundle contains 29 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch daria/EMI-3174/create-offer-hist... Project dashboard Generated by RelativeCI Documentation Report issue |
There was a problem hiding this comment.
Pull request overview
Adds an “Offer history” expandable to the Order2 Respond / Counteroffer flow so collectors can review the full negotiation when submitted offers exist.
Changes:
- Render a new
Order2OfferHistorysection on the respond page and spread its Relay fragment. - Implement
Order2OfferHistoryUI to list submitted offers with amount and (when available) buyer total. - Add Jest coverage for the expandable rendering behavior and the “INCOMPLETE ORDER” fallback.
Reviewed changes
Copilot reviewed 3 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Apps/Order2/Routes/Respond/Order2RespondApp.tsx | Renders the new offer history component and includes its fragment spread. |
| src/Apps/Order2/Routes/Respond/Components/Order2OfferHistory.tsx | New expandable UI to display submitted offer rows (date/source/amount/total). |
| src/Apps/Order2/Routes/Respond/Components/tests/Order2OfferHistory.jest.tsx | New RTL tests for rendering, expanding, and incomplete total behavior. |
| src/generated/order2Routes_RespondQuery.graphql.ts | Relay artifact update to fetch submitted offers and related fields for respond route. |
| src/generated/Order2RespondApp_order.graphql.ts | Relay fragment artifact update to include the new Order2OfferHistory spread. |
| src/generated/Order2OfferHistoryTestQuery.graphql.ts | New Relay test operation artifact for the offer history component tests. |
| src/generated/Order2OfferHistory_order.graphql.ts | New Relay fragment artifact for Order2OfferHistory. |
Files not reviewed (4)
- src/generated/Order2OfferHistoryTestQuery.graphql.ts: Generated file
- src/generated/Order2OfferHistory_order.graphql.ts: Generated file
- src/generated/Order2RespondApp_order.graphql.ts: Generated file
- src/generated/order2Routes_RespondQuery.graphql.ts: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
| backgroundColor={isSeller ? "mono0" : "mono5"} | ||
| > | ||
| <Box flex={COLUMNS[0]}> | ||
| <Text variant="sm" justifySelf="flex-start"> |
There was a problem hiding this comment.
On mobile, the table text is xm in the design, which will help some of the crowding
rquartararo
left a comment
There was a problem hiding this comment.
Looks good! just left a comment about text size on mobile
The type of this PR is: Feat
This PR solves EMI-3174
Description
Adds an "Offer history" expandable (Palette Expandable, toggle arrow) to the respond/counteroffer page so a collector can review the full negotiation.
Renders only when there are submitted offers
buyerTotal(the offer total incl. shipping & taxes) is not defined for incomplete/original offers. Shipping & taxes can't be computed until the order is further along. For those rows the last column renders "INCOMPLETE ORDER" instead of an amount. The bare offer amount is still shown. So an offer history can legitimately contain a mix of complete rows (with a total) and incomplete rows (without). I will raise it during the QA or earlier to confirm the approach and/or copy.