Skip to content

Conversation

@gagik
Copy link
Contributor

@gagik gagik commented Sep 3, 2025

This...

  1. Removes padding from Drawer (aligning with upcoming hasPadding property) and adjusts the drawer sections accordingly.
  2. Removes MessageFeed in favor of a custom div for scrolling. LG currently uses a JavaScript-based mechanism for autoscroll which is janky and has many bugs which were noted during the last bug bug bash. They are aware of this and looking to change that so this will likely reach their implementation as well.

Some things we're missing out on at this stage:

  1. "Scroll to bottom" button: This button currently has bugs with appearing even when there is no content to scroll and I believe the scroll behavior improvements outweight the benefits of having this.
  2. Shadow at the top when scrolling.
Screenshot 2025-09-03 at 10 49 22 AM Screenshot 2025-09-03 at 10 49 31 AM Screenshot 2025-09-03 at 10 49 51 AM Screenshot 2025-09-03 at 10 50 04 AM Screenshot 2025-09-03 at 10 50 21 AM

This:
1. Removes padding from Drawer (aligning with upcoming `hasPadding` property) and adjusts the drawer sections accordingly.
2. Removes MessageFeed in favor of a custom div for scrolling. LG currently uses a JavaScript-based mechanism for autoscroll which is janky and has many bugs which were noted during the last bug bug bash. They are aware of this and looking to change that so this will likely reach their implementation as well.

Some things we're missing out on at this stage:
1. "Scroll to bottom" button: This button currently has bugs with appearing even when there is no content to scroll and I believe the scroll behavior improvements outweight the benefits of having this.
2. Shadow at the top when scrolling.
Copilot AI review requested due to automatic review settings September 3, 2025 08:50
@gagik gagik requested a review from a team as a code owner September 3, 2025 08:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the compass-assistant component to improve scrolling behavior and remove drawer padding. The changes replace LeafyGreen's MessageFeed component with a custom scrolling implementation using flexbox and reverse column direction for better auto-scroll functionality.

Key changes:

  • Adds a hasPadding property to the Drawer component with default value true
  • Replaces MessageFeed with a custom div using flex-direction: column-reverse for auto-scroll
  • Adjusts drawer section styling to remove negative margins that compensated for drawer padding

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/compass-components/src/components/drawer/drawer/drawer.types.ts Adds optional hasPadding property to DrawerProps interface
packages/compass-components/src/components/drawer/drawer/drawer.tsx Implements conditional padding removal based on hasPadding prop
packages/compass-components/src/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout-container.tsx Sets hasPadding={false} for the drawer instance
packages/compass-data-modeling/src/components/drawer/drawer-section-components.tsx Removes negative margins that compensated for drawer padding
packages/compass-assistant/src/assistant-chat.tsx Replaces MessageFeed with custom scrolling div and reverses message order

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gagik gagik added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Sep 3, 2025
@gagik gagik changed the title chore(compass-assistant): remove drawer padding and fix auto-scroll chore(compass-assistant): remove drawer padding and fix auto-scroll COMPASS-9757 Sep 3, 2025
@gagik gagik merged commit 81c05a9 into main Sep 3, 2025
57 of 58 checks passed
@gagik gagik deleted the gagik/css-fixes branch September 3, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants