-
Notifications
You must be signed in to change notification settings - Fork 188
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
chore: factor out the inner workings of the indexes table so we can have separate regular and search ones COMPASS-7163 #4820
Conversation
…arate regular and search ones
packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.tsx
Outdated
Show resolved
Hide resolved
rowStyles, | ||
indexActionsCellStyles, | ||
tableHeaderStyles, | ||
cellStyles, | ||
nestedRowCellStyles, |
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.
Not really a pattern we use often and leaks a bit more implementation detail than probably needed. Do you think it would be possible to hide this behind the interface of the table, so that it's still the one responsible for rendering rows and cells?
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 tried that at first but I found it awkward without the Row and Cell props exported by leafygreen. I suppose I can make them dumb and only accept a few props..
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 tried. Weird stuff happening in the Row component that I can't figure out so I reverted it again for now. I think we can try again in a follow-up and I'd like to move on for now and unblock people.
dc1a0e9
to
94d540b
Compare
94d540b
to
22227fe
Compare
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 very weird how we are exporting parts of the table to make it reusable, please, let's open a ticket to sort this out. Approving because https://github.com/mongodb-js/compass/pull/4820/files#r1319760896 but this is really not the way to go about this
Filed a ticket: https://jira.mongodb.org/browse/COMPASS-7199 |
So we'd have RegularIndexesTable and SearchIndexesTable and both reuse IndexesTable.