Skip to content

fix: update collection drawer styles COMPASS-9477 #7144

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

Merged
merged 6 commits into from
Jul 29, 2025
Merged

Conversation

paula-stacho
Copy link
Contributor

@paula-stacho paula-stacho commented Jul 25, 2025

Description

The figma for our project is not up to date, Ben has been doing some redesigns as the edit project is crystallizing - but this shouldn't be too far from the final version and at least with this we'll have the main part of the UI ready for internal review on dev.

Screenshot 2025-07-28 at 17 26 13 Screenshot 2025-07-28 at 17 26 24

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

@github-actions github-actions bot added the fix label Jul 25, 2025
@paula-stacho paula-stacho marked this pull request as ready for review July 25, 2025 14:17
@Copilot Copilot AI review requested due to automatic review settings July 25, 2025 14:17
@paula-stacho paula-stacho requested a review from a team as a code owner July 25, 2025 14:17
@paula-stacho paula-stacho added the feature flagged PRs labeled with this label will not be included in the release notes of the next release label Jul 25, 2025
Copy link
Contributor

@Copilot 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 updates the collection drawer styles in the data modeling component to match a new design. The changes implement a more structured accordion-based layout with improved visual organization and interaction patterns.

  • Updates collection drawer to use accordion-style layout with sections for collection details and relationships
  • Redesigns relationship management interface with inline edit/delete buttons and improved visual hierarchy
  • Adds utility function for generating relationship display names

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/compass-data-modeling/test/fixtures/flights-model.json Adds a name field to test fixture relationship for testing
packages/compass-data-modeling/src/utils.ts Creates utility function for generating relationship display names
packages/compass-data-modeling/src/components/relationship-drawer-content.tsx Moves delete button to accordion header and updates styling
packages/compass-data-modeling/src/components/diagram-editor-side-panel.spec.tsx Updates tests to match new UI structure and element locations
packages/compass-data-modeling/src/components/collection-drawer-content.tsx Complete redesign with accordion layout and improved relationship list
packages/compass-components/src/components/accordion.tsx Adds buttonTextClassName prop for additional styling flexibility
Comments suppressed due to low confidence (1)

packages/compass-data-modeling/src/components/collection-drawer-content.tsx:68

  • Using float: 'right' is an outdated CSS practice. Consider using flexbox with justify-content: 'flex-end' or margin-left: 'auto' instead for better maintainability and modern CSS practices.
  textOverflow: 'ellipsis',

Copy link
Collaborator

@gribnoysup gribnoysup left a comment

Choose a reason for hiding this comment

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

One note on the border color, but otherwise looks awesome!

'&:first-child': {
marginTop: `-${spacing[400]}px`,
},
borderBottom: `1px solid ${palette.gray.light2}`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Still missing a dark mode color for the border here

@paula-stacho paula-stacho merged commit 71f0259 into main Jul 29, 2025
105 of 107 checks passed
@paula-stacho paula-stacho deleted the COMPASS-9477 branch July 29, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature flagged PRs labeled with this label will not be included in the release notes of the next release fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants