From a04bdb4d40fb666ebf8a7663d8297078551ccab4 Mon Sep 17 00:00:00 2001 From: Wen Bo Xie Date: Thu, 29 Jun 2023 14:36:55 -0700 Subject: [PATCH] docs: change Realtime header from Quickstarts to Features --- .../NavigationMenu/NavigationMenu.constants.ts | 8 ++++---- apps/docs/pages/guides/realtime.mdx | 6 +++--- .../realtime/{quickstarts => }/broadcast.mdx | 4 ++-- apps/docs/pages/guides/realtime/concepts.mdx | 6 +++--- .../{quickstarts => }/postgres-changes.mdx | 11 ++++++----- .../realtime/{quickstarts => }/presence.mdx | 5 +++-- apps/www/lib/redirects.js | 17 +---------------- 7 files changed, 22 insertions(+), 35 deletions(-) rename apps/docs/pages/guides/realtime/{quickstarts => }/broadcast.mdx (97%) rename apps/docs/pages/guides/realtime/{quickstarts => }/postgres-changes.mdx (97%) rename apps/docs/pages/guides/realtime/{quickstarts => }/presence.mdx (97%) diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index 995a6ac6e18..1a08ecc0efe 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -809,14 +809,14 @@ export const realtime: NavMenuConstant = { url: '/guides/realtime/concepts', }, { - name: 'Quickstarts', + name: 'Features', url: undefined, items: [ - { name: 'Broadcast', url: '/guides/realtime/quickstarts/broadcast' }, - { name: 'Presence', url: '/guides/realtime/quickstarts/presence' }, + { name: 'Broadcast', url: '/guides/realtime/broadcast' }, + { name: 'Presence', url: '/guides/realtime/presence' }, { name: 'Postgres Changes', - url: '/guides/realtime/quickstarts/postgres-changes', + url: '/guides/realtime/postgres-changes', }, ], }, diff --git a/apps/docs/pages/guides/realtime.mdx b/apps/docs/pages/guides/realtime.mdx index 2c3dbdc0c91..b11c3a56049 100644 --- a/apps/docs/pages/guides/realtime.mdx +++ b/apps/docs/pages/guides/realtime.mdx @@ -9,9 +9,9 @@ export const meta = { Supabase provides a globally distributed cluster of [Realtime](https://github.com/supabase/realtime) servers that enable the following functionality: -- [Broadcast](/docs/guides/realtime/quickstarts/broadcast): Send ephemeral messages from client to clients with low latency. -- [Presence](/docs/guides/realtime/quickstarts/presence): Track and synchronize shared state between clients. -- [Postgres Changes](/docs/guides/realtime/quickstarts/postgres-changes): Listen to Postgres database changes and send them to authorized clients. +- [Broadcast](/docs/guides/realtime/broadcast): Send ephemeral messages from client to clients with low latency. +- [Presence](/docs/guides/realtime/presence): Track and synchronize shared state between clients. +- [Postgres Changes](/docs/guides/realtime/postgres-changes): Listen to Postgres database changes and send them to authorized clients. A [channel](https://hexdocs.pm/phoenix/channels.html) is the basic building block of Realtime and narrows the scope of data flow to subscribed clients. You can think of a channel as a chatroom where participants are able to see who's online and send and receive messages; similar to a Discord or Slack channel. diff --git a/apps/docs/pages/guides/realtime/quickstarts/broadcast.mdx b/apps/docs/pages/guides/realtime/broadcast.mdx similarity index 97% rename from apps/docs/pages/guides/realtime/quickstarts/broadcast.mdx rename to apps/docs/pages/guides/realtime/broadcast.mdx index 3ebbec99d55..11468464e77 100644 --- a/apps/docs/pages/guides/realtime/quickstarts/broadcast.mdx +++ b/apps/docs/pages/guides/realtime/broadcast.mdx @@ -267,8 +267,8 @@ Learn more by visiting the [Quotas](/docs/guides/realtime/quotas) section. ## More Realtime Quickstarts -- [Presence Quickstart](/docs/guides/realtime/quickstarts/presence) -- [Postgres Changes Quickstart](/docs/guides/realtime/quickstarts/postgres-changes) +- [Presence Quickstart](/docs/guides/realtime/presence) +- [Postgres Changes Quickstart](/docs/guides/realtime/postgres-changes) export const Page = ({ children }) => diff --git a/apps/docs/pages/guides/realtime/concepts.mdx b/apps/docs/pages/guides/realtime/concepts.mdx index 46cce126a11..af4dee031bd 100644 --- a/apps/docs/pages/guides/realtime/concepts.mdx +++ b/apps/docs/pages/guides/realtime/concepts.mdx @@ -9,9 +9,9 @@ export const meta = { Supabase Realtime lets you to build real-time applications with collaborative/multiplayer functionality. It includes 3 core features: -- [Broadcast](/docs/guides/realtime/quickstarts/broadcast): sends rapid, ephemeral messages to other connected clients. You can use it to track mouse movements, for example. -- [Presence](/docs/guides/realtime/quickstarts/presence): sends user state between connected clients. You can use it to show an "online" status, which disappears when a user is disconnected. -- [Postgres Changes](/docs/guides/realtime/quickstarts/postgres-changes): receives database changes in real-time. +- [Broadcast](/docs/guides/realtime/broadcast): sends rapid, ephemeral messages to other connected clients. You can use it to track mouse movements, for example. +- [Presence](/docs/guides/realtime/presence): sends user state between connected clients. You can use it to show an "online" status, which disappears when a user is disconnected. +- [Postgres Changes](/docs/guides/realtime/postgres-changes): receives database changes in real-time. ## Channels diff --git a/apps/docs/pages/guides/realtime/quickstarts/postgres-changes.mdx b/apps/docs/pages/guides/realtime/postgres-changes.mdx similarity index 97% rename from apps/docs/pages/guides/realtime/quickstarts/postgres-changes.mdx rename to apps/docs/pages/guides/realtime/postgres-changes.mdx index 0a0d89a1bfd..fff858d3903 100644 --- a/apps/docs/pages/guides/realtime/quickstarts/postgres-changes.mdx +++ b/apps/docs/pages/guides/realtime/postgres-changes.mdx @@ -1,9 +1,10 @@ import Layout from '~/layouts/DefaultGuideLayout' +import StepHikeCompact from '~/components/StepHikeCompact' export const meta = { - id: 'postgres-changes', title: 'Postgres Changes', - description: "Getting started with Realtime's Postgres Changes feature", + subtitle: "Get up and running with Realtime's Postgres Changes feature", + breadcrumb: 'Realtime Postgres Changes Quickstart', } Realtime's Postgres Changes feature listens for database changes and sends them to clients. Clients are required to subscribe with a JWT dictating which changes they are allowed to receive based on the database's [Row Level Security](/docs/guides/auth/row-level-security). @@ -226,7 +227,7 @@ Let's explore how to implement Realtime Postgres Changes so you can integrate it - Check out the [full list of available filters](/docs/guides/realtime/quickstarts/postgres-changes#available-filters). + Check out the [full list of available filters](/docs/guides/realtime/postgres-changes#available-filters). @@ -531,8 +532,8 @@ supabase.realtime.setAuth('fresh-token') ## More Realtime Quickstarts -- [Broadcast Quickstart](/docs/guides/realtime/quickstarts/broadcast) -- [Presence Quickstart](/docs/guides/realtime/quickstarts/presence) +- [Broadcast Quickstart](/docs/guides/realtime/broadcast) +- [Presence Quickstart](/docs/guides/realtime/presence) export const Page = ({ children }) => diff --git a/apps/docs/pages/guides/realtime/quickstarts/presence.mdx b/apps/docs/pages/guides/realtime/presence.mdx similarity index 97% rename from apps/docs/pages/guides/realtime/quickstarts/presence.mdx rename to apps/docs/pages/guides/realtime/presence.mdx index f001fc2ae5b..311e6aec849 100644 --- a/apps/docs/pages/guides/realtime/quickstarts/presence.mdx +++ b/apps/docs/pages/guides/realtime/presence.mdx @@ -6,6 +6,7 @@ export const meta = { subtitle: "Get up and running with Realtime's Presence feature", breadcrumb: 'Realtime Presence Quickstart', } + Presence can be used to share state between clients. Each client maintains their own piece of state within the shared state. Presence utilizes an in-memory conflict-free replicated data type (CRDT) to track and synchronize shared state in an eventually consistent manner. It computes the difference between existing state and new state changes and sends the necessary updates to clients via Broadcast. @@ -266,8 +267,8 @@ Learn more by visiting the [Quotas](/docs/guides/realtime/quotas) section. ## More Realtime Quickstarts -- [Broadcast Quickstart](/docs/guides/realtime/quickstarts/broadcast) -- [Postgres Changes Quickstart](/docs/guides/realtime/quickstarts/postgres-changes) +- [Broadcast Quickstart](/docs/guides/realtime/broadcast) +- [Postgres Changes Quickstart](/docs/guides/realtime/postgres-changes) export const Page = ({ children }) => diff --git a/apps/www/lib/redirects.js b/apps/www/lib/redirects.js index 17b3d26ff4e..e32c48b1759 100644 --- a/apps/www/lib/redirects.js +++ b/apps/www/lib/redirects.js @@ -2041,24 +2041,9 @@ module.exports = [ source: '/docs/guides/realtime/extensions/postgres-changes', destination: '/docs/guides/realtime/postgres-changes', }, - { - permanent: true, - source: '/docs/guides/realtime/broadcast', - destination: '/docs/guides/realtime/quickstarts/broadcast', - }, - { - permanent: true, - source: '/docs/guides/realtime/presence', - destination: '/docs/guides/realtime/quickstarts/presence', - }, - { - permanent: true, - source: '/docs/guides/realtime/postgres-changes', - destination: '/docs/guides/realtime/quickstarts/postgres-changes', - }, { permanent: true, source: '/docs/guides/realtime/quickstart', - destination: '/docs/guides/realtime/quickstarts/broadcast', + destination: '/docs/guides/realtime', }, ]