mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 21:59:16 +03:00
* feat: tidy up query perf column headers * feat: update col widths and which ones are sortable This gives a reasonable column width to all cols as well as adds an option for us to filter out which columns we dont want to make the table sortable by. * feat: column order and word wrapping for query * feat: column data text align for numbers * fix: pointer event was preventing index advisor icon popover * feat: use code block instead of editor Swapped Editor out for Code block as its less expensive and modified it to add pgsql syntax highlighting * fix: small truncation issue * chore: remove unused sort function * fix: sort menu closing on first click Sort menu of a column no longer disappears on first click * feat: move sorting and ordering over to nuqs This removes the usage of Next Router params and uses Nuqs instead for managing the QP table sorting and ordering. * feat: add clear sorting button to filter bar * chore: remove unused files * fix: add highlighting for selected sort * Nit update sort * nit: smol styling update for direction * feat: inian feedback on time based numbers * fix: return number instead of string for total time We were returning a string for total time percentage which meant the sorting was a little bit off * Shift roles to nuqs * chore: clean up * fix: smaller viewport filter bar --------- Co-authored-by: Joshen Lim <joshenlimek@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