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

🪟 🎨 Streams table design pass #18908

Merged
merged 27 commits into from
Nov 14, 2022
Merged

Conversation

teallarson
Copy link
Contributor

@teallarson teallarson commented Nov 3, 2022

What

addresses most of #17937
Design updates for the Connection Streams Table for Auto Detect Schema Changes.

Screen Shot 2022-11-10 at 3 30 51 PM

Figma prototypes used:

Not addressed:

How

A lot of sass updates. Not many changes beyond that aside from a wrapper component for TextCells.

Recommended reading order

Any. But if you're looking at the page, the visual order (top to bottom) is approximately:

  1. StreamConnectionHeader
  2. CatalogTreeBody
  3. CatalogTreeTableHeader
  4. CatalogTreeTableRow
    others sprinkled in

Note:

To check this out locally, make sure you have REACT_APP_NEW_STREAMS_TABLE=true in your .env.development file.

@github-actions github-actions bot added area/platform issues related to the platform area/frontend Related to the Airbyte webapp labels Nov 3, 2022
@teallarson teallarson force-pushed the teal/streams-table-design-pass branch from ce50396 to 44e25ef Compare November 4, 2022 13:28
@@ -1,7 +1,7 @@
.container {
margin-bottom: 29px;
max-height: 600px;
overflow-y: auto;
overflow-y: overlay;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: this works well on chrome on a mac... but is not compatible with firefox. should find another solution :(

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's follow up on this and figure out what we can do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

solved using scrollbar-gutter. Still wonky on Safari if a user has an external mouse, but that seemed a reasonable tradeoff to Tim and I.

</Cell>
<Cell>
</TextCell>
{/* <TextCell>
<FormattedMessage id="form.fields" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw the field count looks like it will be in the design in a future round. Leaving this here.

<Switch small checked={stream.config?.selected} onChange={onSelectStream} disabled={disabled} />
</Cell>
<Cell>{fieldCount}</Cell>
<HeaderCell ellipsis title={stream.stream?.namespace || ""}>
{/* <Cell>{fieldCount}</Cell> */}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

field counts look like they're coming back in a future iteration, leaving this here for now... there may need to be adjustments to the flex properties in the cells and header(s) as a result.

}

.source {
flex: 7.3 0 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The .3 is an unfortunate awkward number. This value is the sum of the flex values + that .3 "buffer" for the gaps.

<FontAwesomeIcon icon={faArrowRight} />
<div className={styles.connector}>{renderIcon(destinationDefinition.icon)} Destination</div>
<div className={sourceStyles}>
{renderIcon(sourceDefinition.icon)}{" "}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The icon styles predate this PR and match the values in Figma. However, some logos appear very small (Salesforce for one). I'm in favor of adjusting it, but want to see if others agree before I go straying from the designs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the preview, the logos look too small for me because of the irregular size. Either the width or width is consistently 15 px or the height but not both because it will make the icon shrink to fit both. Another difference with Figma is that the icons will not render as sharply as they do, so for example the Postgres icon doesn't look great there. We may need to revisit this with design to look acceptable in the implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree

@teallarson teallarson marked this pull request as ready for review November 5, 2022 17:12
@teallarson teallarson requested a review from a team as a code owner November 5, 2022 17:12
@@ -63,14 +63,13 @@ export const CatalogTreeTableRow: React.FC<StreamHeaderProps> = ({
[styles.disabledChange]: changedSelected && !isStreamEnabled,
[styles.selected]: isSelected,
[styles.error]: hasError,
[styles.disabled]: !changedSelected && !isStreamEnabled,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this makes the syncmode dropdown blend into the background. I do see this in the designs as well, and users can't save changes to a disabled stream anyways currently... so maybe that's ok? Since they can't change things, I wonder if we want to disable the dropdowns in these rows though.

Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that! I'm not a big fan, and maybe we can work around it by disabling it. Additionally, I feel the color contrast may be too low and we may need to revisit this with design.

@teallarson teallarson changed the title Streams table design pass 🪟 🎨 Streams table design pass Nov 8, 2022
Copy link
Contributor

@edmundito edmundito left a comment

Choose a reason for hiding this comment

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

Really great to see the table coming together! Followed up on some of your questions and pointed some things I noticed during testing.

.pillSelect {
width: 100%;
width: variables.$width-wide-menu;
Copy link
Contributor

Choose a reason for hiding this comment

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

100% did not work as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It did not. Also, Nico pointed out that the SyncModeSelect should stay consistent width even when the other columns resize.

width: $icon-size;
height: $icon-size;
padding-right: variables.$spacing-sm;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be set as a gap property in the source/destination style?

<FontAwesomeIcon icon={faArrowRight} />
<div className={styles.connector}>{renderIcon(destinationDefinition.icon)} Destination</div>
<div className={sourceStyles}>
{renderIcon(sourceDefinition.icon)}{" "}
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the preview, the logos look too small for me because of the irregular size. Either the width or width is consistently 15 px or the height but not both because it will make the icon shrink to fit both. Another difference with Figma is that the icons will not render as sharply as they do, so for example the Postgres icon doesn't look great there. We may need to revisit this with design to look acceptable in the implementation.

@@ -1,7 +1,7 @@
.container {
margin-bottom: 29px;
max-height: 600px;
overflow-y: auto;
overflow-y: overlay;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's follow up on this and figure out what we can do.

@@ -63,14 +63,13 @@ export const CatalogTreeTableRow: React.FC<StreamHeaderProps> = ({
[styles.disabledChange]: changedSelected && !isStreamEnabled,
[styles.selected]: isSelected,
[styles.error]: hasError,
[styles.disabled]: !changedSelected && !isStreamEnabled,
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that! I'm not a big fan, and maybe we can work around it by disabling it. Additionally, I feel the color contrast may be too low and we may need to revisit this with design.

@edmundito
Copy link
Contributor

Also, the error state is a bit different for this new table but currently, it follows what the current table does:

Screen Shot 2022-11-09 at 09 38 34

Instead, the primary key/cursor dropdowns should highlight red. This is something we could address as a separate issue because the dropdowns still need a lot of work. How would you like to handle this?

@teallarson
Copy link
Contributor Author

Also, the error state is a bit different for this new table but currently, it follows what the current table does:

Screen Shot 2022-11-09 at 09 38 34

Instead, the primary key/cursor dropdowns should highlight red. This is something we could address as a separate issue because the dropdowns still need a lot of work. How would you like to handle this?

what do you think about rolling that into #18243

@teallarson
Copy link
Contributor Author

teallarson commented Nov 9, 2022

@edmundito addressed the comments you left above.

Something in this PR caused us to lose the ellipses for cell contents and made the text wrap instead. I got it to stop wrapping. Will look later this afternoon at getting the ellipses back the way they're supposed to be...

Copy link
Contributor

@edmundito edmundito left a comment

Choose a reason for hiding this comment

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

Did another pass. Code changes look good but noticed a few details while testing (Chrome)

  1. Looks like the table headings are not aligning with the columns.
  2. I noticed that the sync mode dropdown does not stretch to the full size of the column.
  3. The heading arrow can be offset from the columns

Here's a screenshot pointing all 3
Screen Shot 2022-11-10 at 09 30 32

There is a larger gap between the card heading and the search bar.

This is what's in the design:
Screen Shot 2022-11-10 at 09 33 09

And this is what I see:
Screen Shot 2022-11-10 at 09 42 17

@teallarson
Copy link
Contributor Author

Did another pass. Code changes look good but noticed a few details while testing (Chrome)

  1. Looks like the table headings are not aligning with the columns.
  2. I noticed that the sync mode dropdown does not stretch to the full size of the column.
  3. The heading arrow can be offset from the columns

Here's a screenshot pointing all 3 Screen Shot 2022-11-10 at 09 30 32

There is a larger gap between the card heading and the search bar.

This is what's in the design: Screen Shot 2022-11-10 at 09 33 09

And this is what I see: Screen Shot 2022-11-10 at 09 42 17

I addressed item #2. I propose that items 1 and 3 (heading alignment) be addressed in a separate PR. I've updated the description to say that and removed the "closes" verbage so the Issue stays open.

@teallarson teallarson merged commit a72deb1 into master Nov 14, 2022
@teallarson teallarson deleted the teal/streams-table-design-pass branch November 14, 2022 17:54
teallarson added a commit that referenced this pull request Nov 14, 2022
teallarson added a commit that referenced this pull request Nov 14, 2022
@teallarson teallarson restored the teal/streams-table-design-pass branch November 15, 2022 14:00
teallarson added a commit that referenced this pull request Nov 15, 2022
teallarson added a commit that referenced this pull request Nov 16, 2022
* Revert "Revert "🪟 🎨 Streams table design pass (#18908)" (#19397)"

This reverts commit ebbe5a9.

* remove min-width 0 that broke the table

* Update airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.module.scss

Co-authored-by: Edmundo Ruiz Ghanem <[email protected]>

* fix styling for master table with (padding)

* fix alignment somewhat on master view

* fix padding differences between old/new tables

* fix icon alignment in new table rows

* update snapshots

Co-authored-by: Edmundo Ruiz Ghanem <[email protected]>
akashkulk pushed a commit that referenced this pull request Dec 2, 2022
* typography

* wip

* continued progress

* merge cleanup

* table item alignment

* row styling

* remove extra item

* continued styling

* alignment works with scrollbar

* headings align with or without scrollbars

* stream connection header alignment

* cleanup

* pill-select justify

* cleanup

* fix ternary logic for disabled streams rows

* streams table design tweaks

* make table rows flush with card edge

* review cleanup, fix scroll overflow for firefox

* use gap not padding

* add scrollbar-gutter to rows too

* use ellipsis for cell text, not wrap

* fix alignment of syncCatalogField

* fix text ellipses and syncmode cell width

* use a div to make this col static 200px

* remove debug border

* scss variables cleanup
akashkulk pushed a commit that referenced this pull request Dec 2, 2022
akashkulk pushed a commit that referenced this pull request Dec 2, 2022
* Revert "Revert "🪟 🎨 Streams table design pass (#18908)" (#19397)"

This reverts commit ebbe5a9.

* remove min-width 0 that broke the table

* Update airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.module.scss

Co-authored-by: Edmundo Ruiz Ghanem <[email protected]>

* fix styling for master table with (padding)

* fix alignment somewhat on master view

* fix padding differences between old/new tables

* fix icon alignment in new table rows

* update snapshots

Co-authored-by: Edmundo Ruiz Ghanem <[email protected]>
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.

2 participants