-
-
Notifications
You must be signed in to change notification settings - Fork 2
TT-6812b Add Plan View with Passage Cards for mobile experience (#179) #179
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
…erience - Added new translation entry for `Unknown Book` in localization files. - Introduced new JSON localization file for updated strings. - Refactored PlanTabs and PlanSheet components to support mobile view and improve responsiveness. - Implemented new GraphicAvatar and PassageCard components for better visual representation of data. - Updated PlanBar and PlanView components to enhance user interaction and layout. These changes collectively improve the localization support and enhance the UI components, ensuring a more intuitive experience for users across different devices.
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 enhances the application's localization support and introduces mobile-responsive components for an improved user experience. The changes enable the plan view to adapt to mobile devices with a dedicated mobile UI layout.
Key Changes:
- Added "Unknown Book" translation entry across all localization files for handling missing book names
- Implemented mobile view support with new PlanView, PlanBar, PassageCard, and GraphicAvatar components
- Refactored PlanSheet to extract handlePublishToggle logic to parent component (ScriptureTable) for reuse in mobile view
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/src/store/localization/reducers.tsx | Added unknownBook translation entry to initial state |
| src/renderer/src/store/localization/model.tsx | Added unknownBook property to IPlanSheetStrings interface |
| src/renderer/src/store/localization/exported-strings-name.json | Updated strings file reference to include new translations |
| src/renderer/src/control/TabAppBar.tsx | Added mobileBar prop for mobile-specific styling |
| src/renderer/src/components/Sheet/ScriptureTable.tsx | Added mobile view detection and conditional rendering; extracted handlePublishToggle; added filtered state calculation |
| src/renderer/src/components/Sheet/PlanView.tsx | New component providing mobile-optimized card-based view of sections and passages |
| src/renderer/src/components/Sheet/PlanTabSelect.tsx | New component providing dropdown selector for plan tabs in mobile view |
| src/renderer/src/components/Sheet/PlanSheet.tsx | Refactored to accept handlePublishToggle and onWarning as props; removed internal publishing logic |
| src/renderer/src/components/Sheet/PlanBar.tsx | New component providing mobile-friendly action bar with filter and publishing controls |
| src/renderer/src/components/Sheet/PassageCard.tsx | New component displaying passage information in card format for mobile view |
| src/renderer/src/components/Sheet/GraphicAvatar.tsx | New component for displaying section graphics or generated avatars |
| src/renderer/src/components/PlanTabs.tsx | Modified to bypass tab bar rendering when in mobile view on section/passage tab |
| src/renderer/src/components/App/AppHead.tsx | Fixed regex capture group reference for plan URL and added padding to logo button |
| src/renderer/public/localization/strings54bc1bc2.json | Updated with new translations and removed obsolete entries |
| localization/TranscriberAdmin-en.xlf | Added unknownBook translation unit |
| localization/TranscriberAdmin-en-1.2.xliff | Added unknownBook translation unit |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {row.passageType === PassageTypeEnum.BOOK ? ( | ||
| <Typography key={row.sectionId?.id} variant="h5"> | ||
| {row.title} | ||
| </Typography> | ||
| ) : row.passageType === PassageTypeEnum.ALTBOOK ? ( | ||
| <Typography key={row.sectionId?.id} variant="h5" sx={{ pl: 2 }}> | ||
| {row.title} | ||
| </Typography> | ||
| ) : ( | ||
| <Typography key={row.sectionId?.id} variant="h5"> | ||
| {sectionDescription( | ||
| getSectionRec(row.sectionId?.id || '') as SectionD, | ||
| sectionMap | ||
| )} | ||
| </Typography> |
Copilot
AI
Dec 24, 2025
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.
The Typography component uses the same key (row.sectionId?.id) in three different conditional branches. In React, keys must be unique within a mapping but should be consistent for the same element across re-renders. Since these are alternatives in a conditional, this is acceptable, but the key is redundant since it's already specified on the parent Box element. The Typography key can be removed.
Co-authored-by: Copilot <[email protected]>
Unknown Bookin localization files.These changes collectively improve the localization support and enhance the UI components, ensuring a more intuitive experience for users across different devices.