Conversation
…y#1667) - Add touchEventsTarget='container' to Swiper so touch listeners attach to container instead of wrapper - Add grabCursor for visual drag feedback on desktop - Fix className bug: home && 'h-32' → home ? 'h-32' : '' to prevent 'false' string in DOM - Add touchAction: 'pan-y' on blockquote to allow horizontal swipes to pass through to Swiper Closes reactplay#1667
…rboard UI - Fix mobile drawer not closing on outside click (useRef + click-outside listener) - Fix CSS transform creating containing block issue (translateY(0) → none) - Add global padding-top for fixed navbar offset (64px, excluding footer) - Add extra home hero padding for activity banner - Add try/catch error handling in testimonial fetches - Fix ESLint jsx-sort-props (shorthand booleans first) - Center leaderboard loading spinner - Remove overflow-hidden from leaderboard page - Import leaderBoard.css in LeaderBoard component
Adds a sanitize-play-exports script that converts invalid JavaScript identifiers (e.g. Bmr-TdeeCalculator) to valid PascalCase identifiers. The script runs automatically as part of start, start:nolint, and build commands, fixing the SyntaxError that caused Netlify deploy failures.
✅ Deploy Preview for reactplayio ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Hey! contributor, thank you for opening a Pull Request 🎉.
@reactplay/maintainers will review your submission soon and give you helpful feedback.
If you're interested in continuing your contributions to open source and want to be a part of a welcoming and fantastic community, we invite you to join our ReactPlay Discord Community.
Show your support by starring ⭐ this repository. Thank you and we appreciate your contribution to open source!
Stale Marking : After 30 days of inactivity this issue/PR will be marked as stale issue/PR and it will be closed and locked in 7 days if no further activity occurs.
There was a problem hiding this comment.
Pull request overview
This PR introduces a build/start-time sanitation step for src/plays/index.js exports (generated by create-react-play), and includes several UI/UX adjustments across header spacing, leaderboard loading layout, and testimonials fetching/interaction.
Changes:
- Add a
sanitize-play-exportsnode script and run it duringstart,start:nolint, andbuild. - Adjust fixed-header layout behavior and page top offsets.
- Improve testimonials fetching resilience and tweak Swiper/touch scrolling behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/common/playleaderboard/leaderBoard.css | Adds a centered loader layout for the leaderboard loading state. |
| src/common/playleaderboard/LeaderBoard.jsx | Imports leaderboard CSS locally and adjusts main container class usage. |
| src/common/home/home.css | Adds a fixed top padding intended to offset an activity banner on the home page. |
| src/common/header/header.css | Changes visible transform behavior and adds a global padding rule to offset fixed header. |
| src/common/header/HeaderNav.jsx | Adds click-outside handling to close the mobile drawer menu. |
| src/common/Testimonial/Testimonials.jsx | Wraps testimonial fetch in try/catch and normalizes empty results. |
| src/common/Testimonial/TestimonialSection.jsx | Wraps fetch in try/catch and adjusts Swiper interaction props. |
| src/common/Testimonial/TestimonialCard.jsx | Tweaks blockquote class construction and adds touchAction to improve scrolling. |
| scripts/sanitize-play-exports.cjs | New script to sanitize/uniquify play export aliases in src/plays/index.js. |
| package.json | Runs the sanitize script as part of start/build flows and bumps TypeScript version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let nextSource = nextLines.join(newline); | ||
| if (hasTrailingNewline) { | ||
| nextSource += newline; | ||
| } |
There was a problem hiding this comment.
This block will append an extra newline every time the script runs (because join(newline) already retains the trailing newline from the split). Suggest removing this conditional append, or trimming the trailing empty line before join and then re-adding exactly one newline.
| const source = fs.readFileSync(indexPath, 'utf8'); | ||
| const newline = source.includes('\r\n') ? '\r\n' : '\n'; | ||
| const hasTrailingNewline = source.endsWith('\n'); | ||
| const lines = source.split(/\r?\n/); |
There was a problem hiding this comment.
source.split(/\r?\n/) preserves a trailing empty string when the file ends with a newline. Combined with later join(newline), this already reproduces the trailing newline, so any separate “re-add trailing newline” step will introduce an extra blank line each run.
priyankarpal
left a comment
There was a problem hiding this comment.
can you mention issue number?
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Checklist:
Screenshots or example output