Skip to content

fix(activity-feed-v2): anchor feed to sidebar to prevent page scroll#4652

Merged
mergify[bot] merged 1 commit into
box:masterfrom
jackiejou:fix/activity-feed-v2-shared-link-scroll
Jun 25, 2026
Merged

fix(activity-feed-v2): anchor feed to sidebar to prevent page scroll#4652
mergify[bot] merged 1 commit into
box:masterfrom
jackiejou:fix/activity-feed-v2-shared-link-scroll

Conversation

@jackiejou

@jackiejou jackiejou commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Anchor .bcs-NewActivityFeed to its sidebar container with position: absolute; inset: 0 and give .bcs-NewActivityFeedContent position: relative so it acts as the containing block.
  • Fixes the v2 feed expanding the page on shared-link pages (the whole page scrolled instead of the feed, with no way to scroll back up).
  • v1 sidebar path is untouched. Both v2 selectors are only rendered when isThreadedRepliesV2Enabled is on.

Why

The previous v2 wrapper used height: 100%, which depends on every ancestor propagating a definite height. The regular preview path runs inside .preview-overlay (position: fixed; inset: 0) which satisfies that. The shared-link path runs inside .shared-file-page -> main -> body whose chain bottoms out at a min-height: 100vh ancestor, so height: 100% collapsed to content height and the feed pushed the page taller than the viewport.

Absolutely positioning the wrapper against .bcs-NewActivityFeedContent mirrors the approach v1 already takes via .bcs-scroll-content-wrapper in SidebarContent.tsx.

Test plan

  • Open a shared-link preview with v2 enabled; confirm the feed scrolls internally and the page does not grow past the viewport.
  • Open a regular file preview with v2 enabled; confirm no regression in feed scroll behavior.
  • Confirm v1 (activityFeed.threadedRepliesV2.enabled off) is unchanged.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the activity feed layout so it now fills the available sidebar space more reliably.
    • Prevented the feed from depending on parent height settings, which helps avoid empty or mis-sized content areas.
    • Kept link and icon interactions working as expected inside the feed.

The v2 wrapper relied on height: 100% propagating from ancestors. On
shared-link pages the chain stops at a min-height ancestor, so the
feed grew to its content height and the whole page scrolled instead
of the feed. Switch the wrapper to position: absolute; inset: 0 and
make the outer .bcs-NewActivityFeedContent the containing block, so
the feed fills the sidebar regardless of ancestor height behavior.
@jackiejou jackiejou requested review from a team as code owners June 24, 2026 23:51
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1bf465c3-f187-491e-9ac2-bc071d9ddb77

📥 Commits

Reviewing files that changed from the base of the PR and between c833428 and b6d57d9.

📒 Files selected for processing (1)
  • src/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.scss

Walkthrough

The activity feed stylesheet now positions the feed absolutely to fill its parent, adds a relative content wrapper, and keeps the existing anchor and SVG reset rules while removing explanatory comments.

Changes

Activity Feed V2 Styling

Layer / File(s) Summary
Feed fill and reset cleanup
src/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.scss
.bcs-NewActivityFeed now uses absolute fill, .bcs-NewActivityFeedContent adds a relative containing block with min-width: 0, and the anchor/SVG reset rules remain while surrounding comments are removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • box/box-ui-elements#4645: Also changes src/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.scss rules around .bcs-NewActivityFeedContent.

Suggested reviewers

  • ahorowitz123
  • zhirongwang

Poem

A bunny hopped by the sidebar bright,
And made the feed fit snug and right.
Links kept their glow, SVGs still played,
While comment clouds quietly swayed.
Hop-hop, the layout feels just fine 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed It clearly summarizes the main change: anchoring the activity feed v2 to the sidebar to stop page scrolling.
Description check ✅ Passed It includes clear Summary, Why, and Test plan sections that explain the fix and how to verify it.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mergify

mergify Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added the queued label Jun 25, 2026
@mergify

mergify Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-06-25 02:03 UTC · Rule: Automatic strict merge · triggered by rule Automatic merge queue
  • Checks skipped · PR is already up-to-date
  • Merged2026-06-25 02:04 UTC · at b6d57d9644bfbb74929e1e064138b4751d475ef5 · squash

This pull request spent 13 seconds in the queue, including 3 seconds running CI.

Required conditions to merge

@mergify mergify Bot merged commit 57396d8 into box:master Jun 25, 2026
10 of 11 checks passed
@mergify mergify Bot removed the queued label Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants