Skip to content

[NFR]: Align bar icon names and drawings #64

Closed

Description

@niden

The icon knowledge is split between PHP and JavaScript, and nothing keeps the two sides in line.

  • Collectors set an icon name in PHP. debugbar.js holds the drawings and hard-codes search.
  • indicatorIcon() checks only for clock and search. Every other name gets the gears, so a typo in a collector draws gears with no error.
  • indicator.icon is a plain string, so static analysis accepts any value.

Changes:

  • Replace the if chain in indicatorIcon() with one map from name to drawing.
  • Add an icon_type list of the valid names to DebugBarTypes, and use it for indicator.icon.
  • Add a test that fails when the PHP names and the JavaScript map do not match.
  • Show no icon for a name that the map does not have, so that a custom collector with an unknown name does not get the gears.

Tabs stay as text, because icons would make each button wider.

Activity

  1. self-assigned this
    on Nov 5, 2026
  2. added theissue type on Nov 5, 2026
  3. moved this from Backlog to In Progress in Phalcon v5on Nov 5, 2026
  4. niden commented on Nov 5, 2026

    @niden
    SponsorMemberAuthor

    Resolved in #65

  5. moved this from In Progress to Implemented in Phalcon v5on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

  • Status
    Implemented

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions