scania-digital-design-system / tegel

Tegel Design System
https://tegel.scania.com
MIT License
15 stars 12 forks source link

feat(tds-table): added horizontal scroll #657

Closed Lunkan89 closed 3 weeks ago

Lunkan89 commented 1 month ago

Describe pull-request

Describe what the pull-request is about

Issue Linking:

Choose one of the following options

How to test

Provide detailed steps for testing, including any necessary setup.

  1. Go to...
  2. Check in...
  3. Run ...

Checklist before submission

Suggested test steps

Screenshots

Include before/after screenshots for UI changes.

Additional context

Add any other context or feedback requests about the pull-request here.

aws-amplify-eu-north-1[bot] commented 1 month ago

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-657.d3fazya28914g3.amplifyapp.com

timrombergjakobsson commented 1 month ago

Maybe design should have a look at this as well? @charlottelorensson

Lunkan89 commented 3 weeks ago

After discussion with @theJohnnyMe and Laurens improvements we wanted to do was:

  1. Only use one prop for activating horizontal scrolling ( horizontalScrollWidth is used now )
  2. Have both footer and tooltip (if in the table) to be "sticky"
  3. Create a separate story-test for horizontal scrolling to be able to fully test everything
  4. Also being able to set column width when horizontal scroll i activated, not just when setting noMinWidth flag

Note: noMinWidth should still work to set width of columns, although i cannot use multiple conditionals for showing column width input on both horizontal scroll flag and minWidth flag. https://github.com/storybookjs/storybook/discussions/18542

Lunkan89 commented 3 weeks ago

The story includes both pagination and table tooltip, so there is some code duplication there. Any suggested improvements?

Lunkan89 commented 3 weeks ago

Accepted by design :)

sonarcloud[bot] commented 3 weeks ago

Quality Gate Failed Quality Gate failed

Failed conditions
18.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud