Skip to content

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

💄 Show an empty state when conferencing has no provider

Luke Vella33f39ea21d04
diff --git a/apps/docs/self-hosting/conferencing.mdx b/apps/docs/self-hosting/conferencing.mdx
index 7cb46d3d0..2b2bc71f7 100644
--- a/apps/docs/self-hosting/conferencing.mdx
+++ b/apps/docs/self-hosting/conferencing.mdx
@@ -20,12 +20,12 @@ Each provider needs an OAuth app that you register with the provider yourself. R
Add `CONFERENCING_ENABLED=true` and the provider's variables to your `.env`.
</Step>
<Step title="Restart">
- Run `./rallly.sh restart`. **Conferencing** appears in **Settings** for every user once a provider is configured.
+ Run `./rallly.sh restart`. **Conferencing** appears in **Settings** for every user.
</Step>
</Steps>
<ParamField path="CONFERENCING_ENABLED" default="false">
- Turns on **Add video call** on the poll form, where organizers can always paste their own link. Each provider whose OAuth app variables are set is offered there and in **Settings** > **Conferencing**. If no provider is configured, Rallly logs a warning at startup and offers none.
+ Turns on **Add video call** on the poll form, where organizers can always paste their own link. Each provider whose OAuth app variables are set is offered there and in **Settings** > **Conferencing**. If no provider is configured, Rallly logs a warning at startup and the Conferencing page says so.
</ParamField>
Every redirect URI below starts with your instance's public address, written as `https://<YOUR_DOMAIN>`. It must match exactly, including the scheme and without a trailing slash.
@@ -166,7 +166,9 @@ https://<YOUR_DOMAIN>/api/integrations/callback/webex
**Rallly does not start after adding Zoom or Webex.** Only one of `ZOOM_CLIENT_ID` and `ZOOM_CLIENT_SECRET` (or the Webex pair) is set. Run `./rallly.sh logs web` to see which.
-**Conferencing does not appear in Settings.** `CONFERENCING_ENABLED` is not `true`, or no provider's variables are set. Restart after editing `.env`.
+**Conferencing does not appear in Settings.** `CONFERENCING_ENABLED` is not `true`. Restart after editing `.env`.
+
+**Conferencing says no video call providers are set up.** `CONFERENCING_ENABLED` is `true` but no provider's variables are set. Add them as described above and restart.
**The provider says the redirect URI does not match** (`redirect_uri_mismatch` on Google). The URI registered with the provider differs from the one Rallly sends. Compare it character by character with the URI above, including `https`, your exact domain and the provider name at the end.
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index 937fdbf8a..22903cc08 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -196,6 +196,10 @@
"conferencingDescription": "Connect the tools you use for video calls so we can add meeting links to your events.",
"conferencingDisconnected": "Account disconnected",
"conferencingDisconnecting": "Disconnecting account…",
+ "conferencingEmptyStateAdminDescription": "Add the OAuth credentials of a video call provider to your configuration and restart Rallly.",
+ "conferencingEmptyStateMemberDescription": "Ask your administrator to set up a video call provider. You can still paste your own link when creating a poll.",
+ "conferencingEmptyStateSetupGuide": "Read the setup guide",
+ "conferencingEmptyStateTitle": "No video call providers set up",
"conferencingMenuAvailable": "Available",
"conferencingMenuConnected": "Connected",
"conferencingNotConnected": "{provider} is not connected. Visit the <a>Conferencing settings</a> page to connect your account.",
diff --git a/apps/web/src/app/[locale]/(space)/settings/conferencing/page.tsx b/apps/web/src/app/[locale]/(space)/settings/conferencing/page.tsx
index bc084d21c..03b397eb8 100644
--- a/apps/web/src/app/[locale]/(space)/settings/conferencing/page.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/conferencing/page.tsx
@@ -11,6 +11,7 @@ import {
} from "@/components/settings-layout";
import { Spinner } from "@/components/spinner";
import { ConferencingConnectionFlash } from "@/features/conferencing/components/conferencing-connection-flash";
+import { ConferencingEmptyState } from "@/features/conferencing/components/conferencing-empty-state";
import { ConferencingProviderList } from "@/features/conferencing/components/conferencing-provider-list";
import {
loadAvailableConferencingProviders,
@@ -19,19 +20,11 @@ import {
import type { ConferencingProvider } from "@/features/conferencing/schema";
import { conferencingProviderSchema } from "@/features/conferencing/schema";
import { integrationIdToConferencingProvider } from "@/features/conferencing/utils";
+import { loadUser } from "@/features/user/loaders";
import { Trans } from "@/i18n/client";
import { getTranslation } from "@/i18n/server";
import { isFeatureEnabled } from "@/lib/feature-flags/server";
-// The page exists only while the instance offers some provider.
-async function AvailabilityGate() {
- const providers = await loadAvailableConferencingProviders();
- if (providers.length === 0) {
- notFound();
- }
- return null;
-}
-
export default function ConferencingPage() {
if (!isFeatureEnabled("conferencing")) {
notFound();
@@ -39,9 +32,6 @@ export default function ConferencingPage() {
return (
<SettingsPage>
- <Suspense fallback={null}>
- <AvailabilityGate />
- </Suspense>
<ConferencingConnectionFlash />
<SettingsPageHeader>
<SettingsPageTitle>
@@ -68,9 +58,10 @@ export default function ConferencingPage() {
}
async function ProviderList() {
- const [available, connections] = await Promise.all([
+ const [available, connections, user] = await Promise.all([
loadAvailableConferencingProviders(),
loadConferencingConnections(),
+ loadUser(),
]);
// The stored provider is the OAuth provider ("google"); the form and icons
// speak in conferencing providers, which the integration id identifies.
@@ -92,6 +83,9 @@ async function ProviderList() {
const providers = conferencingProviderSchema.options.filter(
(provider) => available.includes(provider) || connected.has(provider),
);
+ if (providers.length === 0) {
+ return <ConferencingEmptyState isAdmin={user.role === "admin"} />;
+ }
return (
<ConferencingProviderList
providers={providers.map((provider) => ({
diff --git a/apps/web/src/app/[locale]/(space)/settings/layout.tsx b/apps/web/src/app/[locale]/(space)/settings/layout.tsx
index 1df772112..eb954a671 100644
--- a/apps/web/src/app/[locale]/(space)/settings/layout.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/layout.tsx
@@ -16,23 +16,17 @@ import {
} from "@rallly/ui/sidebar";
import { ArrowLeftIcon, SettingsIcon } from "lucide-react";
import type React from "react";
-import { Suspense } from "react";
import { HoverPrefetchLink } from "@/components/hover-prefetch-link";
import { PastDueAlert } from "@/features/billing/components/past-due-alert";
-import { loadAvailableConferencingProviders } from "@/features/conferencing/loaders";
import { NavUser } from "@/features/user/components/nav-user";
import { Trans } from "@/i18n/client";
+import { isFeatureEnabled } from "@/lib/feature-flags/server";
import {
AccountSidebarMenu,
DeveloperSidebarMenu,
SpaceSidebarMenu,
} from "./components/sidebar";
-async function AccountMenu() {
- const providers = await loadAvailableConferencingProviders();
- return <AccountSidebarMenu showConferencing={providers.length > 0} />;
-}
-
export default function Layout({ children }: { children?: React.ReactNode }) {
return (
<SidebarProvider>
@@ -69,11 +63,9 @@ export default function Layout({ children }: { children?: React.ReactNode }) {
<Trans i18nKey="account" defaults="Account" />
</SidebarGroupLabel>
<SidebarGroupContent>
- <Suspense
- fallback={<AccountSidebarMenu showConferencing={false} />}
- >
- <AccountMenu />
- </Suspense>
+ <AccountSidebarMenu
+ showConferencing={isFeatureEnabled("conferencing")}
+ />
</SidebarGroupContent>
</SidebarGroup>
<SidebarGroup>
diff --git a/apps/web/src/features/conferencing/components/conferencing-empty-state.tsx b/apps/web/src/features/conferencing/components/conferencing-empty-state.tsx
new file mode 100644
index 000000000..a8108eeef
--- /dev/null
+++ b/apps/web/src/features/conferencing/components/conferencing-empty-state.tsx
@@ -0,0 +1,57 @@
+import { buttonVariants } from "@rallly/ui";
+import { VideoIcon } from "lucide-react";
+import {
+ EmptyState,
+ EmptyStateDescription,
+ EmptyStateFooter,
+ EmptyStateIcon,
+ EmptyStateTitle,
+} from "@/components/empty-state";
+import { Trans } from "@/i18n/client";
+import { CONFERENCING_SETUP_DOCS_URL } from "../constants";
+
+// Conferencing is switched on but no provider has credentials. Only an
+// instance admin can fix that, so only they get the way forward.
+export function ConferencingEmptyState({ isAdmin }: { isAdmin: boolean }) {
+ return (
+ <EmptyState>
+ <EmptyStateIcon>
+ <VideoIcon />
+ </EmptyStateIcon>
+ <EmptyStateTitle>
+ <Trans
+ i18nKey="conferencingEmptyStateTitle"
+ defaults="No video call providers set up"
+ />
+ </EmptyStateTitle>
+ <EmptyStateDescription>
+ {isAdmin ? (
+ <Trans
+ i18nKey="conferencingEmptyStateAdminDescription"
+ defaults="Add the OAuth credentials of a video call provider to your configuration and restart Rallly."
+ />
+ ) : (
+ <Trans
+ i18nKey="conferencingEmptyStateMemberDescription"
+ defaults="Ask your administrator to set up a video call provider. You can still paste your own link when creating a poll."
+ />
+ )}
+ </EmptyStateDescription>
+ {isAdmin ? (
+ <EmptyStateFooter>
+ <a
+ href={CONFERENCING_SETUP_DOCS_URL}
+ target="_blank"
+ rel="noopener noreferrer"
+ className={buttonVariants()}
+ >
+ <Trans
+ i18nKey="conferencingEmptyStateSetupGuide"
+ defaults="Read the setup guide"
+ />
+ </a>
+ </EmptyStateFooter>
+ ) : null}
+ </EmptyState>
+ );
+}
diff --git a/apps/web/src/features/conferencing/constants.ts b/apps/web/src/features/conferencing/constants.ts
index 81f4d1265..db13eee19 100644
--- a/apps/web/src/features/conferencing/constants.ts
+++ b/apps/web/src/features/conferencing/constants.ts
@@ -3,6 +3,9 @@ import type { ConferencingProvider } from "./schema";
export const isConferencingEnabled =
process.env.CONFERENCING_ENABLED === "true";
+export const CONFERENCING_SETUP_DOCS_URL =
+ "https://support.rallly.co/self-hosting/conferencing";
+
// A provider is offered when its OAuth app is configured; Google Meet reuses
// the Google OAuth app the calendars integration already needs, and Microsoft
// Teams the Microsoft app sign in uses. Webex has an integration of its own.