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

Add conditional shadow to sticky experiments column #2062

Merged
merged 12 commits into from
Jul 21, 2022

Conversation

julieg18
Copy link
Contributor

@julieg18 julieg18 commented Jul 19, 2022

  • Adds a shadow to the experiments column if you start scrolling horizontally.
  • Takes off the gray border on the experiments column
Screen.Recording.2022-07-20.at.10.16.01.AM.mov

Fixes #2017

@julieg18 julieg18 changed the title Add box shadow to sticky exp column Add box shadow to sticky experiments column Jul 19, 2022
demo/dvc.lock Outdated Show resolved Hide resolved
webview/src/experiments/components/table/Table.tsx Outdated Show resolved Hide resolved
@julieg18 julieg18 self-assigned this Jul 19, 2022
@julieg18 julieg18 changed the title Add box shadow to sticky experiments column Add conditional shadow to sticky experiments column Jul 19, 2022
@julieg18 julieg18 marked this pull request as ready for review July 19, 2022 15:30
demo/dvc.lock Outdated Show resolved Hide resolved
@shcheklein
Copy link
Member

@julieg18 could you please add a video (on mac you can do video screenshots) and publish it to the description? plus put more context in the description if needed. Thanks! Good stuff.

@julieg18 julieg18 marked this pull request as draft July 19, 2022 16:21
@julieg18 julieg18 force-pushed the add-box-shadow-to-sticky-exp-column branch from 444a1bd to 64843b5 Compare July 19, 2022 20:38
@julieg18 julieg18 force-pushed the add-box-shadow-to-sticky-exp-column branch from 64843b5 to 903dd87 Compare July 19, 2022 20:43
@julieg18 julieg18 marked this pull request as ready for review July 19, 2022 21:02
@mattseddon
Copy link
Member

[Q] Is the vertical line (from the video) in the design? Can it be removed?

@shcheklein
Copy link
Member

Feedback - on the video shadow doesn't look like a shadow on my end?

And yes, we can now remove the gray vertrical line?

@julieg18
Copy link
Contributor Author

julieg18 commented Jul 19, 2022

Feedback - on the video shadow doesn't look like a shadow on my end?

Is it not showing up on a different theme, or are you not seeing it on any theme? Oh wait, I misunderstood. You mean on the actual video, the shadow isn't looking like a shadow. I believe the shadow looks more like a shadow on other themes but I chose to showcase the "dive bar" theme since you could see the shadow the most clearly.

[Q] Is the vertical line (from the video) in the design? Can it be removed?

Not sure what line you are referring to 🤔 The gray one?

@julieg18 julieg18 force-pushed the add-box-shadow-to-sticky-exp-column branch from 965015e to 903dd87 Compare July 19, 2022 21:36
@julieg18
Copy link
Contributor Author

On further inspection, the shadow actually doesn't have any blur to it which is why it doesn't look very shadow-like. Going to look into adding the blur!

@mattseddon mattseddon added the product PR that affects product label Jul 19, 2022
* take off vertical gray line
* add blur to column shadow
@julieg18
Copy link
Contributor Author

Added a blur to the box shadow and removed the gray border on the experiments column!

@julieg18 julieg18 requested a review from maxagin July 20, 2022 15:21
@maxagin
Copy link
Contributor

maxagin commented Jul 20, 2022

Yeah. Great stuff @julieg18 ! The video in the description has been updated I guess?

Should we add some transition to the box-shadow or is it fine as is?

transition very cool!

Should I adjust the header box-shadow so they are using the same kind like in Figma

No, please. The current shadows in the code are consistent. It's the same as notification shadow (I hope :) However, we may change it in the future.

@maxagin
Copy link
Contributor

maxagin commented Jul 20, 2022

The transition for the header shadow is good I think. Let's use it for both then. Thanks @julieg18

onDrop
onDrop,
root,
isFirst,
Copy link
Member

Choose a reason for hiding this comment

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

[C] I think we need a better name for this "FirstCell". We would want to convey with the name that it contains controls/metadata about the rest of the row. I am not sure what the correct name would be.
Perhaps do a bit of research and follow up with a simple renaming PR. Rename everything around the "First" concept e.g <FirstCell/> etc.

<TableHeader
isFirst={isFirst && ind === 0}
Copy link
Member

Choose a reason for hiding this comment

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

[Q] Why do we need both of these criteria?
[Q] Can we pull out the index === 0 into a function so we don't duplicate it in two different places?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

[Q] Why do we need both of these criteria?

We need to select just one experiment column cell (aka one of the rendered TableHeaders) so we can add the observer to it. The PR does this by finding the first MergedHeaderGroups, then the first TableHeader. Personally, I felt like this solution felt overcomplicated but I couldn't think of an alternative 🤔

[Q] Can we pull out the index === 0 into a function so we don't duplicate it in two different places?

Sure!

@mattseddon
Copy link
Member

Storybook has got a wacky diff. I checked the branch out locally and it looked fine. Please take a look before merging.

@julieg18
Copy link
Contributor Author

Storybook has got a wacky diff. I checked the branch out locally and it looked fine. Please take a look before merging.

Looks like it is due to the storybook comparing the diff to an earlier version of the pr instead of main.

@codeclimate
Copy link

codeclimate bot commented Jul 21, 2022

Code Climate has analyzed commit 1f17ec6 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

The test coverage on the diff in this pull request is 88.2% (85% is the threshold).

This pull request will bring the total coverage in the repository to 96.7% (0.0% change).

View more on Code Climate.

@julieg18 julieg18 merged commit dc452aa into main Jul 21, 2022
@julieg18 julieg18 deleted the add-box-shadow-to-sticky-exp-column branch July 21, 2022 12:36
@shcheklein
Copy link
Member

@julieg18 q - is the video up to date? I see that the horizontal shadow doesn't look the same now ... is it intentional?

@julieg18
Copy link
Contributor Author

@julieg18 q - is the video up to date? I see that the horizontal shadow doesn't look the same now ... is it intentional?

The video is up to date and I didn't edit the horizontal shadow as far as I know... Can you specify what is exactly different on the horizontal shadow? They are looking the same from my end 🤔

@shcheklein
Copy link
Member

From the video:

Screen Shot 2022-07-21 at 2 57 10 PM

Top / horizontal shadow is not fading out? and looks a bit like a delimiter?

@julieg18
Copy link
Contributor Author

If I'm understanding correctly, looking at the horizontal shadow from before this pr and how it looks currently, they seem to look the same. Though it does seem that neither is fading out very well 🤔

Current:
image

Before #2062 merge:
image

@mattseddon
Copy link
Member

I think the part of the shadow in question might be the top of the vertical shadow:

image

@shcheklein
Copy link
Member

@julieg18 sorry for the confusion. I mixed up the part of the tables's row with the shadow (also it starts with some delay after you scroll?) :) I see that it's the same more or less now.

@julieg18
Copy link
Contributor Author

julieg18 commented Jul 22, 2022

also it starts with some delay after you scroll?

Could be due to the transition animation or the code waiting till you've scrolled 15px 🤔 We could maybe move it to 5 or 10px instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR that affects product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a shadow to the sticky experiments column
5 participants