-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add PreMintButton and ReserveRangeButton #983
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #983 +/- ##
=======================================
Coverage 90.98% 90.98%
=======================================
Files 176 176
Lines 7187 7187
Branches 1322 1322
=======================================
Hits 6539 6539
Misses 648 648
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@levalleux-ludo I've opened a new pull request, #985, to work on those changes. Once the pull request is ready, I'll request review from you. |
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.
Pull Request Overview
This PR adds support for price discovery offers in the Boson Protocol, which are offers where the price is determined dynamically rather than being static. The changes include new UI components for managing price discovery ranges and pre-minting vouchers, as well as updates to display price discovery offers with special formatting (showing "Price on discovery" with "??" instead of a numeric price).
Key changes:
- Adds two new CTA button components:
ReserveRangeButtonandPreMintButtonfor managing price discovery functionality - Updates price display logic to show "Price on discovery" with "??" for discovery-type offers
- Disables commit buttons for price discovery offers
- Adds
mintedfield to GraphQL subgraph queries for range tracking - Removes unused
BOSON_META_TX_ABIenvironment variable from docker-compose
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react-kit/src/components/cta/offer/ReserveRangeButton.tsx | New component for reserving ranges in price discovery offers |
| packages/react-kit/src/components/cta/offer/PreMintButton.tsx | New component for pre-minting vouchers for price discovery offers |
| packages/react-kit/src/stories/cta/offer/ReserveRangeButton.stories.tsx | Storybook story for ReserveRangeButton component |
| packages/react-kit/src/stories/cta/offer/PreMintButton.stories.tsx | Storybook story for PreMintButton component |
| packages/react-kit/src/index.tsx | Exports new ReserveRangeButton and PreMintButton components |
| packages/react-kit/src/components/price/Price.tsx | Adds conditional rendering for price discovery offers showing "Price on discovery" |
| packages/react-kit/src/components/productCard/ProductCard.tsx | Adds isPriceDiscoveryOffer prop and passes it to CurrencyDisplay |
| packages/react-kit/src/components/currencyDisplay/CurrencyDisplay.tsx | Displays "??" for price discovery offers instead of numeric value |
| packages/react-kit/src/components/modal/components/common/detail/DetailViewCore.tsx | Passes price discovery flag to Price component in detail view |
| packages/react-kit/src/components/modal/components/common/OfferFullDescription/GeneralProductData.tsx | Passes price discovery flag to Price component in product data |
| packages/react-kit/src/components/modal/components/Commit/DetailView/InnerCommitDetailView.tsx | Disables commit button for price discovery offers |
| packages/react-kit/src/components/modal/components/Commit/DetailView/InnerCommitDetailViewWithPortal.tsx | Disables commit button for price discovery offers in portal view |
| packages/react-kit/src/stories/ProductCard.stories.tsx | Adds isPriceDiscoveryOffer prop to story args |
| packages/core-sdk/src/subgraph.ts | Adds minted field to all RangeEntity fragments in generated GraphQL types |
| packages/core-sdk/src/offers/queries.graphql | Adds minted field to BaseRangeFields fragment |
| e2e/docker-compose.yml | Removes unused BOSON_META_TX_ABI environment variable |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
{{what was done}}
How to test
{{how can it be tested}}