feat: improve connection list cards UI for dark theme#1529
Conversation
karinakharchenko
commented
Jan 23, 2026
- Change card background to #2a2a2a in dark theme
- Remove white background from icon boxes
- Add brightness filter for mongodb, mysql, dynamodb, mssql logos in dark theme
- Change card background to #2a2a2a in dark theme - Remove white background from icon boxes - Add brightness filter for mongodb, mysql, dynamodb, mssql logos in dark theme Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Reduce divider bottom margin - Show "Invited to company" text only when company has multiple members - Update text: remove "admin" from "Explore demo panels" - Update text: remove "your" from "Create first connection" - Fix typo: "Create you own" → "Create your own" - Comment out unused CSS classes (.addButton, .zapier-link__caption) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This pull request improves the visual appearance of connection list cards in dark theme by updating background colors, removing white backgrounds from icon containers, and applying brightness filters to specific database logos for better visibility. Additionally, it introduces functionality to conditionally show a help message only when a company has multiple members, and refactors database title display to separate main titles from subtitles.
Changes:
- Updated dark theme card backgrounds from #404040 to #2a2a2a and removed white backgrounds from icon boxes
- Added conditional display logic for the "Invited to a company" help message based on company member count
- Split database titles into main and subtitle components (e.g., "MySQL (MariaDB)" → "MySQL" + "(MariaDB)")
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/app/components/connections-list/own-connections/own-connections.component.ts | Added ngOnChanges hook to fetch company members, implemented title parsing methods, injected CompanyService |
| frontend/src/app/components/connections-list/own-connections/own-connections.component.html | Fixed typo, updated text for brevity, added subtitle span, conditioned help message on hasMultipleMembers |
| frontend/src/app/components/connections-list/own-connections/own-connections.component.css | Changed dark theme background to #2a2a2a, removed white icon box background, added brightness filter for specific logos, adjusted sizing and spacing |
| frontend/src/app/components/connections-list/demo-connections/demo-connections.component.html | Shortened heading text from "admin panels" to "panels" |
| frontend/src/app/components/connections-list/demo-connections/demo-connections.component.css | Updated dark theme background to #2a2a2a for consistency |
| frontend/src/app/components/connections-list/connections-list.component.html | Passed companyId as input to own-connections component |
| frontend/src/app/components/connections-list/connections-list.component.css | Reduced divider margin for tighter spacing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (changes['companyId'] && this.companyId) { | ||
| this._companyService.fetchCompanyMembers(this.companyId).subscribe((members: any[]) => { | ||
| this.hasMultipleMembers = members && members.length > 1; | ||
| }); | ||
| } |
There was a problem hiding this comment.
The ngOnChanges hook will be called on every change detection cycle when any input changes, not just when companyId changes. The condition checks if companyId exists, but ngOnChanges will still trigger whenever any of the other inputs (currentUser, connections, isDemo) change. Consider adding a check to verify that companyId has actually changed from its previous value: if (changes['companyId'] && this.companyId && !changes['companyId'].firstChange && changes['companyId'].currentValue !== changes['companyId'].previousValue) or simply check changes['companyId'].firstChange to only fetch on initial load.
| const match = title.match(/^([^(]+)/); | ||
| return match ? match[1].trim() : title; |
There was a problem hiding this comment.
The regex pattern /^([^(]+)/ will match from the beginning up to (but not including) the first opening parenthesis. However, for databases without parentheses (like "PostgreSQL", "MongoDB", "Redis", etc.), this regex will match the entire string. While this works, it's more efficient to simply use split or check for the presence of a parenthesis first. Consider simplifying to: const index = title.indexOf('('); return index > 0 ? title.substring(0, index).trim() : title;
| const match = title.match(/^([^(]+)/); | |
| return match ? match[1].trim() : title; | |
| const index = title.indexOf('('); | |
| return index > 0 ? title.substring(0, index).trim() : title; |
| <div *ngIf="!connections?.length && connections !== null" class="empty-state"> | ||
| <h1 *ngIf="(currentUser?.role === 'ADMIN' || currentUser?.role === 'DB_ADMIN') && !isDemo" class="mat-display-1"> | ||
| Create your first connection | ||
| Create first connection |
There was a problem hiding this comment.
The text was changed from "Create your first connection" to "Create first connection", removing the word "your". This makes the text less personal and slightly more abrupt. While this may be intentional for brevity, consider whether this aligns with the overall tone of the application's user interface.
| Create first connection | |
| Create your first connection |
| if (changes['companyId'] && this.companyId) { | ||
| this._companyService.fetchCompanyMembers(this.companyId).subscribe((members: any[]) => { | ||
| this.hasMultipleMembers = members && members.length > 1; | ||
| }); |
There was a problem hiding this comment.
The new ngOnChanges lifecycle hook and the hasMultipleMembers feature lack test coverage. Consider adding tests to verify that:
hasMultipleMembersis set to true when the company has more than one memberhasMultipleMembersis set to false when there is only one member- The method only fetches company members when
companyIdchanges and is defined
| if (changes['companyId'] && this.companyId) { | |
| this._companyService.fetchCompanyMembers(this.companyId).subscribe((members: any[]) => { | |
| this.hasMultipleMembers = members && members.length > 1; | |
| }); | |
| const companyIdChange = changes['companyId']; | |
| if (companyIdChange && companyIdChange.currentValue && companyIdChange.currentValue !== companyIdChange.previousValue) { | |
| const companyId = companyIdChange.currentValue; | |
| this._companyService.fetchCompanyMembers(companyId).subscribe((members: any[] = []) => { | |
| const safeMembers = Array.isArray(members) ? members : []; | |
| this.hasMultipleMembers = safeMembers.length > 1; | |
| }); | |
| } else if (companyIdChange && !companyIdChange.currentValue) { | |
| // Reset flag if companyId becomes undefined or falsy | |
| this.hasMultipleMembers = false; |
| @@ -1,4 +1,4 @@ | |||
| <h1 *ngIf="!isDemo" class="mat-display-1">Explore demo admin panels</h1> | |||
| <h1 *ngIf="!isDemo" class="mat-display-1">Explore demo panels</h1> | |||
There was a problem hiding this comment.
The text was shortened from "Explore demo admin panels" to "Explore demo panels". While this is more concise, consider whether "admin" is an important qualifier that helps users understand what these demo panels are for.
| <h1 *ngIf="!isDemo" class="mat-display-1">Explore demo panels</h1> | |
| <h1 *ngIf="!isDemo" class="mat-display-1">Explore demo admin panels</h1> |
| .addConnectionLink__icon[data-mat-icon-name="mongodb"], | ||
| .addConnectionLink__icon[data-mat-icon-name="mysql"], | ||
| .addConnectionLink__icon[data-mat-icon-name="dynamodb"], | ||
| .addConnectionLink__icon[data-mat-icon-name="mssql"] { |
There was a problem hiding this comment.
The CSS selector using data-mat-icon-name attribute won't work because Angular Material's mat-icon component doesn't automatically set this attribute when using the [svgIcon] binding. To make this work, you need to either:
- Add
[attr.data-mat-icon-name]="supportedDatabase"to the mat-icon element in the template (line 14 of the HTML file) - Or use a different CSS approach such as adding a class based on the database type
| .addConnectionLink__icon[data-mat-icon-name="mongodb"], | |
| .addConnectionLink__icon[data-mat-icon-name="mysql"], | |
| .addConnectionLink__icon[data-mat-icon-name="dynamodb"], | |
| .addConnectionLink__icon[data-mat-icon-name="mssql"] { | |
| .addConnectionLink__icon { |
| this._companyService.fetchCompanyMembers(this.companyId).subscribe((members: any[]) => { | ||
| this.hasMultipleMembers = members && members.length > 1; | ||
| }); |
There was a problem hiding this comment.
The subscription to fetchCompanyMembers in ngOnChanges is not being cleaned up, which could lead to memory leaks. The subscription should be stored and unsubscribed in ngOnDestroy, or you should use the async pipe in the template, or add .pipe(take(1)) to automatically unsubscribe after the first emission.
| getMainTitle(database: string): string { | ||
| const title = this.supportedDatabasesTitles[database] || database; | ||
| const match = title.match(/^([^(]+)/); | ||
| return match ? match[1].trim() : title; | ||
| } | ||
|
|
||
| getSubTitle(database: string): string { | ||
| const title = this.supportedDatabasesTitles[database] || database; | ||
| const match = title.match(/(\([^)]+\))/); | ||
| return match ? match[1] : ''; | ||
| } |
There was a problem hiding this comment.
The new methods getMainTitle and getSubTitle lack test coverage. Since this component has a test file (own-connections.component.spec.ts) with basic setup, consider adding unit tests for these methods to ensure they correctly parse database titles with and without parentheses, such as "MySQL (MariaDB)" → main: "MySQL", sub: "(MariaDB)" and "PostgreSQL" → main: "PostgreSQL", sub: "".

