Skip to content

chore: update next#2500

Open
Osama-Elshimy wants to merge 376 commits intoquran:testingfrom
Osama-Elshimy:chore/update-next
Open

chore: update next#2500
Osama-Elshimy wants to merge 376 commits intoquran:testingfrom
Osama-Elshimy:chore/update-next

Conversation

@Osama-Elshimy
Copy link

@Osama-Elshimy Osama-Elshimy commented Sep 22, 2025

Summary

This PR upgrades Next.js (primary task) along with React, React DOM, TypeScript types, ESLint and related plugins to be compatible with React 19 and Next 15. Several small follow-up fixes were included so the app builds and lints cleanly: passing an initial value to useRef, fixing functional component (FC) typing errors, and adjusting ESLint rules.

Key points:

  • Upgrade Next.js to v15 and bump related dependencies (React, React DOM, @types/*).
  • Upgrade ESLint and ESLint plugins so they work with React 19 / Next 15.
  • Upgrade react-joyride to v3 (pre-release) because v2 does not support React 19.
  • Remove experimental.instrumentationHook from next.config.js (Now available by default in Next 15).
  • Add next-env.d.ts to ESLint ignore because Next rewrites this file automatically and the triple-slash ESLint plugin complained (adding an inline disable was removed by Next).
  • Change react/boolean-prop-naming rule from error to warn in .eslintrc.json to reduce CI/author friction while keeping the rule enforced.
  • Fixes to make the codebase compile: pass initial value to useRef and fix FC type errors reported after dependency upgrades.

Note about Link component:

  • src/components/dls/Link/Link.tsx currently uses legacyBehavior on next/link. legacyBehavior is deprecated and will be removed in Next 16 — this causes a dispatchable error in development environment.

Type of change

  • Non-breaking change (chore/upgrade that shouldn't cause runtime breaking behavior)

Test plan

Run locally / CI checks:

  • yarn lint — ensure no new lint errors (some rules were relaxed to warnings where noted).
  • yarn build — production build should succeed.
  • yarn dev and yarn start — dev and production server start and basic flows work as expected.

If you want to reproduce my local verification steps, run the commands above and spot-check a few pages and flows in the app.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

References

Why react-joyride v3 is needed
Link component legecayBehavior deprecated
next-env.d.ts adding a new line on next dev and next build

Summary by CodeRabbit

  • Chores

    • Upgraded core stack: Next.js → v15, React → v19; many dependencies bumped; Node engine → 24.x.
  • Refactor

    • Standardized boolean prop names to is*/should* prefixes and tightened typings (explicit null refs, refined component signatures) for consistency and type safety across components.
  • Style

    • Storybook/config formatting updates and enabled docs code panel; minor tooling/config tweaks.
  • Chores

    • ESLint/TS adjustments: added ESLint ignore entry and updated global type reference.

osamasayed and others added 30 commits April 17, 2025 07:11
* Fix week number

* Update tests
* Add Sentry

* Add env variables

* Disable automaticVercelMonitors
* Remove purge cache GH action

* Remove purge cache GH action

* get last read from API for logged in users
* chore: protected proxy by origins and signature

* env vars fix

* fix: checking of origin with exact match

* fix: fixed api call in auth to use secure proxy

---------

Co-authored-by: Osama Sayed <toto777_90@hotmail.com>
* feat: update banner and links to promote Best Days donation campaign

* feat: add Dhul-Hijjah best days landing page with styling and OG image support

* fix: update QuranReflect post links in the-best-days page

* fix: update text for best-day modal link to use plural form

* style: update CSS properties and restructure content layout for Dhul-Hijjah page
osamasayed and others added 27 commits October 27, 2025 14:00
* Implement guest course enrollment functionality and enhance user experience

- Added utilities for managing guest user course enrollment, including functions to check enrollment status and enroll guests.
- Updated components to utilize the new guest enrollment logic, ensuring proper logging and user feedback.
- Enhanced the Syllabus, StatusHeader, and CourseFeedback components to handle guest access and enrollment scenarios.
- Introduced integration tests to verify guest enrollment behavior and access control.
- Updated Course type to include  flag for better course management.

* Add .disabledLink styles to Syllabus module for improved accessibility and user interaction

- Introduced styles for .disabledLink to enhance visual feedback for disabled links.
- Added hover and focus states to ensure better user experience and accessibility compliance.

* Refactor course components for improved user feedback and error handling

- Simplified the enrollment success handling in StatusHeader by removing unnecessary try-catch.
- Updated Syllabus component to use .notEnrolledLink for better clarity on user status.
- Enhanced CourseFeedback to redirect users to login without sanitizing the URL.
- Streamlined LessonPage to improve enrollment checks and user notifications.
- Adjusted integration tests to replace waitForTimeout with waitForURL for better reliability.

* Rename .disabledLink to .notEnrolledLink in Syllabus module for improved clarity on user status

* Refactor guest enrollment logic and improve component interactions

- Replaced guest enrollment utilities with Redux-based hooks for better state management.
- Updated components (StatusHeader, CourseFeedback, Syllabus) to utilize new hooks for checking enrollment status and enrolling guests.
- Enhanced user feedback by logging user types during enrollment actions.
- Removed deprecated guest enrollment utility functions to streamline codebase.
- Introduced NotEnrolledNotice component for clearer user notifications regarding enrollment status.
- Adjusted integration tests to reflect changes in guest enrollment handling.

* Update Syllabus styles for improved link visibility and user interaction

* Enhance guest enrollment hooks and improve NotEnrolledNotice component

- Updated useEnrollGuest hook to specify return type for better type safety.
- Simplified NotEnrolledNotice component by removing unnecessary refs and optimizing useEffect for clearer logic.
- Adjusted integration tests to improve reliability and ensure proper URL handling for guest enrollment scenarios.

* Refactor NotEnrolledNotice into LessonPage for improved clarity and functionality

- Merged NotEnrolledNotice component logic directly into LessonPage to streamline user notifications regarding enrollment status.
- Enhanced error handling by utilizing a toast notification for unenrolled users and improved navigation flow.
- Removed the separate NotEnrolledNotice file to reduce complexity and improve maintainability.

* Refactor authentication handling in CourseFeedback and CompleteButton components

* Refactor user type handling in CourseFeedback and CompleteButton components

* Refactor course components for improved user experience and code clarity

- Updated user type handling in CourseFeedback, CompleteButton, and other components to streamline logic and enhance readability.
- Simplified NotEnrolledNotice integration into LessonPage for better user notifications regarding enrollment status.
- Introduced LessonContent component to encapsulate lesson display logic and improve maintainability.
- Enhanced error handling and user feedback mechanisms across various components, ensuring a smoother user experience.

* Add NotEnrolledNotice styles and remove deprecated lessons styles
* Update popup tab design for reflections

* Remove header text from Reflection modal in BottomActionsModals component

* Show ayah conditionally on the page only but no popup

* Refactor ReflectionBodyContainer: Simplify icon usage, enhance reflection view logging, and clean up styles. Remove unnecessary TypeScript ignore comment and adjust tab item selection logic.

* Remove unnecessary useCallback
…es (quran#2560)

Update verse link regex and tests for triple-digit references
…n#2554)

* Refactor Navbar and ContextMenu to integrate SettingsButton and SettingsDrawer

- Removed SettingsDrawer from NavbarBody and added SettingsButton to ContextMenu for better accessibility.
- Introduced a new SettingsButton component to handle opening the SettingsDrawer.
- Updated ContextMenu layout to accommodate the new SettingsButton while maintaining responsiveness.

* Update ContextMenu styles for improved layout and responsiveness

- Adjusted padding values for better alignment in the ContextMenu.
- Added new styles for reading preferences and chapter navigation components.
- Enhanced responsiveness for chapter navigation and settings display on mobile devices.

* Add event logging and integration tests for SettingsButton functionality

- Integrated event logging to track when the settings drawer is opened.
- Created integration tests to verify the visibility and functionality of the settings drawer on both desktop and mobile views.

* Update ContextMenu to clarify SettingsDrawer rendering

- Changed comment to specify that the SettingsDrawer component is being rendered in the ContextMenu.

* Refactor ContextMenu and SettingsButton for improved performance and clarity

* Fix logic in ContextMenu for mobile view handling and update SettingsButton props interface

* Update ContextMenu styles for improved responsiveness and layout adjustments

* Add SettingsDrawer to NavbarBody and remove from ContextMenu for improved structure
- update react, react-dom, next, eslint-config-next, @types/react, @types/react-dom
- remove instrumentationHook from next.config.js
  experimental.instrumentationHook is now available by default
minimatch is already needed by eslint and a lot of its plugins
Since upgrading eslint to v9 will not be implemented in this PR
due to needed flatConfig migration, minimatch must be bumped to
fix its type error during build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.