Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

💄 Make mentions a horizontally scrollable row on small screens (#3046)

Luke Vellabd6df475b28d
diff --git a/apps/landing/public/locales/en/home.json b/apps/landing/public/locales/en/home.json
index 9235bcf4b..bde6cba5d 100644
--- a/apps/landing/public/locales/en/home.json
+++ b/apps/landing/public/locales/en/home.json
@@ -91,6 +91,7 @@
"howItWorksStepLabel": "Step {number}",
"howItWorksTitle": "How it works",
"hubspotQuote": "“The simplest choice for availability polling for large groups.”",
+ "mentionsLabel": "Press mentions",
"metaDescription": "Rallly is the fastest and easiest scheduling and collaboration tool. Create a meeting poll in seconds, no login required.",
"metaTitle": "Rallly: Free Group Meeting Scheduling Tool",
"mobileVotingBlog": "A clearer way to vote on your phone",
diff --git a/apps/landing/src/app/[locale]/(main)/(seo)/best-doodle-alternative/page.tsx b/apps/landing/src/app/[locale]/(main)/(seo)/best-doodle-alternative/page.tsx
index 1471d292b..32ec5b74e 100644
--- a/apps/landing/src/app/[locale]/(main)/(seo)/best-doodle-alternative/page.tsx
+++ b/apps/landing/src/app/[locale]/(main)/(seo)/best-doodle-alternative/page.tsx
@@ -100,7 +100,7 @@ export default async function Page(props: {
</Testimonial>
</Section>
<Section>
- <Mentions>
+ <Mentions locale={locale}>
<Mention
delay={0.25}
logo={
diff --git a/apps/landing/src/app/[locale]/(main)/(seo)/free-scheduling-poll/page.tsx b/apps/landing/src/app/[locale]/(main)/(seo)/free-scheduling-poll/page.tsx
index 941241751..37af02e7e 100644
--- a/apps/landing/src/app/[locale]/(main)/(seo)/free-scheduling-poll/page.tsx
+++ b/apps/landing/src/app/[locale]/(main)/(seo)/free-scheduling-poll/page.tsx
@@ -100,7 +100,7 @@ export default async function Page(props: {
</Testimonial>
</Section>
<Section>
- <Mentions>
+ <Mentions locale={locale}>
<Mention
delay={0.25}
logo={
diff --git a/apps/landing/src/app/[locale]/(main)/(seo)/scheduling-for/executive-assistants/page.tsx b/apps/landing/src/app/[locale]/(main)/(seo)/scheduling-for/executive-assistants/page.tsx
index 77ae04c37..9dc6a90a2 100644
--- a/apps/landing/src/app/[locale]/(main)/(seo)/scheduling-for/executive-assistants/page.tsx
+++ b/apps/landing/src/app/[locale]/(main)/(seo)/scheduling-for/executive-assistants/page.tsx
@@ -103,7 +103,7 @@ export default async function Page(props: {
</Testimonial>
</Section>
<Section>
- <Mentions>
+ <Mentions locale={locale}>
<Mention
delay={0.25}
logo={
diff --git a/apps/landing/src/app/[locale]/(main)/(seo)/when2meet-alternative/page.tsx b/apps/landing/src/app/[locale]/(main)/(seo)/when2meet-alternative/page.tsx
index 4e8681f1d..bafde7d69 100644
--- a/apps/landing/src/app/[locale]/(main)/(seo)/when2meet-alternative/page.tsx
+++ b/apps/landing/src/app/[locale]/(main)/(seo)/when2meet-alternative/page.tsx
@@ -100,7 +100,7 @@ export default async function Page(props: {
</Testimonial>
</Section>
<Section>
- <Mentions>
+ <Mentions locale={locale}>
<Mention
delay={0.25}
logo={
diff --git a/apps/landing/src/app/[locale]/(main)/page.tsx b/apps/landing/src/app/[locale]/(main)/page.tsx
index b2666a7b3..f02e50f9a 100644
--- a/apps/landing/src/app/[locale]/(main)/page.tsx
+++ b/apps/landing/src/app/[locale]/(main)/page.tsx
@@ -123,7 +123,7 @@ export default async function Page(props: {
</Testimonial>
</Section>
<Section>
- <Mentions>
+ <Mentions locale={locale}>
<Mention
delay={0.25}
logo={
diff --git a/apps/landing/src/components/home/mentions.tsx b/apps/landing/src/components/home/mentions.tsx
index 56c827287..5711d8b96 100644
--- a/apps/landing/src/components/home/mentions.tsx
+++ b/apps/landing/src/components/home/mentions.tsx
@@ -1,5 +1,6 @@
import type * as React from "react";
import { FadeIn } from "@/components/home/fade-in";
+import { getTranslation } from "@/i18n/server";
export function Mention({
logo,
@@ -10,13 +11,46 @@ export function Mention({
delay?: number;
}>) {
return (
- <FadeIn delay={delay} className="flex flex-col space-y-4 rounded-md">
+ <FadeIn
+ delay={delay}
+ className="flex snap-start flex-col space-y-4 rounded-md"
+ >
<div className="flex items-start justify-between">{logo}</div>
<p className="grow text-base">{children}</p>
</FadeIn>
);
}
-export function Mentions({ children }: { children: React.ReactNode }) {
- return <div className="grid gap-8 md:grid-cols-4">{children}</div>;
+export async function Mentions({
+ locale,
+ children,
+}: {
+ locale: string;
+ children: React.ReactNode;
+}) {
+ const { t } = await getTranslation<"home">(locale, "home");
+ return (
+ // Below xl the four mentions stay side by side and scroll horizontally,
+ // bleeding past the page gutters so the next one peeks in. The column width
+ // is pinned to what a mention gets in the xl grid — the page container maxes
+ // out at 72rem with 1.5rem gutters, so (69rem - 3 * 2rem) / 4 = 15.75rem —
+ // which keeps every quote breaking across the same lines at every width.
+ // The pb/-mb pair gives the mentions' fade-in-up room to land inside the
+ // scroll port, which would otherwise show a vertical scrollbar for it.
+ // A named, focusable section so the mentions that start off screen can be
+ // scrolled to by keyboard: none of them contain a focusable element, so
+ // without this the strip is unreachable outside of Chromium's own
+ // keyboard-focusable scrollers.
+ <section
+ aria-label={t("mentionsLabel", {
+ ns: "home",
+ defaultValue: "Press mentions",
+ })}
+ // biome-ignore lint/a11y/noNoninteractiveTabindex: a scroll port needs to be focusable to be scrollable by keyboard
+ tabIndex={0}
+ className="-mx-4 -mb-5 grid snap-x snap-mandatory scroll-px-4 grid-cols-[repeat(4,15.75rem)] gap-4 overflow-x-auto overflow-y-hidden px-4 pb-5 sm:-mx-6 sm:scroll-px-6 sm:px-6 md:gap-8 xl:mx-0 xl:mb-0 xl:grid-cols-4 xl:overflow-visible xl:px-0 xl:pb-0"
+ >
+ {children}
+ </section>
+ );
}