-
Notifications
You must be signed in to change notification settings - Fork 44
feat(site): feature and preset reference UI + docs integration #1258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
220870b
36a56b3
7b5d65f
6650ec4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| /** Ambient background video preset with no user controls. */ | ||
| export { backgroundFeatures } from '@videojs/core/dom'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| /** Ambient background video preset with no user controls. */ | ||
| export { backgroundFeatures } from '@videojs/core/dom'; | ||
| export { BackgroundVideo, type BackgroundVideoProps } from '@/media/background-video'; | ||
| export * from './skin'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| import Table from '@/components/typography/Table.astro'; | ||
| import Tbody from '@/components/typography/Tbody.astro'; | ||
| import Th from '@/components/typography/Th.astro'; | ||
| import Thead from '@/components/typography/Thead.astro'; | ||
| import Tr from '@/components/typography/Tr.astro'; | ||
| import type { FeatureActionDef } from '@/types/feature-reference'; | ||
| import StateRow from './StateRow.astro'; | ||
|
|
||
| interface Props { | ||
| actions: Record<string, FeatureActionDef>; | ||
| featureName: string; | ||
| } | ||
|
|
||
| const { actions, featureName } = Astro.props; | ||
|
|
||
| const actionEntries = Object.entries(actions); | ||
| --- | ||
|
|
||
| <Table maxWidth={false} outerClass="my-6"> | ||
| <Thead> | ||
| <Tr> | ||
| <Th>Action</Th> | ||
| <Th>Type</Th> | ||
| <Th>Details</Th> | ||
| </Tr> | ||
| </Thead> | ||
| <Tbody> | ||
| { | ||
| actionEntries.map(([name, def]) => ( | ||
| <StateRow | ||
| name={name} | ||
| type={def.type} | ||
| detailedType={def.detailedType} | ||
| description={def.description} | ||
| componentName={featureName} | ||
| /> | ||
| )) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actions table rows get wrong IDs from StateRowMedium Severity The Reviewed by Cursor Bugbot for commit 220870b. Configure here. |
||
| } | ||
| </Tbody> | ||
| </Table> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| --- | ||
| import { getEntry } from 'astro:content'; | ||
| import ContentWidth from '@/components/frames/ContentWidth.astro'; | ||
| import H2 from '@/components/typography/H2Markdown.astro'; | ||
| import H3 from '@/components/typography/H3Markdown.astro'; | ||
| import type { FeatureReference } from '@/types/feature-reference'; | ||
| import { createFeatureReferenceModel } from '@/utils/featureReferenceModel'; | ||
| import ApiActionsTable from './ApiActionsTable.astro'; | ||
| import ApiStateTable from './ApiStateTable.astro'; | ||
|
|
||
| interface Props { | ||
| feature: string; | ||
| } | ||
|
|
||
| const { feature } = Astro.props; | ||
|
|
||
| const entry = await getEntry('featureReference', feature); | ||
| const ref: FeatureReference | null = entry?.data ?? null; | ||
| if (!ref) return; | ||
|
|
||
| const model = createFeatureReferenceModel(feature, ref); | ||
| if (!model) return; | ||
|
|
||
| const stateSection = model.sections.find((s) => s.key === 'state'); | ||
| const actionsSection = model.sections.find((s) => s.key === 'actions'); | ||
| --- | ||
|
|
||
| <ContentWidth> | ||
| <H2 id={model.heading.id}>{model.heading.text}</H2> | ||
|
|
||
| { | ||
| stateSection && ( | ||
| <> | ||
| <H3 id={stateSection.id}>{stateSection.title}</H3> | ||
| <ApiStateTable state={model.data.state} componentName={feature} /> | ||
| </> | ||
| ) | ||
| } | ||
|
|
||
| { | ||
| actionsSection && ( | ||
| <> | ||
| <H3 id={actionsSection.id}>{actionsSection.title}</H3> | ||
| <ApiActionsTable actions={model.data.actions} featureName={feature} /> | ||
| </> | ||
| ) | ||
| } | ||
| </ContentWidth> |


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log messages overcount generated feature and preset files
Low Severity
The "Done!" log messages for features and presets currently report the total items found, using
featureResults.lengthandpresetResults.length. This differs from component and util logging, which track successful generations. As a result, these messages can overstate the number of files actually written if validation errors occur.Reviewed by Cursor Bugbot for commit 220870b. Configure here.