Skip to content
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

🪟 🎨 Row highlighting for new streams table #19449

Merged
merged 26 commits into from
Dec 5, 2022

Conversation

teallarson
Copy link
Contributor

@teallarson teallarson commented Nov 15, 2022

What

closes #19092

Screenshot 2022-11-22 at 2 14 56 PM

Addresses row highlighting functionality for new sync catalog table

How

Creates a hook useCatalogTreeTableRowProps that generates the custom styling for CatalogTreeTableRow including:

  • returning the relevant className for the row
  • returning the relevant icon for the row
  • returning the pill button variant for a row to display

Also adds testing for the hook. Handles cases where a user may satisfy one or more state (ie: how to handle a row that has been both enabled and changed, how to handle a row that has been both enabled and selected for bulk mode, etc.)

Note: Disabled rows can still be edited and selected for BulkEdit. This should likely be addressed, but was not in scope of this PR.

Recommended reading order

  1. useCatalogTreeTableRowProps files... starting with the tests will help outline expected functionality
  2. CatalogTreeTableRow
  3. others (_colors.scss, SyncModeSelect, StreamPathSelect, ModificationIcon)

@octavia-squidington-iv octavia-squidington-iv added area/platform issues related to the platform area/frontend Related to the Airbyte webapp labels Nov 15, 2022
@@ -46,38 +49,74 @@ export const CatalogTreeTableRow: React.FC<StreamHeaderProps> = ({
[syncMode, destinationSyncMode]
);

const { initialValues } = useConnectionFormService();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more prop drilling to find out if the row changed! We can do this at the row level now that we have our context.

This will also make it relatively straightforward to grab the diff from the context and apply it to some of the conditional logic below when we get to the point where we want to integrate the diff on here 💥

@teallarson teallarson force-pushed the teal/row-highlighting-sync-catalog branch from 197fe09 to 1dd9e0f Compare November 16, 2022 17:25
@teallarson teallarson force-pushed the teal/row-highlighting-sync-catalog branch from b559c35 to 724c8c8 Compare November 21, 2022 22:27
@teallarson teallarson marked this pull request as ready for review November 22, 2022 18:53
@teallarson teallarson requested a review from a team as a code owner November 22, 2022 18:53
@@ -52,6 +52,8 @@ $orange-800: #d83c24;
$orange-900: #bf2f1b;
$orange: $orange-400;

$green-30: #f4fcfd;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added these as labeled in Figma

teallarson and others added 9 commits December 5, 2022 11:30
…atalogTreeTableRowProps.tsx

Co-authored-by: Krishna (kc) Glick <krishna@airbyte.io>
…atalogTreeTableRowProps.tsx

Co-authored-by: Krishna (kc) Glick <krishna@airbyte.io>
…atalogTreeTableRowProps.tsx

Co-authored-by: Krishna (kc) Glick <krishna@airbyte.io>
…atalogTreeTableRowProps.test.tsx

Co-authored-by: Krishna (kc) Glick <krishna@airbyte.io>
…atalogTreeTableRowProps.test.tsx

Co-authored-by: Krishna (kc) Glick <krishna@airbyte.io>
@teallarson teallarson force-pushed the teal/row-highlighting-sync-catalog branch from 7bfed5d to e9cb95f Compare December 5, 2022 16:31
@@ -4,6 +4,10 @@
white-space: nowrap;
}

.pillSelect {
.streamPathSelect {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not an essential piece of this PR, but while digging around in the rows, I saw that the streamPathSelect did not stay the full width of its column like on Figma. Adjusted that.

options={options}
value={props.path}
isMulti={props.isMulti}
onChange={(options: PathPopoutProps["isMulti"] extends true ? Array<{ value: Path }> : { value: Path }) => {
const finalValues = Array.isArray(options) ? options.map((op) => op.value) : options.value;
props.onPathChange(finalValues);
}}
className={styles.streamPathSelect}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, adjusting this to be full column-width. not related to the main purpose of this PR, but a small, quick fix.

@teallarson teallarson merged commit 7810c92 into master Dec 5, 2022
@teallarson teallarson deleted the teal/row-highlighting-sync-catalog branch December 5, 2022 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp area/platform issues related to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Highlighting of rows in syncCatalog table
4 participants