Skip to content

connections: mobile tune-up + unified Add menu, support chat in account menu#1794

Open
karinakharchenko wants to merge 5 commits into
rocket-admin:mainfrom
karinakharchenko:intercom-for-mobile
Open

connections: mobile tune-up + unified Add menu, support chat in account menu#1794
karinakharchenko wants to merge 5 commits into
rocket-admin:mainfrom
karinakharchenko:intercom-for-mobile

Conversation

@karinakharchenko
Copy link
Copy Markdown
Contributor

@karinakharchenko karinakharchenko commented May 20, 2026

Summary

Mobile pass on the connections list

  • Page heading (`mat-headline-4` company name) and the empty-state H1s shrink to ~20–22px on ≤ 600px so they don't dominate the screen.
  • Empty-state CTA copy reworded from "Create your first connection" to "Add your first connection".
  • "Hosted by Rocketadmin" card keeps a single-row layout on mobile (30px icon-box, properly centered rocket, 13/11.5px text); the blue "Quickstart / Upgrade" pill is replaced by an accent-colored `chevron_right` icon.
  • "Connect your own" DB tiles flip to a horizontal icon-left + sublabel-right row on mobile and collapse the grid to one column.
  • Existing connection cards keep their dark primary banner on mobile but compact down to 56px tall with smaller title + db type.
  • Demo-panel grid becomes 3 / 2 / 1 columns across desktop / tablet (601–1024px) / mobile, with each row stretched to the tallest card and long names truncated, so cards stop visually jumping at intermediate widths.

Unified "Add connection" menu

  • When connections exist, the two FABs are merged into a single primary "Add connection" button.
  • Clicking it opens a polished menu (~320–360px, 14px corner radius, ~20px above the trigger, opens upward and right-aligned) with two rich rows:
    • Connect your own (cable icon) — "MySQL, PostgreSQL, MongoDB and more"
    • Create hosted PostgreSQL (cloud icon) — "Managed database, ready in one click"
    • Hits the hosting cap → second slot becomes Upgrade to host more
  • Icon-box, title, and subtitle layout is hand-styled via `panelClass` overrides.

Support chat in account menu

  • Hide the default floating Intercom launcher (`hide_default_launcher: true`) and add a "Chat with support" entry inside the account dropdown (above "Help center"). Clicking it calls `window.Intercom('show')`.

Test plan

  • On ≤ 600px viewport: heading sizes, hosted card row + chevron, single-column DB grid, compact connection card all look right
  • On 601–1024px viewport: demo grid is 2 columns, cards equal-height
  • On desktop: connection / DB-tile layouts are unchanged from main
  • FAB shows only "Add connection" once a connection exists; menu opens above the button with two rows; clicking each navigates / boots a hosted DB / opens upgrade respectively
  • Reaching hosted-DB cap swaps the second menu row to "Upgrade to host more" with a link to `/upgrade`
  • Account menu shows "Chat with support" between Zapier (if SaaS) and "Help center"; clicking it opens the Intercom panel, and there's no floating Intercom bubble at the bottom-right anymore

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added "Chat with support" to the account menu to open the in-app support chat; the default floating chat launcher is hidden.
    • Reworked "Add connection" controls to present role-aware options and an upgraded add-connection menu.
  • Style

    • Improved mobile responsiveness and layout across connection pages, including tighter typography, adjusted card/grid behavior, and compact menu/patterns.
  • Copy

    • Empty-state heading now reads "Add your first connection."

Review Change Stack

karinakharchenko and others added 4 commits May 20, 2026 17:23
… cards

Mobile-first refresh of the connections-list landing:
- Shrink the page heading and the empty-state H1 ("Add your first
  connection" / demo-panels titles) down to ~20–22px so they don't dwarf
  the rest of the screen, with proportional line-height + margin.
- Rename the empty-state CTA copy from "Create your first connection"
  to "Add your first connection".
- Hosted-by-Rocketadmin card stays a single horizontal row on mobile:
  smaller 30px icon-box (rocket properly centered), 13px title and
  11.5px subtitle, blue "Quickstart" / "Upgrade" badge replaced with a
  `chevron_right` icon in the accent color.
- "Connect your own" DB tiles change from square stacked cards to
  horizontal rows on every breakpoint (icon left, name + sublabel
  right), grid collapses to one column ≤ 600px.
- Existing connection cards drop the full-width dark banner: the DB
  logo becomes a 48px primary-tinted square on the left, name and DB
  type stack to its right, and on mobile shrinks further to a 30px icon
  row with the Edit-schema affordance hidden.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Revert the previous commit's desktop tweaks to connection cards and
"Connect your own" DB tiles — those should stay exactly as they were on
desktop and only switch to the icon-left + text-right compact row layout
on screens ≤ 600px. Also clean up the accidentally tracked /.yarn/cache
artifacts and add them to .gitignore so future installs don't sweep them
back in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switch the demo-panel cards from a fixed 3-column grid to 1 / 2 / 3
columns across mobile / tablet (601–1024px) / desktop, with each cell
stretching to the row's tallest card. minmax(0, 1fr) and an ellipsis on
the title prevent long names from pushing siblings around, so the cards
stop visually jumping on intermediate widths.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nt menu

On the connections list, fold the standalone "Create hosted PostgreSQL"
CTA into a single primary "Add connection" button. When clicked it opens
a polished menu (rounded panel, soft shadow, ~20px above the trigger)
with two rich rows: "Connect your own" (cable icon) and "Create hosted
PostgreSQL" (cloud icon), each with a short subtitle. The "Upgrade to
host more" variant takes the second slot once the hosting limit is hit.

Intercom: hide the default floating launcher (hide_default_launcher in
boot settings) and surface a "Chat with support" entry inside the
account dropdown (above "Help center") that triggers
window.Intercom('show').

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

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: 36ae8b3d-85e3-4a66-9312-c55b9edfdf53

📥 Commits

Reviewing files that changed from the base of the PR and between 60cb632 and 0fd0a0a.

📒 Files selected for processing (1)
  • frontend/src/app/components/connections-list/own-connections/own-connections.component.html
💤 Files with no reviewable changes (1)
  • frontend/src/app/components/connections-list/own-connections/own-connections.component.html

📝 Walkthrough

Walkthrough

Adds a "Chat with support" Intercom trigger, hides Intercom's default launcher, converts the Add Connection FAB into a Material menu with conditional entries and chevrons, applies responsive CSS across connection views, and updates .gitignore to ignore Yarn Berry cache/state files.

Changes

Connections UI and Support Improvements

Layer / File(s) Summary
Intercom support chat integration
frontend/src/app/app.component.ts, frontend/src/app/app.component.html
Intercom boot config now sets hide_default_launcher: true; openSupportChat() was added and wired to a new "Chat with support" account-menu button.
OwnConnectionsComponent menu module wiring
frontend/src/app/components/connections-list/own-connections/own-connections.component.ts
MatMenuModule imported and added to the component's standalone imports to enable the Material menu.
Add-connection menu markup and styling
frontend/src/app/components/connections-list/own-connections/own-connections.component.html, frontend/src/app/components/connections-list/own-connections/own-connections.component.css
FAB and hosted/upgrade controls refactored into an "Add connection" primary button that opens a mat-menu (offers "Connect your own" and conditionally "Upgrade to host more"); empty-state heading and hosted-banner chevrons added; comprehensive menu panel/item styling and icon variants (including dark-mode) applied.
Responsive layout improvements across connection views
frontend/src/app/components/connections-list/connections-list.component.css, frontend/src/app/components/connections-list/demo-connections/demo-connections.component.css, frontend/src/app/components/connections-list/own-connections/own-connections.component.css
Media queries for small and medium widths adjust heading sizes, grid column counts, card layouts/heights, truncation, and FAB sizing for improved mobile/tablet presentation.
Build configuration
.gitignore
Added ignore patterns for Yarn Berry (.yarn/cache, install-state.gz, unplugged, build-state.yml).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • lyubov-voloshko

Poem

🐰 A tiny rabbit hops to chat with support so bright,
Menus unfold like petals, guiding through the night,
Cards stretch and headings shrink to fit a pocket view,
Yarn's secrets stay ignored — the cache hides out of view,
Hooray for little changes that make the UI light!

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Security Check ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the three main changes: mobile layout improvements, a unified Add menu, and support chat integration—all of which are well-represented in the changeset.
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 and usage tips.

@coderabbitai coderabbitai Bot requested a review from lyubov-voloshko May 20, 2026 15:33
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/app/app.component.ts`:
- Around line 347-351: The openSupportChat function should declare an explicit
return type (void) and wrap the external call to window.Intercom('show') in a
try/catch to surface initialization errors; update the openSupportChat method to
check for window and window.Intercom, call Intercom inside a try block and
handle/log any thrown error in the catch (e.g., via console.error or the app
logger) so failures don't fail silently while preserving the original behavior.

In
`@frontend/src/app/components/connections-list/demo-connections/demo-connections.component.css`:
- Around line 121-125: The CSS rule targeting ".demoCard__info strong" uses
text-overflow: ellipsis but strong is inline by default so truncation won't work
reliably; change the display of the selector (e.g., set display: inline-block or
block) and ensure a width or max-width is applied to the ".demoCard__info
strong" rule so text-overflow can take effect, keeping the existing overflow and
white-space properties intact.

In
`@frontend/src/app/components/connections-list/own-connections/own-connections.component.css`:
- Line 201: Replace the deprecated CSS property "grid-gap" with the modern "gap"
in own-connections.component.css: locate the rule using "grid-gap: 8px;" (in
own-connections.component.css) and change it to "gap: 8px;"; after updating, run
stylelint/CI to confirm the standard-scss rule no longer flags the declaration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0d24ccdd-1e86-4bda-b657-56b5a878e33f

📥 Commits

Reviewing files that changed from the base of the PR and between 47ffa41 and 60cb632.

📒 Files selected for processing (8)
  • .gitignore
  • frontend/src/app/app.component.html
  • frontend/src/app/app.component.ts
  • frontend/src/app/components/connections-list/connections-list.component.css
  • frontend/src/app/components/connections-list/demo-connections/demo-connections.component.css
  • frontend/src/app/components/connections-list/own-connections/own-connections.component.css
  • frontend/src/app/components/connections-list/own-connections/own-connections.component.html
  • frontend/src/app/components/connections-list/own-connections/own-connections.component.ts

Comment on lines +347 to +351
openSupportChat() {
if (typeof window.Intercom !== 'undefined') {
window.Intercom('show');
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

# First, verify the file exists and read the method in question
if [ -f "frontend/src/app/app.component.ts" ]; then
  echo "File exists. Reading lines 345-355:"
  sed -n '345,355p' "frontend/src/app/app.component.ts" | cat -n
else
  echo "File not found at expected path"
  # Search for the file
  find . -name "app.component.ts" -type f 2>/dev/null | head -5
fi

Repository: rocket-admin/rocketadmin

Length of output: 384


🏁 Script executed:

# Search for other uses of Intercom in the codebase to understand the pattern
rg "Intercom" --type ts --type tsx -B 2 -A 2

Repository: rocket-admin/rocketadmin

Length of output: 96


🏁 Script executed:

# Check the full method to understand context better
sed -n '340,360p' "frontend/src/app/app.component.ts" | cat -n

Repository: rocket-admin/rocketadmin

Length of output: 718


🏁 Script executed:

# Check if there are other methods in the same class to understand pattern consistency
rg "^\s*[a-zA-Z_].*\(\)" "frontend/src/app/app.component.ts" -A 1 | head -20

Repository: rocket-admin/rocketadmin

Length of output: 667


🏁 Script executed:

# Check method signatures in the app.component.ts file to understand the pattern
rg "^\s*(private|protected|public)?\s*[a-zA-Z_][a-zA-Z0-9_]*\s*\(" "frontend/src/app/app.component.ts" -A 0 | head -30

Repository: rocket-admin/rocketadmin

Length of output: 930


Add explicit return type and error handling to openSupportChat()

The method lacks an explicit return type annotation and the external window.Intercom('show') call is not wrapped in error handling. The Intercom widget may not be fully initialized, causing the call to fail silently.

Proposed fix
-openSupportChat() {
-	if (typeof window.Intercom !== 'undefined') {
-		window.Intercom('show');
-	}
-}
+openSupportChat(): void {
+	try {
+		if (typeof window.Intercom !== 'undefined') {
+			window.Intercom('show');
+		}
+	} catch (error) {
+		console.error('Failed to open Intercom chat', error);
+	}
+}

Per coding guidelines: "Always add type annotations to function parameters and return types in TypeScript" and "Ensure all error handling is explicit - use try/catch blocks appropriately".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/app/app.component.ts` around lines 347 - 351, The
openSupportChat function should declare an explicit return type (void) and wrap
the external call to window.Intercom('show') in a try/catch to surface
initialization errors; update the openSupportChat method to check for window and
window.Intercom, call Intercom inside a try block and handle/log any thrown
error in the catch (e.g., via console.error or the app logger) so failures don't
fail silently while preserving the original behavior.

Comment on lines +121 to +125
.demoCard__info strong {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

text-overflow: ellipsis may not apply on inline strong

Line 121-125 likely won’t consistently truncate because strong is inline by default. Make it block-level so the ellipsis behavior is reliable.

Suggested fix
 .demoCard__info strong {
+	display: block;
 	overflow: hidden;
 	text-overflow: ellipsis;
 	white-space: nowrap;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.demoCard__info strong {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.demoCard__info strong {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/src/app/components/connections-list/demo-connections/demo-connections.component.css`
around lines 121 - 125, The CSS rule targeting ".demoCard__info strong" uses
text-overflow: ellipsis but strong is inline by default so truncation won't work
reliably; change the display of the selector (e.g., set display: inline-block or
block) and ensure a width or max-width is applied to the ".demoCard__info
strong" rule so text-overflow can take effect, keeping the existing overflow and
white-space properties intact.

.dbGrid {
width: 100%;
grid-template-columns: 1fr;
grid-gap: 8px;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify deprecated grid-gap usage and lint rule presence
rg -n '\bgrid-gap\b'
fd -HI '.stylelintrc*' | xargs -I{} sh -c 'echo "--- {}"; cat "{}" | rg -n "property-no-deprecated|declaration-block-no-duplicate-properties"'

Repository: rocket-admin/rocketadmin

Length of output: 1505


🏁 Script executed:

#!/bin/bash
# Check exact content around line 201
echo "=== Content around line 201 in own-connections.component.css ==="
sed -n '195,210p' frontend/src/app/components/connections-list/own-connections/own-connections.component.css

# Check stylelint configuration
echo ""
echo "=== Stylelint configuration ==="
if [ -f .stylelintrc.json ]; then
  cat .stylelintrc.json | head -50
fi

# Check if other grid-gap instances exist in this file
echo ""
echo "=== All grid-gap instances in this file ==="
rg -n 'grid-gap' frontend/src/app/components/connections-list/own-connections/own-connections.component.css

Repository: rocket-admin/rocketadmin

Length of output: 1831


Replace deprecated grid-gap with gap.

Line 201 uses the deprecated grid-gap property, which stylelint enforces as an error via the standard-scss configuration. Modern CSS Grid uses gap instead.

Suggested fix
`@media` (width <= 600px) {
	.dbGrid {
		width: 100%;
		grid-template-columns: 1fr;
-		grid-gap: 8px;
+		gap: 8px;
	}
}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
grid-gap: 8px;
gap: 8px;
🧰 Tools
🪛 Stylelint (17.11.1)

[error] 201-201: Expected "grid-gap" to be "gap" (property-no-deprecated)

(property-no-deprecated)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@frontend/src/app/components/connections-list/own-connections/own-connections.component.css`
at line 201, Replace the deprecated CSS property "grid-gap" with the modern
"gap" in own-connections.component.css: locate the rule using "grid-gap: 8px;"
(in own-connections.component.css) and change it to "gap: 8px;"; after updating,
run stylelint/CI to confirm the standard-scss rule no longer flags the
declaration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants