-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🪟 🎉 Column selection UI #20267
🪟 🎉 Column selection UI #20267
Conversation
...-webapp/src/components/connection/DestinationNamespaceModal/ExampleSettingsTable.module.scss
Outdated
Show resolved
Hide resolved
Good question - I also thought about this and decided to leave the column selection state alone when enabling/disabling a stream entirely. I can imagine that someone might want to temporarily disable a stream, but keep their column selection configuration in place. Also since you can edit other properties of a disabled stream (e.g. sync mode) it seems to follow that you should also be able to change the column selection independent of enabling the stream. |
I think this is unrelated to the column selection changes? The bulk changes checkbox is a separate interaction that already exists. Or am I misunderstanding? |
@@ -96,6 +98,32 @@ const CatalogSectionInner: React.FC<CatalogSectionInnerProps> = ({ | |||
[updateStreamWithConfig] | |||
); | |||
|
|||
const numberOfFieldsInStream = Object.keys(streamNode?.stream?.jsonSchema?.properties).length ?? 0; | |||
|
|||
const onSelectedFieldsUpdate = (selectedFields: SelectedFieldInfo[]) => { |
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.
A thought: if onSelectedFieldsUpdate
took previouslySelectedFields
as a second param, instead of just selectedFields
, then the special-case props onFirstFieldDeselected
and onAllFieldsSelected
could go away and and the fact that those are special cases would be more cleanly scoped to this one file.
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.
Good point, I think that would indeed be cleaner! As discussed offline, I'll defer this to a follow-up PR
Double-checked on |
@ambirdsall the bug is within the |
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.
Per offline discussion, we'll defer the onSelectedFieldsUpdate
refactoring to a follow-up PR. Everything else looks good to me, and the UI acted as expected in (admittedly cursory) manual testing. Good work 👍
What
Closes https://github.com/airbytehq/airbyte-cloud/issues/3423
Adds the column selection UI to the stream table:
column.selection.ui.mov
How
To support column selection, we are adding two fields to the
AirbyteStreamConfiguration
object:In the stream table, there is a new column - "Sync" - that displays a
<Switch />
for each field in the stream:Nested fields cannot be individually selected/deselected, so their
<Switch />
is synced with their parents' value.Recommended reading order
StreamFieldTable.tsx
,FieldRow.tsx
,FieldHeader.tsx
- where the new UI is actually renderedCatalogSection.tsx
- where the callbacks manipulating the new config object fields are located🚨 User Impact 🚨
These changes are currently behind an experiment flag (
"connection.columnSelection"
) that is off by default (and therefore off in OSS). The web API is already accepting the new field selection configuration (#20259) but not yet filtering the fields. Once we test the end to end column feature selection is working properly, we will roll out the feature out to all users.