feat: add landscape-optimized layouts for analytics charts - #1111
Open
onajidavid87-web wants to merge 2 commits into
Open
onajidavid87-web wants to merge 2 commits into
onajidavid87-web wants to merge 2 commits into
Conversation
|
@onajidavid87-web is attempting to deploy a commit to the nanle-code's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@onajidavid87-web Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Collaborator
|
@onajidavid87-web Please resolve conflicts |
Author
Resolved |
This branch has not been deployed
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.
Summary
Adds landscape-optimized compositions for key analytics charts on tablets and mobile devices.
src/hooks/useResponsive.ts): AddedisLandscape,isTabletLandscape,orientation, andwindowHeightstate with window resize and orientation change listeners.src/components/charts/LandscapeAnalyticsLayout.tsx): Renders a side-by-side split grid for charts and metric panels in landscape mode, constrains chart height (maxHeight="min(360px, 55vh)") to prevent vertical scrolling overflow, provides an orientation badge with manual view toggles, and includes input validation and localizedErrorBoundaryrecovery.LandscapeAnalyticsLayoutintoAnalyticsChart.tsx,TransactionAnalyticsDashboard.tsx, and updatedMobileChartContainer.tsxfor dynamic landscape height scaling.MOBILE_OPTIMIZATION_GUIDE.mdandRESPONSIVE_FEATURES.mdwith usage guidance, compatibility, security, and migration notes.How was this tested?
Tested with Vitest unit tests (
npx vitest run src/components/charts/__tests__/LandscapeAnalyticsLayout.test.tsx src/hooks/__tests__/useResponsive.test.ts), ESLint (npx eslint), Prettier formatting (npx prettier --check), and TypeScript type checks (pnpm run type-check).[]).data={null},data={NaN}), missingwindow.matchMedia/SSR fallback, and error boundary recovery when child chart components throw rendering errors.Merge requirements
A PR is merged only when every box below is true. See
Merge requirements for the full policy.
masterif GitHub shows "This branch has conflicts").Closes #889