-
Notifications
You must be signed in to change notification settings - Fork 2
310 add rendering for spdx licenses #332
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
Conversation
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
…g sanitization Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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.
Pull Request Overview
This PR adds rendering support for SPDX license identifiers in the PID component and updates related rendering logic and stories.
- Imported
SPDXTypeand inserted it into the renderer priority list. - Adjusted conditional checks in
RORTypeandPidDataTablefor link rendering and dynamic subcomponent loading. - Added Storybook stories for long and short SPDX license examples.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/stencil-library/src/utils/utils.ts | Imported SPDXType and updated the renderers priority order. |
| packages/stencil-library/src/rendererModules/RORType.tsx | Removed isEmpty() check when rendering external links. |
| packages/stencil-library/src/components/pid-data-table/pid-data-table.tsx | Inverted value.renderDynamically checks for subcomponent loading. |
| packages/stencil-library/src/components/pid-component/pid-component.stories.ts | Added SPDXLong and SPDXShort stories. |
Comments suppressed due to low confidence (4)
packages/stencil-library/src/utils/utils.ts:47
- New renderer for SPDXType is introduced but lacks unit tests to verify correct detection and rendering of SPDX licenses. Consider adding test cases that cover both short and long form identifiers.
key: 'SPDXType',
packages/stencil-library/src/components/pid-component/pid-component.stories.ts:194
- [nitpick] Consider adding brief descriptions for
SPDXLongandSPDXShortstories to explain their use cases in the Storybook documentation.
export const SPDXLong: Story = {
packages/stencil-library/src/rendererModules/RORType.tsx:148
- Removing the
isEmpty()check may lead to empty or undefined link labels (e.g., “Link to ”). Reintroduce a non-empty check or validatelink.typebefore constructing the label.
if (link.type) {
packages/stencil-library/src/components/pid-data-table/pid-data-table.tsx:154
- The condition for rendering foldable subcomponents was inverted to
value.renderDynamically. Verify this change matches the intended behavior for dynamic vs. preview rendering, as it may now render subcomponents in the wrong scenario.
this.loadSubcomponents && !this.hideSubcomponents && value.renderDynamically ? (
No description provided.