adobe / spectrum-web-components

Spectrum Web Components
https://opensource.adobe.com/spectrum-web-components/
Apache License 2.0
1.3k stars 205 forks source link

[Feat]: Table Phase 2 #2456

Open Westbrook opened 2 years ago

Westbrook commented 2 years ago

Code of conduct

Impacted component(s)

Table

Description of the requested feature

Mockups or screenshots

No response

Implementation notes or ideas

No response

najikahalsema commented 2 years ago

Looks good! could you tlel me more about the table-elements.js export?

Westbrook commented 2 years ago

Currently to build a table you need to import all of these things:

import '@spectrum-web-components/table/sp-table.js';
import '@spectrum-web-components/table/sp-table-body.js';
import '@spectrum-web-components/table/sp-table-cell.js';
import '@spectrum-web-components/table/sp-table-checkbox-cell.js';
import '@spectrum-web-components/table/sp-table-head.js';
import '@spectrum-web-components/table/sp-table-head-cell.js';
import '@spectrum-web-components/table/sp-table-row.js';

So many imports are easy to mess up. I think we should export a helper file that registers all of those to simplify consumption by client developers.

import '@spectrum-web-components/table/table-elements.js';
SavoInfostream commented 1 year ago

Also add the @spectrum-web-components/table to the index.d.ts?