Skip to content

Favorite Databases (Right‑click on Database Name + Environment Grouping) #1553

@kevenblog

Description

@kevenblog

Problem

1. Goal & Background

  • Current state: TablePro has a left‑side list of databases (e.g., DruidTest, Yearning, mall). Users want to right‑click on a database name directly in that list and add it to favorites.
  • Pain point: I have many databases in different environments (dev / test / prod). Every time I need to switch, I have to search or scroll through the long list – inefficient.
  • Goal: Provide a dedicated "Favorite Databases" panel where favorited databases are grouped by environment (Dev / Test / Prod), allowing quick switching.

2. Detailed Features

2.1 Right‑click menu to add to favorites

  • Location: Right‑click on any database name in the left‑side database list (e.g., DruidTest, Yearning).
  • Menu item: Add Add to Favorites (or Remove from Favorites if already favorited).
  • Visual feedback: A small star (★) appears next to the database name after favoriting.

2.2 Environment tagging (core requirement)

  • Users need to distinguish databases by environment (e.g., Dev, Test, Prod).
  • Implementation options:
    • Option A (recommended): Add an “Environment” dropdown (Dev / Test / Prod / None) to the database connection properties. The favorite system reads this property automatically.
    • Option B: When right‑clicking and selecting “Add to Favorites”, a popup asks the user to choose an environment (Dev / Test / Prod).
  • Display: In the favorites panel, each database shows an environment label like [Dev], [Test], [Prod], optionally with a colored dot.

2.3 Dedicated “Favorite Databases” panel

  • Location: A new section or tab in the left sidebar (e.g., ⭐ Favorite Databases), next to the existing table favorites.
  • Grouping by environment: Example view:
    ⭐ Favorite Databases
      📁 Dev (3)
          [Dev] DruidTest
          [Dev] code_gen
      📁 Test (2)
          [Test] Yearning
          [Test] mall
      📁 Prod (1)
          [Prod] eladmin
    
  • Interactions:
    • Double‑click a favorited database → immediately switch to that database.
    • Right‑click → remove from favorites.
    • Drag & drop to reorder within the same environment group (optional).

2.4 Quick environment filter

  • Add a filter dropdown at the top of the favorites panel: All / Dev / Test / Prod – only show databases of the selected environment.

3. Why “Database” not “Connection”?

  • The level of granularity is database (e.g., DruidTest, Yearning) – not the whole connection (a single MySQL connection may contain many databases).
  • The right‑click trigger should be on the database name inside the database list (as shown in my screenshot), not on a connection in the connection manager.

4. User Story (example)

Every day I work with the dev database DruidTest, the test database Yearning, and the prod database eladmin. I want to favorite all three of them, assign the correct environment to each, and see them grouped in the favorites panel. When I open TablePro, I want to double‑click any of them to switch – no more searching or scrolling.

5. Difference from my previous explanation (clarification for the author)

  • What the author understood (probably) – Add a star to a connection, flat list of favorites, no environment grouping.
  • What I actually need:
    1. Right‑click target = database name (not connection).
    2. Favorites are grouped by environment (Dev / Test / Prod).
    3. A dedicated favorites panel with environment grouping and filtering.

Proposed solution

No response

Alternatives considered

No response

Related database type

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions