Skip to content

Conversation

@mattinannt
Copy link
Member

What does this PR do?

fix: downgrade nextjs to fix error with react email

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change adds a new database migration
  • This change requires a documentation update

@vercel
Copy link

vercel bot commented Oct 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Updated (UTC)
formbricks-cloud ⬜️ Ignored (Inspect) Oct 30, 2023 10:25am
formbricks-com ⬜️ Ignored (Inspect) Oct 30, 2023 10:25am

@github-actions
Copy link
Contributor

Thank you for following the naming conventions for pull request titles! 🙏

@review-agent-prime
Copy link
Contributor

Overall, the changes in this PR look good. However, there are a few points that could be improved:

  1. In apps/web/app/api/v1/og/route.tsx, you have commented out the old import statements and added a new one. If the old import statements are not needed, it's better to remove them completely to keep the code clean.

  2. In apps/web/app/s/[surveyId]/page.tsx, you have changed the ogImgURL and url to be relative URLs. This might cause issues if the URLs are used in a context where the base URL is not the current site's URL. If the base URL is always the current site's URL, this change is fine.

  3. In apps/web/next.config.mjs, you have added serverActions: true to the experimental configuration. Please ensure that you understand the implications of enabling experimental features, as they might change or be removed in future versions of Next.js.

  4. In apps/web/package.json, you have updated several dependencies. Please make sure to test the application thoroughly after updating dependencies, as there might be breaking changes.

Here are the code suggestions:

  1. Remove commented out code in apps/web/app/api/v1/og/route.tsx:
-import { NextRequest } from "next/server";
-import { ImageResponse } from "next/og";
+import { ImageResponse, NextRequest } from "next/server";
  1. If the base URL is not always the current site's URL, revert the changes to ogImgURL and url in apps/web/app/s/[surveyId]/page.tsx:
-  const ogImgURL = `/api/v1/og?brandColor=${brandColor}&name=${surveyName}`;
+  const ogImgURL = `${WEBAPP_URL}/api/v1/og?brandColor=${brandColor}&name=${surveyName}`;

...

-      url: `/s/${survey.id}`,
+      url: `${WEBAPP_URL}/${survey.id}`,
  1. If you are not sure about the implications of enabling serverActions, consider removing it from apps/web/next.config.mjs:
   experimental: {
-    serverActions: true,
+    // serverActions: true,
   },
  1. If you encounter issues after updating the dependencies in apps/web/package.json, consider reverting them to the previous versions.
    From the provided PR diff, it's hard to provide specific feedback or suggestions as the actual code changes are not visible. However, here are some general guidelines that could be useful:

  2. Ensure that the new code line added in the PR follows the coding standards and conventions of the project. This includes proper indentation, use of variable names, function names, etc.

  3. If the new code line is replacing an old one, make sure that it is indeed an improvement. This could be in terms of performance, readability, or functionality.

  4. If the new code line is part of a function or method, ensure that it doesn't break the functionality of the function. This can be done by writing unit tests that cover the new code.

  5. If the new code line is adding a new feature or functionality, ensure that it is necessary and fits well with the existing codebase. It should not introduce unnecessary complexity or dependencies.

  6. Finally, ensure that the new code line doesn't introduce any security vulnerabilities. This can be done by using static code analysis tools or conducting a manual code review.

Without the actual code, it's hard to provide more specific feedback or suggestions. Please provide the actual code changes for a more detailed review.

@mattinannt mattinannt enabled auto-merge October 30, 2023 10:26
@mattinannt mattinannt added this pull request to the merge queue Oct 30, 2023
Merged via the queue into main with commit ccfd5ae Oct 30, 2023
@mattinannt mattinannt deleted the feature/upgrade-next-deps branch October 30, 2023 10:39
kevinkong91 added a commit to kevinkong91/formbricks that referenced this pull request Oct 30, 2023
* main: (28 commits)
  chore: Add Table of Contents to README (formbricks#1427)
  fix: account deletion failing issue (formbricks#1509)
  fix: remove welcome card from email preview (formbricks#1495)
  fix(bug): default role implemented (formbricks#1524)
  fix: changing description of Code Action (formbricks#1522)
  refactor: Migrate activity service (formbricks#1471)
  fix: Error in Docs navigation formbricks#1518 (formbricks#1521)
  feat: dynamic title and description (formbricks#1459)
  fix: Spelling Errors (formbricks#1517)
  fix: added scrollbar whenever overflowed in the settings/profile page (formbricks#1498)
  fix: long url not getting reset after closing modal (formbricks#1502)
  fix: Unexpected Behavior when Toggling Italics in Text Editor and improve clarity of formatting status (formbricks#1506)
  fix: zod pin validation failing (formbricks#1507)
  fix: Error message on Login not shown  (formbricks#1508)
  fix: downgrade nextjs to fix error with react email (formbricks#1516)
  chore: downgrade next version in formbricks-com (formbricks#1513)
  feat: picture selection question (formbricks#1388)
  feat: formtribe leaderboard update as per today (formbricks#1505)
  fix: Added if statement for preventing use of reserved word in question ID (formbricks#1435)
  fix: Disabling Welcome Card leads buggy preview (formbricks#1320)
  ...
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.

2 participants