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

tweak(triptych): Do not render slots outside the viewport when using the 3-slot split layout #1855

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

jzimbel-mbta
Copy link
Member

Asana task: ad hoc

Panes besides the displayed one now only render the identifiers, just in case something has gone really wrong and we're seeing those for some reason. (Plus, they aren't expensive to render)

Screenshot 👇 notice that the .left-pane and .right-pane elements have no children since they are outside the viewport.
image

  • Tests added?

@jzimbel-mbta jzimbel-mbta requested review from a team and cmaddox5 and removed request for a team September 7, 2023 14:44

return (
<>
{isInViewport(triptychPane) && (
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 viewport logic actually live above this in triptych_three_pane? We have access to what we need there too so could just make this a layout change instead of a widget change.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh duh, yeah I think it could go there. I would just need to make sure that the middle and left screens still draw in the right positions if the left is not rendered.

Will make this change and then reassign you.

Copy link
Member Author

Choose a reason for hiding this comment

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

So much simpler now, thanks for pointing that out.

@jzimbel-mbta jzimbel-mbta self-assigned this Sep 7, 2023
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

Coverage of commit e854b39

Summary coverage rate:
  lines......: 40.8% (2287 of 5612 lines)
  functions..: 42.1% (1047 of 2486 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@jzimbel-mbta jzimbel-mbta force-pushed the jz/triptych-prevent-offscreen-videos branch from e854b39 to b2074f2 Compare September 7, 2023 15:12
@jzimbel-mbta jzimbel-mbta removed their assignment Sep 7, 2023
@jzimbel-mbta jzimbel-mbta merged commit eaab154 into master Sep 7, 2023
2 checks passed
@jzimbel-mbta jzimbel-mbta deleted the jz/triptych-prevent-offscreen-videos branch September 7, 2023 15:16
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

Coverage of commit b2074f2

Summary coverage rate:
  lines......: 40.8% (2287 of 5612 lines)
  functions..: 42.1% (1047 of 2486 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@cmaddox5 cmaddox5 assigned jzimbel-mbta and unassigned cmaddox5 Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants