Skip to content

Commit

Permalink
Wafer map api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jattasNI committed May 30, 2024
1 parent 64ff7a2 commit 9271e42
Showing 1 changed file with 45 additions and 44 deletions.
89 changes: 45 additions & 44 deletions packages/storybook/src/nimble/wafer-map/wafer-map.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import {
wafermapDiesTableSets
} from './sets';
import {
apiCategory,
checkValidityDescription,
createUserSelectedThemeStory,
incubatingWarning
} from '../../utilities/storybook';
Expand All @@ -47,6 +49,7 @@ interface WaferMapArgs {
gridMaxY: number | undefined;
dieHover: unknown;
validity: WaferMapValidity;
checkValidity: undefined;
}

const getDiesSet = (
Expand Down Expand Up @@ -205,13 +208,7 @@ const metadata: Meta<WaferMapArgs> = {
defaultValue: 'stable'
},
colorScale: {
description: `Represents the color spectrum which shows the status of the dies on the wafer.
<details>
<summary>Usage details</summary>
The \`colorScale\` element is a public property. As such, it is not available as an attribute, however it can be read or set on the corresponding \`WaferMap\` DOM element.
</details>
`,
description: 'Represents the color spectrum which shows the status of the dies on the wafer.',
options: ['set1'],
control: {
type: 'radio',
Expand All @@ -222,7 +219,8 @@ const metadata: Meta<WaferMapArgs> = {
defaultValue: 'set1',
mapping: {
set1: waferMapColorScaleSets[0]
}
},
table: { category: apiCategory.nonAttributeProperties },
},
colorScaleMode: {
name: 'color-scale-mode',
Expand All @@ -235,16 +233,11 @@ const metadata: Meta<WaferMapArgs> = {
[WaferMapColorScaleMode.linear]: 'Linear',
[WaferMapColorScaleMode.ordinal]: 'Ordinal'
}
}
},
table: { category: apiCategory.attributes },
},
dies: {
description: `Represents the input data, an array of \`WaferMapDie\`, which will be rendered by the wafer map. Part of the Stable API.
<details>
<summary>Usage details</summary>
The \`dies\` element is a public property. As such, it is not available as an attribute, however it can be read or set on the corresponding \`WaferMap\` DOM element.
</details>
`,
description: 'Represents the input data, an array of `WaferMapDie`, which will be rendered by the wafer map. Part of the Stable API.',
options: [
'fixedDies10',
'goodDies100',
Expand All @@ -261,16 +254,11 @@ const metadata: Meta<WaferMapArgs> = {
}
},
defaultValue: 'fixedDies10',
if: { arg: 'apiVersion', eq: 'stable' }
if: { arg: 'apiVersion', eq: 'stable' },
table: { category: apiCategory.nonAttributeProperties },
},
diesTable: {
description: `Represents the input data, an apache-arrow \`Table\`, which will be rendered by the wafer map. Part of the Experimental API.
<details>
<summary>Usage details</summary>
The \`diesTable\` element is a public property. As such, it is not available as an attribute, however it can be read or set on the corresponding \`WaferMap\` DOM element.
</details>
`,
description: 'Represents the input data, an apache-arrow `Table`, which will be rendered by the wafer map. Part of the Experimental API.',
options: [
'fixedDies10',
'goodDies100',
Expand All @@ -287,16 +275,11 @@ const metadata: Meta<WaferMapArgs> = {
}
},
defaultValue: 'fixedDies10',
if: { arg: 'apiVersion', eq: 'experimental' }
if: { arg: 'apiVersion', eq: 'experimental' },
table: { category: apiCategory.nonAttributeProperties },
},
highlightedTags: {
description: `Represent a list of strings that will be highlighted in the wafer map view. Each die has a tags?: string[] property, if at least one element of highlightedTags equals at least one element of die.tags the die will be highlighted.
<details>
<summary>Usage details</summary>
The \`highlightedTags\` element is a public property. As such, it is not available as an attribute, however it can be read or set on the corresponding \`WaferMap\` DOM element.
</details>
`,
description: 'Represent a list of strings that will be highlighted in the wafer map view. Each die has a tags?: string[] property, if at least one element of highlightedTags equals at least one element of die.tags the die will be highlighted.',
options: ['set1', 'set2', 'set3', 'set4'],
control: {
type: 'radio',
Expand All @@ -307,25 +290,29 @@ const metadata: Meta<WaferMapArgs> = {
set4: 'Many dies are highlighted'
}
},
defaultValue: 'set1'
defaultValue: 'set1',
table: { category: apiCategory.nonAttributeProperties },
},
dieLabelsHidden: {
name: 'die-labels-hidden',
description:
'Boolean value that determines if the dies labels in the wafer map view are shown or not. Default value is false.',
control: { type: 'boolean' }
control: { type: 'boolean' },
table: { category: apiCategory.attributes },
},
dieLabelsSuffix: {
name: 'die-labels-suffix',
description:
'String that can be added as a label at the end of each wafer map die value',
control: { type: 'text' }
control: { type: 'text' },
table: { category: apiCategory.attributes },
},
maxCharacters: {
name: 'max-characters',
description:
'Represents the number of characters allowed to be displayed within a single die. As the die values are represented by Floating point numbers, we must have the liberty of limiting how many characters we are willing to display within a single die.',
control: { type: 'number' }
control: { type: 'number' },
table: { category: apiCategory.attributes },
},
orientation: {
description: 'Notch orientation',
Expand All @@ -338,7 +325,8 @@ const metadata: Meta<WaferMapArgs> = {
[WaferMapOrientation.right]: 'right',
[WaferMapOrientation.bottom]: 'bottom'
}
}
},
table: { category: apiCategory.attributes },
},
originLocation: {
name: 'origin-location',
Expand All @@ -353,36 +341,42 @@ const metadata: Meta<WaferMapArgs> = {
[WaferMapOriginLocation.topLeft]: 'top-left',
[WaferMapOriginLocation.topRight]: 'top-right'
}
}
},
table: { category: apiCategory.attributes },
},
gridMinX: {
name: 'grid-min-x',
description:
'Represents the X coordinate of the minimum corner of the the grid bounding box for rendering the wafer map. Leaving the value `undefined` will set the value to the minimum X value of the bounding box of the input dies coordinates.',
control: { type: 'number' }
control: { type: 'number' },
table: { category: apiCategory.attributes },
},
gridMaxX: {
name: 'grid-max-x',
description:
'Represents the X coordinate of the maximum corner of the the grid bounding box for rendering the wafer map. Leaving the value `undefined` will set the value to the maximum X value of the bounding box of the input dies coordinates.',
control: { type: 'number' }
control: { type: 'number' },
table: { category: apiCategory.attributes },
},
gridMinY: {
name: 'grid-min-y',
description:
'Represents the Y coordinate of the minimum corner of the the grid bounding box for rendering the wafer map. Leaving the value `undefined` will set the value to the minimum Y value of the bounding box of the input dies coordinates.',
control: { type: 'number' }
control: { type: 'number' },
table: { category: apiCategory.attributes },
},
gridMaxY: {
name: 'grid-max-y',
description:
'Represents the Y coordinate of the maximum corner of the the grid bounding box for rendering the wafer map. Leaving the value `undefined` will set the value to the maximum Y value of the bounding box of the input dies coordinates.',
control: { type: 'number' }
control: { type: 'number' },
table: { category: apiCategory.attributes },
},
dieHover: {
name: 'die-hover',
description:
'Event emitted whenever the mouse enters or leaves a die. In the event data, `detail.currentDie` will be set to the `WaferMapDie` element of the `dies` array that is being hovered or `undefined` if the mouse is leaving a die.'
'Event emitted whenever the mouse enters or leaves a die. In the event data, `detail.currentDie` will be set to the `WaferMapDie` element of the `dies` array that is being hovered or `undefined` if the mouse is leaving a die.',
table: { category: apiCategory.events },
},
validity: {
description: `Readonly object of boolean values that represents the validity states that the wafer map's configuration can be in.
Expand All @@ -391,7 +385,14 @@ The object's type is \`WaferMapValidity\`, and it contains the following boolean
- \`invalidGridDimensions \`: \`true\` when some of the \`gridMinX\`, \`gridMinY\`, \`gridMaxX\` or \`gridMaxY\` are \`undefined\`, but \`false\` when all of them are provided or all of them are \`undefined\`
- \`invalidDiesTableSchema \`: \`true\` when the \`diesTable\` does not have all of the three expected columns: \`colIndex\`, \`rowIndex\` and \`value\`, but \`false\` when all of them are provided or the \`diesTable\` is \`undefined\``,
control: false
control: false,
table: { category: apiCategory.nonAttributeProperties },
},
checkValidity: {
name: 'checkValidity()',
description: checkValidityDescription({ componentName: 'wafer map' }),
control: false,
table: { category: apiCategory.methods },
}
}
};
Expand Down

0 comments on commit 9271e42

Please sign in to comment.