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

fix(table): replaced column-type of "row-header" with boolean row-header #2355

Closed
wants to merge 59 commits into from

Conversation

WinkeeFace
Copy link
Contributor

Description

Replaced column-type of row-header with a boolean row-header in the ebay-table component. Updated the relevant Marko and JSON files to reflect this change.

Context

This change was made to simplify the handling of row headers and improve ARIA accessibility. The boolean row-header is more intuitive and aligns better with accessibility standards.

References

Screenshots

N/A

@WinkeeFace WinkeeFace linked an issue Dec 24, 2024 that may be closed by this pull request
@WinkeeFace WinkeeFace changed the base branch from master to 15.0.0 December 24, 2024 14:59
@WinkeeFace WinkeeFace requested a review from a team December 31, 2024 20:44
Copy link
Member

@LuLaValva LuLaValva left a comment

Choose a reason for hiding this comment

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

Well done, thanks @WinkeeFace! Just a few notes:

  1. Those tests are failing because you didn't include rowHeader in the index.marko destructure here.
  2. Since Marko 5 / eBayUI normalizes kebab-case to camelCase so both are accepted, that needs to be accommodated for in TypeScript. To do this, you can either add duplicate "row-header"?: boolean; and "column-type"?: ... types in the interface (probably not recommended), or you can switch everything to kebab-case and use WithNormalizedProps<> like we do for Input (preferred).
  3. =true is implied in Marko attributes (same as HTML), so there are a few examples that can be simplified (I showed one example in a code comment)

src/components/ebay-table/examples/default.marko Outdated Show resolved Hide resolved
@WinkeeFace
Copy link
Contributor Author

Well done, thanks @WinkeeFace! Just a few notes:

  1. Those tests are failing because you didn't include rowHeader in the index.marko destructure here.
  2. Since Marko 5 / eBayUI normalizes kebab-case to camelCase so both are accepted, that needs to be accommodated for in TypeScript. To do this, you can either add duplicate "row-header"?: boolean; and "column-type"?: ... types in the interface (probably not recommended), or you can switch everything to kebab-case and use WithNormalizedProps<> like we do for Input (preferred).
  3. =true is implied in Marko attributes (same as HTML), so there are a few examples that can be simplified (I showed one example in a code comment)

Thank you for the feedback! I'll make those corrections.

Copy link

changeset-bot bot commented Jan 2, 2025

🦋 Changeset detected

Latest commit: 59159b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@ebay/ebayui-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@agliga
Copy link
Contributor

agliga commented Jan 9, 2025

Also please add a changeset! Thanks!

@WinkeeFace WinkeeFace self-assigned this Jan 9, 2025
@WinkeeFace WinkeeFace added this to the 15.0.0 milestone Jan 9, 2025
@WinkeeFace WinkeeFace changed the title feat(table): replaced column-type of "row-header" with boolean row-header fix(table): replaced column-type of "row-header" with boolean row-header Jan 9, 2025
@LuLaValva
Copy link
Member

@WinkeeFace I appreciate the effort of going through and adding as const, but as I mentioned offline this will be fixed in the next version of @marko/type-check. Please undo these commits or remove the as const changes, we are hoping to have eBayUI updated today

Copy link
Contributor

@agliga agliga left a comment

Choose a reason for hiding this comment

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

Please remove the .DS_Store files
You can add them to gitignore (which they should be there already)

author jwink <Joshf.wink@gmail.com> 1735049444 -0600
committer jwink <Joshf.wink@gmail.com> 1737052644 -0600
gpgsig -----BEGIN PGP SIGNATURE-----

 iHUEABYKAB0WIQSoShVR892P7bJRQArkPu1hwhBhDwUCZ4lR5AAKCRDkPu1hwhBh
 D0izAQDhhUyjnmvyZHTgn+gtb1drZh748Tmum8YTx0gtdWQ9fQD/Wxma9Y+QI7iE
 DjGrDfkF1dBV31gbsJ2FdJVwlUPdbA8=
 =K8Tx
 -----END PGP SIGNATURE-----

parent df32cbb
author jwink <Joshf.wink@gmail.com> 1735049444 -0600
committer jwink <Joshf.wink@gmail.com> 1737052605 -0600
gpgsig -----BEGIN PGP SIGNATURE-----

 iHUEABYKAB0WIQSoShVR892P7bJRQArkPu1hwhBhDwUCZ4lRvQAKCRDkPu1hwhBh
 D2dZAQDNsHo6luNAbuTqpJv8XWYlDvo5XTt3V039M31yvSisZgD/UmYJRTPcXvAh
 9Juaec5xArHCQ2TKIduoEOglHOVnTQM=
 =U5up
 -----END PGP SIGNATURE-----

parent df32cbb
author jwink <Joshf.wink@gmail.com> 1735049444 -0600
committer jwink <Joshf.wink@gmail.com> 1737052478 -0600
gpgsig -----BEGIN PGP SIGNATURE-----

 iHUEABYKAB0WIQSoShVR892P7bJRQArkPu1hwhBhDwUCZ4lRPgAKCRDkPu1hwhBh
 D1GbAQCba0MBp0W324agRMrWxOdsC5eddIIPTF4X+DTLxaFrPAEA82VWkg8uGsvf
 G7zhgr/F27UtC4NyWmVyyB8ncXnoTQs=
 =5TPI
 -----END PGP SIGNATURE-----

parent df32cbb
author jwink <Joshf.wink@gmail.com> 1735049444 -0600
committer jwink <Joshf.wink@gmail.com> 1737052214 -0600
gpgsig -----BEGIN PGP SIGNATURE-----

 iHUEABYKAB0WIQSoShVR892P7bJRQArkPu1hwhBhDwUCZ4lQNgAKCRDkPu1hwhBh
 D1ZUAP0WPGOj9dOX7yYUjlBm9pwMrfrRwZY/bWgm1qxlSwMhPgD/c9VXZ3LJzrEz
 RiRCESkQvdmXjFEcDvQH2cI95afvHQo=
 =W7De
 -----END PGP SIGNATURE-----

feat(table): replaced column-type of row-header with boolean row-header

feat(table): update row-header attribute to boolean format in examples

feat(table): update row-header attribute to boolean format in examples

feat(table): update TableHeader interface and examples to use WithNormalizedProps

fix(table): update examples to use 'as const' for column-type attributes

fix(table): update examples to use 'as const' for numeric column-type

fix(table): update examples to use 'as const' for numeric column-type headers

fix(table): remove 'as const' from numeric column-type headers in examples

feat(table): replaced column-type of row-header with boolean row-header

feat(table): update TableHeader interface and examples to use WithNormalizedProps

fix(table): update examples to use 'as const' for column-type attributes

fix(table): update examples to use 'as const' for numeric column-type

fix(table): update examples to use 'as const' for numeric column-type headers

fix(table): remove 'as const' from numeric column-type headers in examples

fix(ebay-table): remove aria-pressed attribute for improved accessibility

chore: remove .DS_Store files and update .gitignore

feat(table): update TableHeader interface and examples to use WithNormalizedProps

fix(table): update examples to use 'as const' for column-type attributes

fix(table): update examples to use 'as const' for numeric column-type

fix(table): update examples to use 'as const' for numeric column-type headers

fix(table): remove 'as const' from numeric column-type headers in examples

feat(table): update TableHeader interface and examples to use WithNormalizedProps

fix(table): update examples to use 'as const' for column-type attributes

fix(table): update examples to use 'as const' for numeric column-type

fix(table): update examples to use 'as const' for numeric column-type headers

fix(table): remove 'as const' from numeric column-type headers in examples

feat(table): replaced column-type of row-header with boolean row-header

feat(table): update TableHeader interface and examples to use WithNormalizedProps

fix(table): update examples to use 'as const' for column-type attributes

fix(table): update examples to use 'as const' for numeric column-type

fix(table): update examples to use 'as const' for numeric column-type headers

fix(table): remove 'as const' from numeric column-type headers in examples

fix(ebay-table): remove aria-pressed attribute for improved accessibility

chore: remove .DS_Store files and update .gitignore

feat(table): replaced column-type of row-header with boolean row-header

feat(table): update TableHeader interface and examples to use WithNormalizedProps

fix(table): update examples to use 'as const' for column-type attributes

fix(table): update examples to use 'as const' for numeric column-type

fix(table): update examples to use 'as const' for numeric column-type headers

fix(table): remove 'as const' from numeric column-type headers in examples

chore: remove .DS_Store files and update .gitignore
@WinkeeFace WinkeeFace closed this Jan 17, 2025
@WinkeeFace WinkeeFace deleted the 2313-ebay-table-various-fixes branch January 17, 2025 03:35
@agliga agliga removed this from the 15.0.0 milestone Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Pull request
Development

Successfully merging this pull request may close these issues.

ebay-table: remove aria-pressed ebay-table: various fixes
5 participants