## What kind of change does this PR introduce?
Refactor, cleanup, and docs update.
## What is the current behavior?
After the page-title rollout, `ProjectLayout` is still in a transitional
state:
- it accepts a deprecated `title` prop
- it still supports a separate `browserTitle.surface`
- wrapper layouts are split between passing `title` directly and passing
`browserTitle.section`
That makes the API harder to reason about than it needs to be, even
though the rendered titles are already correct.
## What is the new behavior?
This cleanup finishes the API simplification that came out of the
stacked PR review:
- wrapper layouts stay `title`-first for DX
- `ProjectLayout` no longer accepts `title`
- `product` is now the single source of truth for the project-surface
title segment
- `browserTitle` is now only used for extra browser-title metadata
(`entity`, `section`, `override`)
- the remaining project-scoped callers now pass `browserTitle.section`
when they need a section label
- docs now reflect the final pattern instead of the transitional one
Rendered page titles stay the same.
## Additional context
Checks run:
- `pnpm --filter studio exec vitest --run lib/page-title.test.ts
components/layouts/ProjectLayout/index.test.tsx`
- `pnpm --filter studio typecheck`
- `pnpm exec prettier --check ...` on touched files
This is intended as the post-rollout cleanup PR based on Joshen's review
feedback across the stacked title changes.
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Stacked PR 2/5 for page title improvements. Includes Auth, Database,
editors, and Edge Functions layout title adoption.
_Base:
[dnywh/feat/page-titles](https://github.com/supabase/supabase/pull/43538)_
---
## What kind of change does this PR introduce?
- Resolves FE-1960
- Resolves FE-1983
- Resolves DEPR-207
## What is the current behavior?
Page titles between surfaces are inconsistent and vague. Sometimes they
say the product name:
```
My Project | My Org | Supabase
```
...even when on a specific surface like Database > Tables.
Other times they show the entity name but skip over the project or org
name :
```
Edge Functions | Supabase
```
## What is the new behavior?
Auth, Database, editors, and Edge Functions adopt the layout title
format introduced in https://github.com/supabase/supabase/pull/43538:
```
users | Table Editor | My Project | My Org | Supabase
hello-world | Logs | Edge Functions | My Project | My Org | Supabase
Backups | Database | My Project | My Org | Supabase
Authentication | My Project | My Org | Supabase
```
That format is:
entity, section, surface, project, org, brand
## Additional context
Related stacked PRs also based on the the original
[dnywh/feat/page-titles](https://github.com/supabase/supabase/pull/43538)
branch:
- https://github.com/supabase/supabase/pull/43535
- https://github.com/supabase/supabase/pull/43536
- https://github.com/supabase/supabase/pull/43537
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* feat(preferences): allow disable hotkeys
Add a section in /account/me for disabling hotkeys. Only added one
hotkey for now (Cmd + E for toggling editor side panel) but we can add
more with the same pattern.
* refactor: remove default export on ProjectLayout
* feat(hotkeys): allow toggling of command menu and ai assistant hotkeys
* Nit
* PRettier lint
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* page components
* page component changes
* settings but broken saving
* rvert
* use sheet for provider
* styling
* remove things
* Some refactoring and fixing, added JSDocs to layouts
* Smol refactor
* Fix
* Update JSDocs
* updated scaffolding
* update edge functions layout
* remove params
* Clean up
* Spelling
* Clean up FormFieldWrappers
* One last clean up
* create edge functon
* use component
* flag
* fix merge errors
* fix imports
* fix merge issues
* fix import
* fix flag
* remove unused
* move templates
* re-add flag
* Small refactors
* Smol refactors
* Refactor
* add rename and delete via context
* create function fixes
* moved function name
* Smol update
* Small fix for selected state in edge functions side menu when on /new
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* page components
* page component changes
* settings but broken saving
* rvert
* use sheet for provider
* styling
* remove things
* Some refactoring and fixing, added JSDocs to layouts
* Smol refactor
* Fix
* Update JSDocs
* updated scaffolding
* update edge functions layout
* remove params
* single function layout
* invocation cleanup
* remove vars
* Clean up
* Spelling
* Clean up FormFieldWrappers
* One last clean up
* fix merge errors
* fix merge errors
* rmeove import
* Address comments
* Remove unnecessary prop
* Remove settings/functions and add redirects in next config
* fix empty
* Fix key prop issue and fix selected state in layout for single edge function
* Clean up edge function details
* Use zodResolver
* Refactor file name
* Remove unnecessary fragment
* Small refactors
* Refactor deleting edge function to use ConfirmationModal
* edge details fixes
* Small adjustment to paddings
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>