Skip to content

Conversation

@fge-aeb
Copy link
Contributor

@fge-aeb fge-aeb commented Sep 30, 2025

No description provided.

…deDocDependencies

Instead of adding ALL constantsInformation and functionsInformation to
CodeDocDependencies of all files containing at least one constant or function,
only add information of the groupBy aliases contained in that file.
return ModuleResolutionKind.NodeJs;
case 'node16':
return ModuleResolutionKind.Node16;
case 'node10':
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, because this was missing the warning was logged (see "default" case below). Because appearantly, if you don't specify moduleResolutionKind it falls back to "node10"

return typeArguments[index];
}

export function getCategoryFromEntityKind(entityKind: EntityKind): Category {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were misusing EntityKind for Category. "Category" is the category label in the ArgTypes table and needs to be plural. I separated both types and used the proper "EntityKind"s everywhere.

/**
* @exclude-docs
*/
hiddenProperty?: unknown;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that was a mistake. hiddenProperty was also added to "Item", but in "Item" it's mandatory. Because of that type error, storybook does not startup.

return argsTableProps;
};

function getCategoryPriority(category: Category) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Priorly, the categories in the ArgTypes table just followed a "random" order.

collectedConstantsInformation.push(...constantsInformation);
}

for (const moduleWithFunctionsOrConstants of modulesWithFunctionsOrConstants) {
Copy link
Contributor Author

@fge-aeb fge-aeb Sep 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably the most difficult change to understand.

Priorly, all information on constants and functions have been added as CodeDocDependencies to ALL modules (=files) that contained at least one constant or function with "@include-docs". That does not scale well at all.

Now, all aliases from "@include-docs" within a module are collected and then all grouped constants and functions for only the aliases contained in that file are added as CodeDocDependencies.

@kroeder kroeder self-assigned this Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants