Skip to content

Manage Databases: hide 'Select' toolbar button when no databases are imported #561

@jschick04

Description

@jschick04

Summary

In the Manage Databases tab of the Database Tools modal, the Select toolbar button is rendered even when no databases are imported. With nothing to select, the button is non-functional and adds visual noise alongside the empty-state message.

Repro

  1. Open Database Tools → Manage Databases with no databases imported.
  2. Observe both Select and Import database… are rendered above the empty-state message "Import a provider database (.db file) using the Import database… button above to resolve events from other providers."

Expected

  • Import database… is always visible (only path to add content).
  • Select is hidden until DatabaseService.Entries.Count > 0.

Source

  • src/EventLogExpert.UI/DatabaseTools/Tabs/ManageDatabasesTab.razor — wrap the Select button (lines 15–23) in @if (DatabaseService.Entries.Count > 0).
  • Make sure the surrounding manage-databases-import-row flex layout still right-aligns Import when Select is hidden.
  • Add coverage to tests/Unit/EventLogExpert.UI.Tests/DatabaseTools/Tabs/ManageDatabasesEmptyStateTests.cs (or the ManageDatabasesTab tests) asserting the Select button is absent in the empty state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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