feat(native): flesh out DatePicker, BarChart, and CommonChartComponents#3370
Open
pranaybagrecharzp wants to merge 2 commits intomasterfrom
Open
feat(native): flesh out DatePicker, BarChart, and CommonChartComponents#3370pranaybagrecharzp wants to merge 2 commits intomasterfrom
pranaybagrecharzp wants to merge 2 commits intomasterfrom
Conversation
- DatePicker.native.tsx (~530 lines): Tier-1 native picker building out the prior scaffold. Full input + calendar wiring for the React Native target. - Charts/BarChart/BarChart.native.tsx (~470 lines): Tier-1 native bar chart implementation, previously a stub. - Charts/CommonChartComponents/CommonChartComponents.native.tsx + index.ts + tokens.ts: shared native helpers / tokens used by the chart components. - utils/storybook/componentStatusData.ts: bumps DatePicker / BarChart status rows to reflect the new native coverage. Driven by the Razorpay merchant mobile app's Blade v12 migration, where the prior native stubs were insufficient for the home/payments screens.
🦋 Changeset detectedLatest commit: 207237f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
✅ PR title follows Conventional Commits specification. |
Collaborator
🛡️ Coverage ReportSummaryFull Coverage Details |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
…ative
The web Toast is built on top of `react-hot-toast`, which is web-only and
crashes the React Native bundle at module-load time. This commit ships an
RN-native equivalent with the same public API:
* `Toast.native.tsx` — single-toast renderer using Animated.View slide/fade,
Blade Box layout, IconButton dismiss, optional Button action, and the
same iconMap (positive/negative/notice/information/neutral) as web.
* `ToastContainer.native.tsx` — mounts once at app root, subscribes to the
toast store via React.useSyncExternalStore, renders all visible toasts
stacked from bottom of screen.
* `useToast.native.tsx` — class-based store + hook. Same public surface as
web's useToast: `{ toasts, show, dismiss }`. Same defaults (4s normal,
8s promotional, single-promotional rule, autoDismiss=false → Infinity).
* `useToast.tsx` → renamed to `useToast.web.tsx` so the bundler picks up
the platform-specific implementation.
* `componentStatusData.ts` — Toast platform: web → all.
The web behavior is unchanged. Native consumers can now do:
import { useToast, ToastContainer } from '@razorpay/blade/components';
// mount <ToastContainer /> once inside <BladeProvider>
const { show } = useToast();
show({ type: 'informational', color: 'positive', content: 'Saved' });
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Builds out the native (React Native) implementations of components that previously shipped only as scaffolds. Driven by the Razorpay merchant mobile app's Blade v12 migration spike, where the prior native stubs were insufficient for the home/payments screens to render correctly.
Changes
DatePicker/DatePicker.native.tsx— Tier-1 native date picker. Full input + calendar wiring built out from the prior scaffold (~530 LOC).Charts/BarChart/BarChart.native.tsx— Tier-1 native bar chart implementation, previously a stub (~470 LOC).Charts/CommonChartComponents/CommonChartComponents.native.tsx+index.ts+tokens.ts— shared native helpers and tokens used across the chart components.utils/storybook/componentStatusData.ts— bumps DatePicker / BarChart status rows to reflect the new native coverage.Web behaviour is unchanged. Each touched file's
.web.tsxcounterpart is untouched.Additional Information
feat/datepicker-rn,feat/linechart-rn) plus several rounds of in-progress edits in a sibling clone — the latest, working state of each file lives here.12.101.2(the rollup tree-shake fix) — once this lands, the merchant-app team will bump again to pick up the Tier-1 implementations.Component Checklist
componentStatusData.tsrow updates)