-
Notifications
You must be signed in to change notification settings - Fork 283
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
Table Component #959
Table Component #959
Conversation
How it looks now:
{
"columns": {
"number_column": {
"name": "Number Column",
"text_align": "right"
},
"boolean_column": {
"name": "Boolean",
"text_align": "center",
"default": false
},
"my_other_column": {
"name": "Another Column"
}
},
"rows": [
{
"number_column": 1,
"my_other_column": "Aute incididunt proident incididunt ullamco [...]",
"boolean_column": true
},
{
"boolean_column": false,
"number_column": 2,
"my_other_column": "Proident amet id ut exercitation. Do esse [...]"
},
{
"number_column": 3,
"boolean_column": false,
"my_other_column": [
"Proident amet id ut exercitation.",
"Do esse exercitation eiusmod Lorem incididunt exercitation esse fugiat Lorem et.",
"Magna eu ex excepteur qui est consectetur nostrud dolor ea est."
]
}
]
}
## Tables
<Table data="my-table.json" /> |
What's stopping thing from not being a draft? |
That would be me. I haven't been around to really take a poke at this and have it in a state where it can be merged at any time. I really want to nail the JSON schema first and try to port some existing tables(such as the Block Tags) to this new component. |
let path = "docs/public"; | ||
|
||
if (props.data[0] !== "/") { | ||
path += "/assets/tables/" + page.value.relativePath.replace(/\.md$/, "/"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can somehow make the tables use an identifier? that way if we move things around, existing pages that reference the table just use the identifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like identifiers would end up being similar to the file path so it could get a bit repetitive. With the folder structure being enforced how it currently is, it makes finding tables included in a page easier since you can just go to assets/<page>/*.json
This PR aims to resolve #955.
The current JSON configuration is as follow: