-
Notifications
You must be signed in to change notification settings - Fork 915
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 Visualization] Replace div containers with OuiFlex components #4272
Changes from 3 commits
dd9c8af
167c35a
c213dca
a5e312e
8b5ceb5
254affd
be0c7d9
dac7dbe
cc37ce8
bbf5492
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
// Container for the Table Visualization component | ||
.visTable { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1 0 0; | ||
overflow: auto; | ||
|
||
|
@@ -10,15 +8,5 @@ | |
|
||
// Group container for table visualization components | ||
.visTable__group { | ||
padding: $euiSizeS; | ||
margin-bottom: $euiSizeL; | ||
display: flex; | ||
flex-direction: column; | ||
flex: 0 0 auto; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any ideas about how we can remove this final style and scrap the class altogether? Why is this necessary? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have 2 options right now.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious, @curq, could we do Not a blocker for this PR. But if you want to test it out, I think it will make it more clean and I could help to approve again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested it. Seems There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @curq Let's just make a follow-up issue for this and we can tackle it after this PR. |
||
} | ||
|
||
// Modifier for visTables__group when displayed in columns | ||
.visTable__groupInColumns { | ||
flex-direction: row; | ||
align-items: flex-start; | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -75,7 +75,7 @@ describe('TableVisApp', () => { | |||||||||||||||||||||||||||||||||||
handlers={handlersMock} | ||||||||||||||||||||||||||||||||||||
/> | ||||||||||||||||||||||||||||||||||||
); | ||||||||||||||||||||||||||||||||||||
expect(container.outerHTML.includes('visTable visTable__groupInColumns')).toBe(true); | ||||||||||||||||||||||||||||||||||||
expect(container.outerHTML.includes('visTable')).toBe(true); | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not required, but see if you can think of a good way in the unit tests to validate the row vs column behavior you've made conditional in L46-47. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So we can remove it, right? Also, should this one be also removed? OpenSearch-Dashboards/src/plugins/vis_type_table/public/components/table_vis_app.test.tsx Lines 82 to 98 in 55b293a
I will try to think about how we can test it, but for now it looks like after we converted to OUI it is not required as direction is handled by OUI components now. |
||||||||||||||||||||||||||||||||||||
expect(getByTestId('TableVisComponentGroup')).toBeInTheDocument(); | ||||||||||||||||||||||||||||||||||||
}); | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
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.
We're so close - any other OUI options to get rid of these styles? The
overflow
could be handled with a utility class.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.
We could wait for this one to finish opensearch-project/oui#776, and this one for utility ( we don't have option for overflow:auto right now ) opensearch-project/oui#774.