mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 03:15:06 +03:00
This PR: * Refactors integrations page implementation to make it simpler and easier to understand. * Integration category pages from marketplace db show category name and description. * Shows featured integrations coming from the marketplace db at the top of the page. * Hides empty categories: https://linear.app/supabase/issue/INT-113/hide-empty-categories-on-dashboard-integrations-page Below design related fixes will be done in a separate PR: https://github.com/supabase/supabase/pull/45856. So this PR is ready to merge with current fixes. <details> ~~Design fixes needed after consulting with the design team:~~ - [ ] ~~Do not use inverted colors on images for featured integrations. This leads to inconsistent images for the featured marketplace listings. E.g. Grafana listing shown in the featured listings:~~ <img width="463" height="260" alt="image" src="https://github.com/user-attachments/assets/76816807-667f-44b0-b68c-5e1ca342be1f" /> ~~vs shown on it's own page:~~ <img width="909" height="667" alt="image" src="https://github.com/user-attachments/assets/00efda48-3e4e-4b05-87ad-cbbce9047c94" /> - [ ] ~~The images on featured marketplace integrations should not be truncated as seen in the first image above.~~ - [ ] ~~The **Install integration** button feels floating far out on the right.~~ - [ ] ~~The description under the title is too long and truncated. Requested by Doppler here: https://supabase.slack.com/archives/C0AL11JG5MG/p1778009104728819?thread_ts=1777654129.027269&cid=C0AL11JG5MG~~ - [ ] ~~The content section doesn't render bulleted lists correctly.~~ </details> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Dedicated "Featured Integrations" section on the integrations page. * Integrations can be marked as featured to appear in the featured section. * **Improvements** * Sidebar shows only categories that contain integrations. * Integration image handling improved for featured cards. * Updated loading placeholders for integrations to provide a smoother loading experience. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45507) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
Writing components
Where to create your components
- For components that declare the general structure and layout of a page:
/components/layouts/xxx
- For components that are tightly coupled to a specific interface:
/components/interfaces/xxx
- For components that are meant to be reusable across multiple pages:
/components/ui/xxx
- Note: We're gradually moving files out of the
to-be-cleanedfolder into the respective folders as we refactor
Component structure
- If a component has constants and utility methods that are tightly coupled to itself, keep them close to the component and enclose them in a folder with an
index.tsxas an entry point - Otherwise it can just be a file on its own
- For example:
-
components/ui - SampleComponentA - SampleComponentA.tsx - SampleComponentA.constants.ts - SampleComponentA.utils.ts - SampleComponentA.types.ts - index.ts - SampleComponentB.tsx
-
Template for building components
// Declare the prop types of your component
interface ComponentAProps {
sampleProp: string
}
// Name your component accordingly
const ComponentA = ({ sampleProp }: ComponentAProps) => {
return <div>ComponentA: {sampleProp}</div>
}
export default ComponentA