Draft
Conversation
* fixed ssr on all pages with playwright tests * fixed encoding problem * applied copilot suggestions and fixed all verses fetch problem * applied copilot suggestions
* Fix: Add SSR support for Quran in a Year section * added playwright tests to verify elements on the homepage render when js is disabled * fixed a test and removed useless comments * Applied copilot and brother osama suggestions * applied copilot suggestion * re-used existing API
* fixed the first language switch that does not work because NEXT_LOCALE cookie isnt set for guest user * fix tests that requires switching languages and signing up, as the UI has changed * fixed some mocked data * fixing some tests * fixed some tests * fixed a regression since new language switch UI (API settings were not being used but it was using mocked one) * fixed all the remaining tests * applied copilot suggestions
Member
Author
|
@zonetecde there are merge conflicts |
…SR branch (#2895) * restaured all the sign-up/sign in logic from `SSR` branch * applied copilot suggestions
* made reset button re-fetch default preferences * applied copilot suggestions, added playwright tests, fixed a bug * applied copilot suggestions
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements Server-Side Rendering (SSR) with intelligent default settings and localization for Quran.com. The changes migrate the application from Static Site Generation (SSG) to SSR to enable personalized content delivery based on user location and language preferences.
Changes:
- Migrated 40+ pages from
getStaticProps/getStaticPathstogetServerSideProps - Implemented
withSsrReduxwrapper for SSR with Redux state hydration - Added intelligent locale detection and country-based default settings
- Integrated user preference synchronization from server
- Added SSR fallbacks with
<noscript>tags for JavaScript-disabled scenarios - Integrated New Relic monitoring
- Added comprehensive integration tests for SSR functionality
Reviewed changes
Copilot reviewed 146 out of 148 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/utils/withSsrRedux.ts |
New SSR wrapper that handles Redux state initialization and language detection |
src/redux/Provider.tsx |
Updated to accept SSR-hydrated Redux state and country preferences |
src/redux/store.ts |
Enhanced to support SSR state initialization with country preferences |
src/utils/auth/syncPreferencesFromServer.ts |
New utility for syncing user preferences from backend |
src/pages/**/*.tsx |
Migrated 40+ pages from SSG to SSR using withSsrRedux |
types/ApiResponses.ts |
Added CountryLanguagePreferenceResponse type |
src/api.ts |
Added getCountryLanguagePreference API function |
| Test files | Added SSR-specific integration tests and updated existing tests |
| Configuration | New Relic integration, webpack externals, MSW setup |
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.
No description provided.