Skip to content
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

feat(ktableview): add component [KHCP-9499] #2338

Merged
merged 36 commits into from
Aug 26, 2024
Merged

Conversation

portikM
Copy link
Member

@portikM portikM commented Aug 13, 2024

Summary

Jira: https://konghq.atlassian.net/browse/KHCP-9499

Adds KTableView component

Screenshot 2024-08-15 at 12 35 45 PM

@portikM portikM self-assigned this Aug 13, 2024
Copy link

netlify bot commented Aug 13, 2024

Deploy Preview for kongponents-sandbox ready!

Name Link
🔨 Latest commit 6b8bcb9
🔍 Latest deploy log https://app.netlify.com/sites/kongponents-sandbox/deploys/66cc9f3f76804e0008f2fc29
😎 Deploy Preview https://deploy-preview-2338--kongponents-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 13, 2024

Deploy Preview for kongponents ready!

Name Link
🔨 Latest commit 6b8bcb9
🔍 Latest deploy log https://app.netlify.com/sites/kongponents/deploys/66cc9f3f026b8500088e3e13
😎 Deploy Preview https://deploy-preview-2338--kongponents.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@portikM portikM changed the title feat(kdatatable): add component [KHCP-9499] feat(ktableview): add component [KHCP-9499] Aug 13, 2024
Copy link
Member

@adamdehaven adamdehaven left a comment

Choose a reason for hiding this comment

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

Couple other thoughts:

  • might be nice to be able to provide a non-generated data-testid and id for each row (optional)
  • An option to truncate cell content if over the width (if this isn’t already included)
  • Sticky table headers?

@portikM
Copy link
Member Author

portikM commented Aug 15, 2024

might be nice to be able to provide a non-generated data-testid and id for each row (optional)

That can be done using rowAttrs prop (both KTable and KTableView). Or did you mean default values provided by component itself?

An option to truncate cell content if over the width (if this isn’t already included)

That's already supported by default in both components.

Sticky table headers?

Good call, added maxHeight prop (both KTable and KTableView).

src/types/table.ts Outdated Show resolved Hide resolved
src/types/table.ts Outdated Show resolved Hide resolved
@adamdehaven
Copy link
Member

That can be done using rowAttrs prop (both KTable and KTableView). Or did you mean default values provided by component itself?

Ok then that is sufficient.

@kaiarrowood
Copy link
Collaborator

Initial pass looks good to me 🚀

src/types/table.ts Outdated Show resolved Hide resolved
docs/components/table.md Outdated Show resolved Hide resolved
docs/components/table.md Show resolved Hide resolved
src/components/KTableView/KTableView.vue Outdated Show resolved Hide resolved
src/components/KTableView/KTableView.vue Outdated Show resolved Hide resolved
src/components/KTableView/KTableView.vue Show resolved Hide resolved
src/components/KTableView/KTableView.vue Outdated Show resolved Hide resolved
src/types/table.ts Outdated Show resolved Hide resolved
@adamdehaven
Copy link
Member

I believe @DariaYeremina is going to review as well. Before merging here, let's pull the preview package into the new Portal project and see if this new component can easily be swapped in for the Credentials table and satisfies our basic use-case

@portikM portikM marked this pull request as ready for review August 19, 2024 20:27
@portikM portikM requested a review from a team as a code owner August 19, 2024 20:27
@DariaYeremina
Copy link
Contributor

I believe @DariaYeremina is going to review as well. Before merging here, let's pull the preview package into the new Portal project and see if this new component can easily be swapped in for the Credentials table and satisfies our basic use-case

I reviewed it and it can be easely adapted to the Credentials table

docs/components/table-view.md Outdated Show resolved Hide resolved
docs/components/table-view.md Outdated Show resolved Hide resolved
docs/components/table-view.md Outdated Show resolved Hide resolved
docs/components/table-view.md Outdated Show resolved Hide resolved
docs/components/table-view.md Outdated Show resolved Hide resolved
docs/components/table-view.md Show resolved Hide resolved
docs/components/table-view.md Show resolved Hide resolved
/>
```

### Cell Events
Copy link
Member

Choose a reason for hiding this comment

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

When cell clicks are enabled in the table, should the cursor be a pointer on hover for cells with click events? Unsure how complex that CSS would be, but nice if possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's actually easy to add, done

Copy link
Member

@adamdehaven adamdehaven left a comment

Choose a reason for hiding this comment

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

lgtm

@portikM portikM merged commit 5b1ae1b into main Aug 26, 2024
9 checks passed
@portikM portikM deleted the feat/khcp-9499-k-view-table branch August 26, 2024 16:11
kongponents-bot pushed a commit that referenced this pull request Aug 26, 2024
# [9.4.0](v9.3.3...v9.4.0) (2024-08-26)

### Features

* **ktableview:** add component [KHCP-9499] ([#2338](#2338)) ([5b1ae1b](5b1ae1b))
@kongponents-bot
Copy link
Collaborator

🎉 This PR is included in version 9.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants