-
Notifications
You must be signed in to change notification settings - Fork 3
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
[FEAT][TABLE][SC-46247] Basic version #223
[FEAT][TABLE][SC-46247] Basic version #223
Conversation
@etienneburdet To let you know that we've started the development with a basic version |
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.
LGTM functionnally.
Implem wise I'm not a fan of JSON/props based themed, since it makes a lot of discrete options to document, read, pass down as global… I'd rather style directly in CSS. But that's debatable 🤷
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.
Overall, I'm not a fan of adding props and JS constants for styling. CSS works just as well, it considerably augments the API's surface and in my experience it always ends up with custom styling anyways because we can't hope to cover every case.
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.
It's true that if we exposed an unstyled
prop it is in conflict with the theme prop.
#224
So you are suggesting to remove the theme
prop and let developers style the table via CSS directly on table tags (like th, td ...) ?
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 would think so, yes. Unless we maybe want to expose a very basic version with 2-5 colors (that would fit the Studio well indeed).
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.
The table will takes colors from the domain theme.
I'll set neutral colors as default for the SDK
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.
It is something like that you have in mind ?
5266807
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.
Ha yes, also the theme persists when switching stories, but I think you fix that in the style PR
Yes, I fixed that with next PRs |
@etienneburdet I edit a bit the code. Can you check if it's good to start as it is ? |
All good for me 🏂 |
Default is false; Is set to true: Remove any presentation style that is applied to the table
Use a lot the :global style element to not scope style. HTML don't have a scoped classname, so it's easier to override the default style.
To format number and dates according to the locale. Default locale comes from the navigator language.
Summary
The goal for this PR is to add a simple version of a table component. This take inspiration from the exploration: #222
(Internal for Opendatasoft only) Associated Shortcut tickets:
Changes
visualizations/react
packageReview checklist