Skip to content
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

feat: enable ssr on /privacy-policy #9154

Merged
merged 22 commits into from
Jan 27, 2024

Conversation

preschian
Copy link
Member

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.

👇 __ Let's make a quick check before the contribution.

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

  • Closes #<issue_number>
  • Requires deployment <snek/rubick/worker>

Did your issue had any of the "$" label on it?

Screenshot 📸

  • My fix has changed UI

refactor: rename plugin files to indicate client-side usage
feat: add new posts to posts.json
fix: adjust localStorage usage in identity store
fix: adjust window object usage in chain and ipfs config
fix: adjust extension usage for client-side process
…and '@polkadot/x-global' to transpile list and update '@polkadot/x-global' version to 12.6.2
… vue components

fix(package.json): downgrade eslint-plugin-unicorn, eslint-plugin-vue, glob, husky, jsdom, lint-staged versions
chore(package.json): remove unused @types/jest and @polkadot/x-global dependencies
refactor(default.vue): remove ClientOnly wrapper from Navbar, Footer, CookieBanner, and Buy components
feat(privacy-policy.vue): set page layout to default-ssr
fix(nuxt.config.ts): disable sourcemap in vite build configuration
@preschian preschian marked this pull request as ready for review January 27, 2024 04:55
@preschian preschian requested review from a team as code owners January 27, 2024 04:55
@preschian preschian requested review from daiagi and roiLeo and removed request for a team January 27, 2024 04:55
Copy link
Contributor

reviewpad bot commented Jan 27, 2024

AI-Generated Summary: This pull request contains multiple updates focused on handling server-side and client-side rendering, adding metadata, code optimization, refactoring, and version upgrades of dependencies.

  1. The logic for assigning a value to kodaImage and rmrk2ChainPrefixInHostname constant validation logic have been updated to ensure they only execute on the client-side.
  2. Changes in the nuxt.config.ts file include configuration modification under build and optimizeDeps, along with commenting out ssr.
  3. Client-side checks have been added before accessing the localStorage in the useLocalStorage.ts file and operations in identity.ts file.
  4. A new TypeScript configuration file tsconfig.json has been added to the server directory.
  5. In terms of styling, a new SCSS variable $modal-zindex was introduced in the NeoModal component.
  6. The 'privacy-policy.vue' file has been modified with the 'definePageMeta' method to define meta information with an 'default-ssr' layout.
  7. Changes in ModelMedia.vue encapsulate the import statement for @google/model-viewer inside an onMounted hook with a process client-side check.
  8. In the posts.json file, entries for October 2023 were removed and three new weekly roundup posts for KodaDot were added.
  9. Dependencies in package.json have been updated, and @types/jest has been removed from devDependencies.
  10. The files keyboardEvents.ts and pwa.ts in the plugins directory have been renamed to keyboardEvents.client.ts and pwa.client.ts respectively with no content change.
  11. A new file named disable-ssr.ts has been added to the server/middleware directory to handle server-side rendering for specified paths.
  12. Change in the handling of isProduction and isBeta constants in an unnamed file to prevent potential server-side rendering issues.
  13. A new Vue.js layout file default-ssr.vue has been introduced which includes several new components and dynamic links construction.
  14. In utils/extension.ts, the dependency on web3Enable from @polkadot/extension-dapp has been removed and localStorage operations are chained with a condition to check if the process is running on client-side.
  15. polkadot.ts in the plugins directory has been renamed to polkadot.client.ts with no content change.

These updates should be verified in different environments to ensure the functioning of the application after these changes, especially due to the package version updates to avoid any potential breaking changes.

@preschian preschian merged commit 9833a8f into kodadot:cf-ssr-privacy-policy Jan 27, 2024
4 checks passed
@preschian preschian deleted the test-ssr branch January 27, 2024 04:56
@reviewpad reviewpad bot added large Pull request is large waiting-for-review labels Jan 27, 2024
Copy link
Contributor

reviewpad bot commented Jan 27, 2024

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

Copy link

sonarcloud bot commented Jan 27, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large Pull request is large waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant