Skip to content

fix: last expanded program is viewable - #202

Open
baller7215 wants to merge 2 commits into
mainfrom
191-expand-last-program-row-scroll
Open

fix: last expanded program is viewable#202
baller7215 wants to merge 2 commits into
mainfrom
191-expand-last-program-row-scroll

Conversation

@baller7215

@baller7215 baller7215 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

Before, expanding the last Program row could leave most of the expanded section hidden below the visible area because the viewport stayed in place.
Now, when a row is expanded near the bottom of the table, the dashboard automatically scrolls to keep the full expanded content visible.

Screenshots/Media

Before:
https://github.com/user-attachments/assets/5382a24d-b46a-4fec-afaf-4e285a640566

After:
https://github.com/user-attachments/assets/00ec6b24-34ae-46d0-8eb5-aee2078d7fa9

Issues

Closes #191


Summary by cubic

Fixes hidden content when expanding the last Program row by auto-scrolling to keep the expanded section in view. Also resolves a missing cubic dependency.

  • Bug Fixes
    • Auto-scrolls nearest scrollable container (or window) to reveal expanded content, with a 24px bottom gap and a 240ms post-expand delay.
    • Adds missing cubic dependency to prevent build/runtime errors.

Written for commit e97954e. Summary will update on new commits.

Review in cubic

@baller7215
baller7215 marked this pull request as ready for review August 8, 2026 04:28

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@baller7215 baller7215 self-assigned this Aug 8, 2026

@xgraceyan xgraceyan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR! 1 short non-blocking comment

}
};

const timeoutId = window.setTimeout(ensureExpandedContentVisible, 240);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this 240ms window could be flaky even if the collapse does finish under that time frame. This is technically fine, but could you please look into onAnimationComplete in Chakra and see if it's a better option?

<Collapse
  in={isOpen}
  onAnimationComplete={() => {
    if (isOpen) {
      ensureExpandedContentVisible();
    }
  }}
>

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.

Expanding Last Program Row Does Not Auto-Scroll to Display Expanded Content

2 participants