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

[sparkle] - enh: DataTable #6622

Merged
merged 6 commits into from
Aug 1, 2024
Merged

[sparkle] - enh: DataTable #6622

merged 6 commits into from
Aug 1, 2024

Conversation

JulesBelveze
Copy link
Contributor

Description

This PR aims at enhancing the DataTable component, which includes:

  • change row opacity on hover
  • pass default column ordering
  • fix storybook

Risk

Breaking UI

Deploy Plan

  • Deploy sparkle
  • Bump sparkle version in front in another PR

Jules added 4 commits August 1, 2024 15:15
…aTable

 - Added a new `initialColumnOrder` prop to `DataTable` component for setting the initial state of column sorting
 - Updated `DataTable` stories to demonstrate usage with the new `initialColumnOrder` property
 - Adjust the size of the sorting icon to 'xs' to improve visual appearance
 - Streamline opacity control for better clarity when the column is sorted or not
 - Added a hover style to DataTable rows to indicate interactivity when 'onMoreClick' is provided
 - The hover style changes the border bottom color and applies opacity for better visual feedback
 - Update the project version in package-lock.json and package.json for new release
@JulesBelveze JulesBelveze force-pushed the sparkle/enhance-datatable branch from 6150f4c to 3fa71be Compare August 1, 2024 13:19
@JulesBelveze JulesBelveze requested a review from albandum August 1, 2024 13:22
@@ -197,7 +202,9 @@ DataTable.Row = function Row({
<tr
className={classNames(
"s-border-b s-border-structure-200 s-text-sm",
onClick ? "s-cursor-pointer" : "",
onClick
? "s-cursor-pointer hover:s-border-b-neutral-500 hover:s-opacity-70"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe let's only do the border, opacity drop looks a little odd no?
The best would be to add a light grey background to the child 's

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@albandum something like this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Much better - no need for the border change anymore
Remove the border change and mergeable 👍

 - Added a gray background to rows on hover to enhance the visibility of the currently selected row
@JulesBelveze JulesBelveze requested a review from albandum August 1, 2024 13:49
Copy link
Contributor

@albandum albandum left a comment

Choose a reason for hiding this comment

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

Address border change comment and go 👍

 - Simplify hover state CSS by removing border color change on row clickability indication.
@JulesBelveze JulesBelveze merged commit c54ec1c into main Aug 1, 2024
3 checks passed
@JulesBelveze JulesBelveze deleted the sparkle/enhance-datatable branch August 1, 2024 14:31
albandum pushed a commit that referenced this pull request Aug 28, 2024
* [sparkle] - feature: allow initial column order configuration for DataTable

 - Added a new `initialColumnOrder` prop to `DataTable` component for setting the initial state of column sorting
 - Updated `DataTable` stories to demonstrate usage with the new `initialColumnOrder` property

* [sparkle] - refactor: update icon size and opacity logic in DataTable

 - Adjust the size of the sorting icon to 'xs' to improve visual appearance
 - Streamline opacity control for better clarity when the column is sorted or not

* [sparkle] - feature: enhance row hover effect in DataTable component

 - Added a hover style to DataTable rows to indicate interactivity when 'onMoreClick' is provided
 - The hover style changes the border bottom color and applies opacity for better visual feedback

* [sparkle] - feature: bump package version to 0.2.200

 - Update the project version in package-lock.json and package.json for new release

* [sparkle] - fix: improve row hover visual feedback in DataTable

 - Added a gray background to rows on hover to enhance the visibility of the currently selected row

* [sparkle] - refactor: streamline DataTable row hover styling

 - Simplify hover state CSS by removing border color change on row clickability indication.

---------

Co-authored-by: Jules <[email protected]>
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.

2 participants