From ea539b4f83f413b7dc822be37d962ff3d5444b92 Mon Sep 17 00:00:00 2001 From: Miranda Limonczenko Date: Tue, 23 Jun 2026 10:38:47 -0700 Subject: [PATCH] fix(docs) Remove unneeded double border on docs Accordion (#47202) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes DOCS-974 Screenshot 2026-06-22 at 3 11 13 PM ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## Problem From Linear: Accordion usage in the docs is inconsistent and can render with double lines instead of single lines. The current docs contribution guidance appears to recommend wrapping accordions with an extra div, which seems to be the cause of the extra divider in some pages. ## Solution This PR: - Removes all wrapping `divs` to AccordionItems that adds an extra border - For a11y, adds a cursor pointer and a slight bg color change on hover to make the clickable area more obvious - For a11y, adds reduce-motion option for animation and `aria-hidden` on the chevron **Note:** It is good for a11y to have more than one hover-state indicator. For example, color-change and an underline. ## Tophatting To review changes on the preview environment: 1. Go to `/docs/guides/platform/backups` and `/docs/guides/platform/migrating-to-supabase/auth0#frequently-asked-questions-faq`. 2. Expand accordion. 3. See nothing visually odd such as strange spacing or double borders. **Note:** To be exhaustive in your review, view all affected URLs and scan the docs for `border-b` to see if there are any stragglers. ## Summary by CodeRabbit * **Style** * Enhanced accordion components with improved hover state styling for better visual feedback. * **Refactor** * Simplified accordion markup across documentation pages for cleaner, more consistent layout and improved component nesting structure. --- apps/docs/app/contributing/content.mdx | 22 +++++----------- apps/docs/content/guides/cron/quickstart.mdx | 4 +-- apps/docs/content/guides/platform/backups.mdx | 2 -- .../backup-restore.mdx | 8 +++--- .../dashboard-restore.mdx | 9 ++----- .../content/guides/platform/read-replicas.mdx | 5 +--- ...-access-supabase-project-lovable-cloud.mdx | 25 ++++--------------- .../edge-function-401-error-response.mdx | 13 +++------- .../edge-function-546-error-response.mdx | 7 ------ ...tify-lovable-cloud-or-supabase-backend.mdx | 23 ++++------------- .../restore-project-after-90-days-pause.mdx | 4 +-- .../ui/src/components/shadcn/ui/accordion.tsx | 20 ++++++++++++--- 12 files changed, 44 insertions(+), 98 deletions(-) diff --git a/apps/docs/app/contributing/content.mdx b/apps/docs/app/contributing/content.mdx index a4c0476d5d4..be59011c43b 100644 --- a/apps/docs/app/contributing/content.mdx +++ b/apps/docs/app/contributing/content.mdx @@ -26,7 +26,6 @@ For content that requires progressive disclosure: size="medium" className="text-foreground-light mt-8 mb-6" > -
-
-
-
``` @@ -59,8 +55,7 @@ For content that requires progressive disclosure: size="medium" className="text-foreground-light mt-8 mb-6" > -
- @@ -69,9 +64,7 @@ For content that requires progressive disclosure: -
-
- @@ -80,7 +73,6 @@ For content that requires progressive disclosure: -
### Admonition @@ -277,6 +269,7 @@ You can also import the `supabase-js` library here: ````mdx ```js import { createClient } from '@supabase/supabase-js' + const supabase = createClient('dummy', 'client') // ---cut--- @@ -291,6 +284,7 @@ Note the hidden statements above the cut. Hover over `signInWithPassword` to see ```js import { createClient } from '@supabase/supabase-js' + const supabase = createClient('dummy', 'client') // ---cut--- @@ -513,8 +507,7 @@ We incorporate content reuse in the docs to avoid duplication. If you find yours size="medium" className="text-foreground-light mt-8 mb-6" > -
- @@ -527,9 +520,7 @@ We incorporate content reuse in the docs to avoid duplication. If you find yours -
-
- @@ -542,7 +533,6 @@ We incorporate content reuse in the docs to avoid duplication. If you find yours -
To make a new partial: diff --git a/apps/docs/content/guides/cron/quickstart.mdx b/apps/docs/content/guides/cron/quickstart.mdx index 9ec8b35a846..38cb3cd7cd6 100644 --- a/apps/docs/content/guides/cron/quickstart.mdx +++ b/apps/docs/content/guides/cron/quickstart.mdx @@ -46,8 +46,7 @@ select cron.schedule('permanent-cron-job-name', '30 seconds', 'CALL do_something size="medium" className="text-foreground-light mt-8 mb-6" > -
- @@ -68,7 +67,6 @@ select cron.schedule('permanent-cron-job-name', '30 seconds', 'CALL do_something -
diff --git a/apps/docs/content/guides/platform/backups.mdx b/apps/docs/content/guides/platform/backups.mdx index 9a2123b6f4c..620117f4e2c 100644 --- a/apps/docs/content/guides/platform/backups.mdx +++ b/apps/docs/content/guides/platform/backups.mdx @@ -97,7 +97,6 @@ Projects that want to use PITR must also use at least a Small compute add-on to size="medium" className="text-foreground-light mt-8 mb-6" > -
-
diff --git a/apps/docs/content/guides/platform/migrating-within-supabase/backup-restore.mdx b/apps/docs/content/guides/platform/migrating-within-supabase/backup-restore.mdx index c686e8ca188..744d61ee7c5 100644 --- a/apps/docs/content/guides/platform/migrating-within-supabase/backup-restore.mdx +++ b/apps/docs/content/guides/platform/migrating-within-supabase/backup-restore.mdx @@ -84,11 +84,9 @@ breadcrumb: 'Migrations' size="medium" className="text-foreground-light mt-8 mb-6" > -
- - <$Partial path="postgres_installation.mdx" /> - -
+ + <$Partial path="postgres_installation.mdx" /> + ### Restore backup using CLI diff --git a/apps/docs/content/guides/platform/migrating-within-supabase/dashboard-restore.mdx b/apps/docs/content/guides/platform/migrating-within-supabase/dashboard-restore.mdx index 3e59cdeb9a7..f403e599b68 100644 --- a/apps/docs/content/guides/platform/migrating-within-supabase/dashboard-restore.mdx +++ b/apps/docs/content/guides/platform/migrating-within-supabase/dashboard-restore.mdx @@ -20,17 +20,13 @@ Dashboard backups are only available for older projects that still use logical b size="medium" className="text-foreground-light mt-8 mb-6" > -
- <$Partial path="postgres_installation.mdx" /> - -
-
- @@ -52,7 +48,6 @@ Dashboard backups are only available for older projects that still use logical b -
## Things to keep in mind diff --git a/apps/docs/content/guides/platform/read-replicas.mdx b/apps/docs/content/guides/platform/read-replicas.mdx index 2fb83ea8c4f..e0a106e0c3d 100644 --- a/apps/docs/content/guides/platform/read-replicas.mdx +++ b/apps/docs/content/guides/platform/read-replicas.mdx @@ -38,8 +38,7 @@ You can only read data from a Read Replica. This is in contrast to a Primary dat size="large" className="text-foreground-light mt-8 mb-6" > -
- @@ -53,8 +52,6 @@ You can only read data from a Read Replica. This is in contrast to a Primary dat -
- ## Features diff --git a/apps/docs/content/troubleshooting/cant-access-supabase-project-lovable-cloud.mdx b/apps/docs/content/troubleshooting/cant-access-supabase-project-lovable-cloud.mdx index ab90657e827..b090af0c2ab 100644 --- a/apps/docs/content/troubleshooting/cant-access-supabase-project-lovable-cloud.mdx +++ b/apps/docs/content/troubleshooting/cant-access-supabase-project-lovable-cloud.mdx @@ -60,8 +60,7 @@ For more information, read [the Lovable Cloud FAQ](https://docs.lovable.dev/feat size="medium" className="text-foreground-light mt-8 mb-6" > -
- @@ -70,10 +69,7 @@ For more information, read [the Lovable Cloud FAQ](https://docs.lovable.dev/feat -
- -
- @@ -82,10 +78,7 @@ For more information, read [the Lovable Cloud FAQ](https://docs.lovable.dev/feat -
- -
- @@ -96,10 +89,7 @@ For more information, read [the Lovable Cloud FAQ](https://docs.lovable.dev/feat -
- -
- @@ -108,10 +98,7 @@ For more information, read [the Lovable Cloud FAQ](https://docs.lovable.dev/feat -
- -
- @@ -122,6 +109,4 @@ For more information, read [the Lovable Cloud FAQ](https://docs.lovable.dev/feat -
- diff --git a/apps/docs/content/troubleshooting/edge-function-401-error-response.mdx b/apps/docs/content/troubleshooting/edge-function-401-error-response.mdx index 91d669e2415..b6e3ffc3eee 100644 --- a/apps/docs/content/troubleshooting/edge-function-401-error-response.mdx +++ b/apps/docs/content/troubleshooting/edge-function-401-error-response.mdx @@ -143,8 +143,7 @@ Your project uses the [new asymmetric keys](/blog/jwt-signing-keys) for authenti size="medium" className="text-foreground-light mt-8 mb-6" > -
- @@ -154,10 +153,7 @@ In the [Functions Dashboard](/dashboard/project/_/functions/), open the affected ![image](/docs/img/troubleshooting/401_edge_functions_toggle_off_JWT_check.png) - -
-
- @@ -170,9 +166,7 @@ supabase functions deploy YOUR_FUNCTION_NAME --no-verify-jwt -
-
- @@ -192,7 +186,6 @@ curl 'https://api.supabase.com/v1/projects/PROJECT_ID/functions/FUNCTION_NAME' \ -
### Invalid key diff --git a/apps/docs/content/troubleshooting/edge-function-546-error-response.mdx b/apps/docs/content/troubleshooting/edge-function-546-error-response.mdx index 5a632cc7455..cc869fa405a 100644 --- a/apps/docs/content/troubleshooting/edge-function-546-error-response.mdx +++ b/apps/docs/content/troubleshooting/edge-function-546-error-response.mdx @@ -141,7 +141,6 @@ There are a few other queries that may be useful for identifying patterns around size="medium" className="text-foreground-light mt-8 mb-6" > -
-
-
-
- -
-
## Step 3: Correcting the error diff --git a/apps/docs/content/troubleshooting/identify-lovable-cloud-or-supabase-backend.mdx b/apps/docs/content/troubleshooting/identify-lovable-cloud-or-supabase-backend.mdx index 681ba694b81..ad7d7d68cc0 100644 --- a/apps/docs/content/troubleshooting/identify-lovable-cloud-or-supabase-backend.mdx +++ b/apps/docs/content/troubleshooting/identify-lovable-cloud-or-supabase-backend.mdx @@ -60,8 +60,7 @@ If the page displays the Supabase icon, your Supabase project name, and some lin size="medium" className="text-foreground-light mt-8 mb-6" > -
- @@ -70,10 +69,7 @@ If the page displays the Supabase icon, your Supabase project name, and some lin -
- -
- @@ -82,10 +78,7 @@ If the page displays the Supabase icon, your Supabase project name, and some lin -
- -
- @@ -96,7 +89,6 @@ If the page displays the Supabase icon, your Supabase project name, and some lin -
## Lovable Cloud – specific questions @@ -109,8 +101,7 @@ If the page displays the Supabase icon, your Supabase project name, and some lin size="medium" className="text-foreground-light mt-8 mb-6" > -
- @@ -123,10 +114,7 @@ If the page displays the Supabase icon, your Supabase project name, and some lin -
- -
- @@ -137,5 +125,4 @@ If the page displays the Supabase icon, your Supabase project name, and some lin -
diff --git a/apps/docs/content/troubleshooting/restore-project-after-90-days-pause.mdx b/apps/docs/content/troubleshooting/restore-project-after-90-days-pause.mdx index 69ff401808e..3c91adbfe70 100644 --- a/apps/docs/content/troubleshooting/restore-project-after-90-days-pause.mdx +++ b/apps/docs/content/troubleshooting/restore-project-after-90-days-pause.mdx @@ -81,8 +81,7 @@ chmod +x sync_supabase_config.sh size="medium" className="text-foreground-light mt-8 mb-6" > -
- @@ -280,7 +279,6 @@ echo "Done. Configs saved to ${OUTDIR}/" -
The script saves both source and target configs to a local `config_sync_/` directory so you can review exactly what changed. Use `--dry-run` to preview differences without applying them. diff --git a/packages/ui/src/components/shadcn/ui/accordion.tsx b/packages/ui/src/components/shadcn/ui/accordion.tsx index 3fe13251534..34ed3cc306e 100644 --- a/packages/ui/src/components/shadcn/ui/accordion.tsx +++ b/packages/ui/src/components/shadcn/ui/accordion.tsx @@ -24,13 +24,24 @@ const AccordionTrigger = React.forwardRef< svg]:rotate-180 text-left', + 'cursor-pointer flex flex-1 gap-2 items-center justify-between py-4 text-left', + 'font-medium transition-all hover:underline', + '[&[data-state=open]>svg]:rotate-180', className )} {...props} > {children} - {!hideIcon && } + {!hideIcon && ( + )) @@ -43,7 +54,10 @@ const AccordionContent = React.forwardRef<