Skip to content

Fix/shifting html tables to tanstack tables#1508

Open
devlopharsh wants to merge 4 commits intoeclipse-sw360:mainfrom
devlopharsh:fix/shifting-htmlTables-to-tanstackTables
Open

Fix/shifting html tables to tanstack tables#1508
devlopharsh wants to merge 4 commits intoeclipse-sw360:mainfrom
devlopharsh:fix/shifting-htmlTables-to-tanstackTables

Conversation

@devlopharsh
Copy link
Contributor

Issue : #1505

Summary

Migrate Edit Attachments from raw HTML to TanStack while preserving existing layout, CSS classes, and delete modal behavior.
Add styling hooks and header span support to SW360Table for compatibility.
Extend TanStack row metadata typing for row class/id usage.

Changed Files

src/components/Attachments/EditAttachments.tsx
src/components/sw360/Table/Components.tsx
src/object-types/Pageable.ts
global.d.ts
package.json

Build / Check Command

pnpm build
pnpx biome check --reporter=summary

suggested reviewer

@deo002

Signed-off-by: developharsh <harsh237hk@gmail.com>
Signed-off-by: developharsh <harsh237hk@gmail.com>
Signed-off-by: developharsh <harsh237hk@gmail.com>
@devlopharsh
Copy link
Contributor Author

devlopharsh commented Mar 2, 2026

@deo002 @amritkv Hii there ,
i have made the changes accordingly , please have a review over them !!
Thank you !

@amritkv amritkv added needs code review needs codes review needs general test needs general test labels Mar 10, 2026
Copy link
Contributor

@deo002 deo002 left a comment

Choose a reason for hiding this comment

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

These changes are enough for now. Please fix these. We will go through another iteration then.

@@ -9,17 +9,19 @@
// SPDX-License-Identifier: EPL-2.0
// License-Filename: LICENSE

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove unused components such as src/components/Attachments/TiltleAttachment/TitleAttachment.tsx, src/components/Attachments/TableAttachment/TableAttachment.tsx etc. Identify components which are no longer used in the Attachments table and remove them.

id: 'filename',
header: t('File name'),
meta: {
headerClassName: 'headlabel content-middle sorting_asc',
Copy link
Contributor

Choose a reason for hiding this comment

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

these styles are not used anywhere: headlabel content-middle sorting_asc. They can be removed from all the columns, and so can be the headerClassName from meta struct.

Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I understand, the src/components/sw360/Table/Components.tsx requires no changes for this feature. It should be kept as is.

<div className='form-group'>
<select
name='attachmentType'
className='attachmentType toplabelledInput form-control'
Copy link
Contributor

Choose a reason for hiding this comment

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

Same for these css classes(attachmentType, toplabelledInput). They are not defined anywhere and must be removed. Please remove all the redundant css.

<select
name='attachmentType'
className='attachmentType toplabelledInput form-control'
onChange={(e) => handleInputChange(e, row.index)}
Copy link
Contributor

Choose a reason for hiding this comment

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

AttachmentType does not change. Please check.

<input
type='text'
className='toplabelledInput form-control'
placeholder='Enter comments'
Copy link
Contributor

Choose a reason for hiding this comment

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

I cannot type in a comment. Please check. I loose focus after typing a character.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a known problem with the tanstack table and src/app/[locale]/projects/components/Obligations/ObligationsView/UpdateCommentModal.tsx can be used for it after making it a generic component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs code review needs codes review needs general test needs general test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants