Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@maximiliani
Copy link
Member

No description provided.

Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
Signed-off-by: Maximilian Inckmann <maximilian.inckmann@kit.edu>
@maximiliani maximiliani linked an issue Jun 16, 2025 that may be closed by this pull request
…g sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@maximiliani maximiliani requested a review from Copilot June 16, 2025 19:12
@maximiliani
Copy link
Member Author

maximiliani commented Jun 16, 2025

closes #332 closes #203

Copy link
Contributor

Copilot AI left a 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 SPDXType and inserted it into the renderer priority list.
  • Adjusted conditional checks in RORType and PidDataTable for 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 SPDXLong and SPDXShort stories 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 validate link.type before 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 ? (

@maximiliani maximiliani merged commit 5c058b8 into main Jun 16, 2025
6 checks passed
@maximiliani maximiliani deleted the 310-add-rendering-for-spdx-licenses branch June 16, 2025 19:14
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.

Add rendering for SPDX Licenses

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.