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

Add newsletter unsubscribed page #776

Merged

Conversation

NiallJoeMaher
Copy link
Contributor

@NiallJoeMaher NiallJoeMaher commented Feb 26, 2024

✨ Codu Pull Request 💻

Codu Logo

Pull Request details

  • Add newsletter unsubscribed page

Any Breaking changes

  • None

Associated Screenshots

New page: /newsletter/unsubscribed

You are now unsubscribed. We are sad to see you go. If you change your mind, you can always resubscribe.

Summary by CodeRabbit

  • New Features
    • Introduced a new page for confirming newsletter unsubscription, including an option to resubscribe.

@NiallJoeMaher NiallJoeMaher requested a review from a team as a code owner February 26, 2024 22:59
Copy link

vercel bot commented Feb 26, 2024

@NiallJoeMaher is attempting to deploy a commit to the Codú Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Feb 26, 2024

Walkthrough

This update introduces a dedicated page for confirming a user's decision to unsubscribe from the newsletter. It not only confirms the unsubscription but also offers an easy path to resubscribe, all wrapped in a visually appealing design with a background gradient and styled message.

Changes

File Change Summary
app/.../newsletter/unsubscribed/page.tsx Added new page component for newsletter unsubscribe confirmation, including resubscribe link and styled message with background gradient.

🐇✉️🚫
In a burrow, not so deep,
A change was made, a leap so steep.
"No more mails," said with a click,
But worry not, a trick so slick.
A path back, with a gradient bright,
Resubscribe, into the light.
🌈📬✨

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

vercel bot commented Feb 26, 2024

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

Name Status Preview Comments Updated (UTC)
codu ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 26, 2024 11:06pm

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between fcd2b57 and 40c499c.
Files selected for processing (1)
  • app/(standalone)/newsletter/unsubscribed/page.tsx (1 hunks)
Additional comments: 2
app/(standalone)/newsletter/unsubscribed/page.tsx (2)
  • 4-9: The metadata configuration correctly sets the page to not be followed or indexed by search engines, which is appropriate for an unsubscribe confirmation page. This ensures that the page won't appear in search engine results, aligning with best practices for such types of pages.
  • 22-26: The message to the user is clear, concise, and aligns with the objectives of maintaining a positive relationship with users even as they opt out of communications. The use of <Link> for the resubscribe option is correctly implemented, ensuring an easy pathway for users to reconsider their decision. This is a good practice in user experience design, as it provides a straightforward method for users to navigate back to the subscription page.

Comment on lines +12 to +44
export default function NewsletterUnsubscribedPage() {
return (
<div className="relative isolate min-h-svh overflow-hidden bg-black py-16 sm:flex sm:items-center sm:py-24 lg:py-32">
<div className="mx-auto max-w-7xl px-6 lg:px-8">
<div className="mx-auto max-w-2xl grid-cols-1 gap-x-8 gap-y-16">
<div className="max-w-xl lg:max-w-lg">
<h2 className="text-3xl font-bold tracking-tight text-white sm:text-4xl">
You are now unsubscribed.
</h2>
<p className="mt-4 text-lg leading-8 text-gray-300">
We are sad to see you go. If you change your mind, you can always{" "}
<Link className="underline" href="/newsletter">
resubscribe
</Link>
.
</p>
</div>
</div>
</div>
<div
className="absolute left-1/2 top-0 -z-10 -translate-x-1/2 blur-3xl xl:-top-6"
aria-hidden="true"
>
<div
className="aspect-[1155/678] w-[72.1875rem] bg-gradient-to-tr from-orange-300 to-pink-500 opacity-30"
style={{
clipPath:
"polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",
}}
/>
</div>
</div>
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The structure and styling of the NewsletterUnsubscribedPage component are well-implemented, providing a visually appealing and brand-consistent user experience. The use of Tailwind CSS classes for styling ensures consistency and maintainability. However, consider adding alt text to the decorative div (lines 31-42) for better accessibility, even though it's marked with aria-hidden="true". While aria-hidden effectively removes the element from the accessibility tree, providing alt text for decorative elements can sometimes offer additional context for those elements that might become visible to users in unexpected ways or contexts.

          className="aspect-[1155/678] w-[72.1875rem] bg-gradient-to-tr from-orange-300 to-pink-500 opacity-30"
          style={{
            clipPath:
              "polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",
          }}
+         alt="Decorative background"

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
export default function NewsletterUnsubscribedPage() {
return (
<div className="relative isolate min-h-svh overflow-hidden bg-black py-16 sm:flex sm:items-center sm:py-24 lg:py-32">
<div className="mx-auto max-w-7xl px-6 lg:px-8">
<div className="mx-auto max-w-2xl grid-cols-1 gap-x-8 gap-y-16">
<div className="max-w-xl lg:max-w-lg">
<h2 className="text-3xl font-bold tracking-tight text-white sm:text-4xl">
You are now unsubscribed.
</h2>
<p className="mt-4 text-lg leading-8 text-gray-300">
We are sad to see you go. If you change your mind, you can always{" "}
<Link className="underline" href="/newsletter">
resubscribe
</Link>
.
</p>
</div>
</div>
</div>
<div
className="absolute left-1/2 top-0 -z-10 -translate-x-1/2 blur-3xl xl:-top-6"
aria-hidden="true"
>
<div
className="aspect-[1155/678] w-[72.1875rem] bg-gradient-to-tr from-orange-300 to-pink-500 opacity-30"
style={{
clipPath:
"polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",
}}
/>
</div>
</div>
);
export default function NewsletterUnsubscribedPage() {
return (
<div className="relative isolate min-h-svh overflow-hidden bg-black py-16 sm:flex sm:items-center sm:py-24 lg:py-32">
<div className="mx-auto max-w-7xl px-6 lg:px-8">
<div className="mx-auto max-w-2xl grid-cols-1 gap-x-8 gap-y-16">
<div className="max-w-xl lg:max-w-lg">
<h2 className="text-3xl font-bold tracking-tight text-white sm:text-4xl">
You are now unsubscribed.
</h2>
<p className="mt-4 text-lg leading-8 text-gray-300">
We are sad to see you go. If you change your mind, you can always{" "}
<Link className="underline" href="/newsletter">
resubscribe
</Link>
.
</p>
</div>
</div>
</div>
<div
className="absolute left-1/2 top-0 -z-10 -translate-x-1/2 blur-3xl xl:-top-6"
aria-hidden="true"
>
<div
className="aspect-[1155/678] w-[72.1875rem] bg-gradient-to-tr from-orange-300 to-pink-500 opacity-30"
style={{
clipPath:
"polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",
}}
alt="Decorative background"
/>
</div>
</div>
);

@NiallJoeMaher NiallJoeMaher merged commit 768d769 into codu-code:develop Feb 26, 2024
8 checks passed
@NiallJoeMaher NiallJoeMaher deleted the feat/unsub-confirmed-page branch February 26, 2024 23:19
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.

1 participant