mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 02:15:05 +03:00
### Changes - Accept `start` prop in `OrderedList` and use it to set `counterReset` on the `<ol>` element, fixing numbering when Streamdown splits lists across code blocks - Add test for the above ### To Verify Copy/paste the following into the Assistant chat (`Cmd + I` on dashboard) ~~~ Testing markdown lists with code blocks. 1. Thing 1 ``` code ``` 2. Thing 2 ``` code ``` 3. Thing 3 ``` code ``` ~~~ </p> </details> | Before | After | |--------|--------| | <img width="1580" height="628" alt="CleanShot 2026-02-05 at 15 04 14@2x" src="https://github.com/user-attachments/assets/263be289-4a9a-4a8d-b907-cb62a26389cd" /> | <img width="1426" height="622" alt="CleanShot 2026-02-05 at 15 04 08@2x" src="https://github.com/user-attachments/assets/6bfb526b-30dc-4bcc-b507-0fa0418d3093" /> | Closes AI-401 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Ordered lists in the AI Assistant panel now support custom starting numbers, enabling proper continuation of numbered sequences. This ensures correct numbering when displaying complex content like code blocks within lists. * **Tests** * Added test coverage for ordered list custom starting number functionality and style rendering. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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