Skip to content

Conversation

@sroy3
Copy link
Contributor

@sroy3 sroy3 commented Mar 17, 2023

Part of #2585

Screen.Recording.2023-03-17.at.11.17.41.AM.mov

Comparison table headers while scrolling isn't as smooth as it used to due to the fact that we can't have sticky positioning inside of a container that has an overflow. Instead of using sticky positioning in CSS, the feature was recreated in Javascript.

Do we want local scrollbars inside of template plots as well? For the multi view plots specifically.

@sroy3 sroy3 added the product PR that affects product label Mar 17, 2023
@sroy3 sroy3 self-assigned this Mar 17, 2023
@sroy3 sroy3 marked this pull request as ready for review March 17, 2023 16:08
@sroy3
Copy link
Contributor Author

sroy3 commented Mar 17, 2023

Code Climate has analyzed commit a1673bf and detected 0 issues on this pull request.

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

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

View more on Code Climate.

Testing for this kind of thing inside jsdom is near impossible and does not tell muchunfortunately.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should the pinned plot have a background color?

Screen.Recording.2023-03-17.at.3.44.10.PM.mov

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, it looks the same on main. Hopefully, it's expected and not a bug.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we either fix in a follow up or raise a bug please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will fix straight away as a follow-up

const headRef = createRef<HTMLTableSectionElement>()

useEffect(() => {
const calculateTop = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it's just on my end (or I just scroll more aggressively 😄), but the image headers look really buggy...

Screen.Recording.2023-03-17.at.3.48.38.PM.mov

Should we consider not making the image headers sticky at all?

Copy link
Contributor

Choose a reason for hiding this comment

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

We do need sticky headers for the revisions. I am also seeing some jank:

Screen.Recording.2023-03-20.at.9.37.33.am.mov

Note: There is a visible gap between the normal sticky headers and the ribbon in the video.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe it's just on my end (or I just scroll more aggressively 😄), but the image headers look really buggy...

Should we consider not making the image headers sticky at all?

Went back and tried making this faster. Decided to avoid React as much as possible for the style update. useState is a little too efficient with reconciliation and sometimes makes things a little less smooth. It's is not as perfect as it would with CSS only, but it's way much better now.

Screen.Recording.2023-03-20.at.10.07.29.AM.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do need sticky headers for the revisions. I am also seeing some jank:

Note: There is a visible gap between the normal sticky headers and the ribbon in the video.

I am not able to reproduce. Might have to do with resolution and unfortunately I cannot test on a bigger screen at the moment. Can you check PlotsContainer.tsx on line 138 (stickyHeaderTop={ribbonHeight - 4}) and play with a higher than 4 value and tell me which value would close that gap for you? Removing a few pixels from the header won't be that apparent for other users, but if it closes the gap for users like you that'd would make it perfect.

Copy link
Contributor

@mattseddon mattseddon left a comment

Choose a reason for hiding this comment

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

Happy to merge and follow up

const headRef = createRef<HTMLTableSectionElement>()

useEffect(() => {
const calculateTop = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

We do need sticky headers for the revisions. I am also seeing some jank:

Screen.Recording.2023-03-20.at.9.37.33.am.mov

Note: There is a visible gap between the normal sticky headers and the ribbon in the video.

@sroy3 sroy3 enabled auto-merge (squash) March 20, 2023 14:23
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 7cafa31 and detected 0 issues on this pull request.

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

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

View more on Code Climate.

@sroy3 sroy3 merged commit 9ddb731 into main Mar 20, 2023
@sroy3 sroy3 deleted the plots-local-scollbars branch March 20, 2023 15:07
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.

3 participants