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 Contact Us page, refactoring #1899

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

jordanarldt
Copy link
Contributor

@jordanarldt jordanarldt commented Jan 11, 2025

What/Why?

  • Add Contact Us page parity to Catalyst.
  • Refactor SignUpForm to DynamicFormSection
  • Fix a layout issue on pages

Testing

Screen.Recording.2025-01-10.at.6.17.33.PM.mov

@jordanarldt jordanarldt requested a review from a team as a code owner January 11, 2025 00:15
Copy link

changeset-bot bot commented Jan 11, 2025

⚠️ No Changeset found

Latest commit: f5f8111

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jan 11, 2025

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

Name Status Preview Comments Updated (UTC)
catalyst-canary ✅ Ready (Inspect) Visit Preview Jan 13, 2025 6:13pm
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 13, 2025 6:13pm
catalyst-soul ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 13, 2025 6:13pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
catalyst ⬜️ Ignored (Inspect) Jan 13, 2025 6:13pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 6:13pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Jan 13, 2025 6:13pm

Comment on lines 34 to 52
return (
<>
<header className="mx-auto w-full max-w-4xl pb-8 @2xl:pb-12 @4xl:pb-16">
{breadcrumbs && <Breadcrumbs breadcrumbs={breadcrumbs} />}

<h1 className="mb-4 mt-8 font-heading text-4xl font-medium leading-none @xl:text-5xl @4xl:text-6xl">
{title}
</h1>
</header>
<h1 className="mb-4 mt-8 font-heading text-4xl font-medium leading-none @xl:text-5xl @4xl:text-6xl">
{title}
</h1>
</header>

<div
className="prose mx-auto w-full max-w-4xl space-y-4 [&_h2]:font-heading [&_h2]:text-3xl [&_h2]:font-normal [&_h2]:leading-none [&_h2]:@xl:text-4xl [&_img]:mx-auto [&_img]:max-h-[600px] [&_img]:w-fit [&_img]:rounded-2xl [&_img]:object-cover"
dangerouslySetInnerHTML={{ __html: content }}
/>
</>
);
}}
</Stream>
</div>
<div
className="prose mx-auto w-full max-w-4xl space-y-4 [&_h2]:font-heading [&_h2]:text-3xl [&_h2]:font-normal [&_h2]:leading-none [&_h2]:@xl:text-4xl [&_img]:mx-auto [&_img]:max-h-[600px] [&_img]:w-fit [&_img]:rounded-2xl [&_img]:object-cover"
dangerouslySetInnerHTML={{ __html: content }}
/>
{children}
</>
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

All these styles should be handled in VIBES so that we can swap out different VIBES and things won't look visually off.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@migueloller Can you clarify this a bit? We decided that the base web page component shouldn't be in VIBES, so what's the best way to ensure the styles in Catalyst are sync'd with the vibes styles?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@migueloller For some context, I grabbed that styling directly from the blog post content VIBES component here: https://github.com/makeswift/vibes/blob/85e9a51900472a0b5796731b9437781ef264b0b4/apps/web/vibes/soul/sections/blog-post-content/index.tsx#L92

Copy link
Contributor

Choose a reason for hiding this comment

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

I was under the impression that webpage is not a section that will live in VIBES, so I asked Jordan to just style this page as close to the vibe as possible (maybe using SectionLayout).

However, I like the concept Jordan introduced of DynamicFormSection that has a title and subtitle and the form. This is something that should live in VIBES I think, since there are many use cases were we just need a title and form.

What do you think @migueloller ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jorgemoya I did actually add DynamicFormSection into VIBES: makeswift/vibes#468

However, I ended up not using that section for Contact Page specifically, because of styling issues. For the contact page, we don't need the whole section, just the form, so it made more sense to just go with DynamicForm directly.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry for chiming in late here. Basically, the idea is that we want to be able to "hot-swap" VIBES when installing Catalyst in the future.

For this to work, we'll need to make sure Catalyst is using a curated interface that all VIBES will follow.

If we write custom CSS, while that might look good for the Soul VIBE it might not for another VIBE.

So, we'd need to identify what is that "shared" aspect that makes sense to move to VIBES. Perhaps it's a container/layout component, or something else. But by having it be part of the standard interface it would make it so VIBES as "hot-swappable".

Does that make sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

In this case, which is contrary to what I suggested Jordan so it's my bad, we need to build a VIBES component that has a title and subtitle and renders children.

core/app/[locale]/(default)/webpages/contact/[id]/page.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@jorgemoya jorgemoya left a comment

Choose a reason for hiding this comment

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

This looks good to me but if @migueloller feels this WebPageContent component needs to be in VIBES, lets work to add it as well.

@jordanarldt
Copy link
Contributor Author

This looks good to me but if @migueloller feels this WebPageContent component needs to be in VIBES, lets work to add it as well.

@jorgemoya For sure, we actually had a prior discussion about why it shouldn't be a vibes component, so we should be good to move forward 👍

@jordanarldt jordanarldt added this pull request to the merge queue Jan 13, 2025
Merged via the queue into canary with commit 2af7f97 Jan 13, 2025
8 checks passed
@jordanarldt jordanarldt deleted the ja/add-contact-page-canary branch January 13, 2025 21:11
bookernath pushed a commit that referenced this pull request Jan 17, 2025
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.

3 participants