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

[IndexTable] consolidate se23 styles and logic #10340

Merged
merged 2 commits into from
Sep 12, 2023
Merged

[IndexTable] consolidate se23 styles and logic #10340

merged 2 commits into from
Sep 12, 2023

Conversation

gwyneplaine
Copy link
Contributor

@gwyneplaine gwyneplaine commented Sep 6, 2023

WHY are these changes introduced?

Fixes #9939

WHAT is this pull request doing?

  • IndexTable consolidate se23 logic
  • IndexTable consolidate se23 styles

How to 🎩

🎩 checklist

@gwyneplaine gwyneplaine linked an issue Sep 6, 2023 that may be closed by this pull request
@gwyneplaine gwyneplaine changed the title [IndexTable] consolidate se23 styles [IndexTable] consolidate se23 styles and logic Sep 6, 2023
@gwyneplaine gwyneplaine force-pushed the v12/9939 branch 2 times, most recently from 8b65f8d to 42c41bd Compare September 6, 2023 01:26
Copy link
Contributor

@laurkim laurkim left a comment

Choose a reason for hiding this comment

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

Nice clean up! 🚀 🙌

Small things I noticed while tophatting below otherwise everything looked good across different breakpoints. Some of the IndexFilters issues I can create a separate issue for though, if we don't want to conflate the scope of this PR.

  • content jumps to keep table headers visible for BulkActions unlike prod (stories with BulkActions)
    07-22-n10cm-fyw2c

  • spacing around IndexFilters is a bit off when comparing to prod — 8px top/bottom on prod as opposed to 6px on this branch (With Filtering story)

Screenshot 2023-09-07 at 11 46 35 AM
  • bg color on hover for table row with zebra striping is off (With Zebra Striping story)
    hover

  • When BulkActions are visible, header wrapper is missing right side padding for xs screen (With Bulk Actions and Selections Across Pages story)
    prod:

Screenshot 2023-09-07 at 11 35 51 AM

this branch:
Screenshot 2023-09-07 at 11 36 13 AM

  • With Filtering example has larger height on filters and extra padding around actions for xs screen
07-38-81gsp-nxbyp
  • IndexFilters has larger height than prod on xs screen (Small Screen With All Of Its Elements story)
Screenshot 2023-09-07 at 11 42 09 AM

@gwyneplaine
Copy link
Contributor Author

Thnx for the review @laurkim

  • content jumps to keep table headers visible for BulkActions unlike prod (stories with BulkActions)
    07-22-n10cm-fyw2c

Fixed!

  • spacing around IndexFilters is a bit off when comparing to prod — 8px top/bottom on prod as opposed to 6px on this branch (With Filtering story)
Screenshot 2023-09-07 at 11 46 35 AM

Having a hard time replicating this, looks to be 6px vertical padding in prod as well, let me know if I'm missing something 🙏
Screenshot 2023-09-11 at 2 28 43 pm

  • bg color on hover for table row with zebra striping is off (With Zebra Striping story)
    hover

This looks to be a specificity bug on prod and not intended behaviour

When BulkActions are visible, header wrapper is missing right side padding for xs screen (With Bulk Actions and Selections Across Pages story)
prod:

Fixed!

With Filtering example has larger height on filters and extra padding around actions for xs screen

Small fix to IndexFilter which I've added to this PR 👍

IndexFilters has larger height than prod on xs screen (Small Screen With All Of Its Elements story)

Had a hard time replicating this one, seeing the same height on prod and on local 57px

Screenshot 2023-09-11 at 2 53 30 pm, let me know what I'm missing. Since this is IndexFilter specific though, may fix this in a separate PR.

polaris-react/src/components/IndexTable/IndexTable.scss Outdated Show resolved Hide resolved
polaris-react/src/components/IndexTable/IndexTable.scss Outdated Show resolved Hide resolved
polaris-react/src/components/IndexTable/IndexTable.scss Outdated Show resolved Hide resolved
}

.TableCell-first + .TableCell {
// stylelint-disable-next-line -- generated by polaris-migrator DO NOT COPY
left: var(--pc-checkbox-offset);
padding-left: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Where'd this one go? I can't see it being set anywhere.

I think it's there to ensure there's no accidental extra padding between the sticky first column and the second column when horizontal scrolling.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this, because it was causing unwanted layout shift on sticky
Tested this quite a bit, whatever was causing the extra padding no longer exists so I removed this to resolve the prior layout shift bug.

polaris-react/src/components/IndexTable/IndexTable.scss Outdated Show resolved Hide resolved
Copy link
Contributor

@laurkim laurkim left a comment

Choose a reason for hiding this comment

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

tysm for resolving flagged issues, looks good now when tophatting locally 🙌 💯

Thnx for the review @laurkim

  • spacing around IndexFilters is a bit off when comparing to prod — 8px top/bottom on prod as opposed to 6px on this branch (With Filtering story)
Screenshot 2023-09-07 at 11 46 35 AM

Having a hard time replicating this, looks to be 6px vertical padding in prod as well, let me know if I'm missing something 🙏 Screenshot 2023-09-11 at 2 28 43 pm

IndexFilters has larger height than prod on xs screen (Small Screen With All Of Its Elements story)

Had a hard time replicating this one, seeing the same height on prod and on local 57px

Screenshot 2023-09-11 at 2 53 30 pm, let me know what I'm missing. Since this is IndexFilter specific though, may fix this in a separate PR.

For IndexFilters padding, I'm still seeing 8px all around on prod storybook for main and next branches 🤔 Same with height issue on IndexFilters for Small Screen With All Of Its Elements story where if you change the breakpoint to xs screen, the height on IndexFiltersWrapper is 49px on prod but 57px for local. I think these 2 remaining issues aren't a blocker for this PR though and can be resolved in a separate one since they seem to be IndexFilters specific 👍

@gwyneplaine gwyneplaine merged commit 50dd08b into next Sep 12, 2023
12 checks passed
@gwyneplaine gwyneplaine deleted the v12/9939 branch September 12, 2023 00:25
AnnaCheba pushed a commit to AnnaCheba/polaris that referenced this pull request Apr 22, 2024
### WHY are these changes introduced?

Fixes Shopify#9939 

### WHAT is this pull request doing?

- `IndexTable` consolidate se23 logic
- `IndexTable` consolidate se23 styles

### How to 🎩
-
[Storybook](https://5d559397bae39100201eedc1-jsgyqvgaeb.chromatic.com/?path=/story/all-components-indextable--with-all-of-its-elements)
- [Production
storybook](https://storybook.polaris.shopify.com/?path=/story/all-components-indextable--with-all-of-its-elements&globals=polarisSummerEditions2023:true)

### 🎩 checklist

- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [ ] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
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.

[IndexTable] Consolidate se23 logic and styles
3 participants