Skip to content

Browse: show "No Icon" for elements that have no icon of their own #70

Description

@ctgnz

An entity that has no icon of its own still renders its frame, so Browse shows an empty frame next to the
label. That reads as an icon that failed to load rather than an element that legitimately has nothing to
draw. It should say something instead - generic No Icon text is enough.

What it looks like now

/Common/symbol/entity/UNSPECIFIED?trim=true returns a well-formed 200 with the frame ellipse and no icon
content:

<svg:svg ... viewBox="156.50 246.50 299.00 299.00">
  <svg:title>Unspecified</svg:title>
  <svg:g id="frame_1_">
    <svg:ellipse id="Group" cx="306.0" cy="396.0" rx="144.0" ry="144.0" fill="#80E0FF" .../>
  </svg:g>
</svg:svg>

Nothing is broken - there is simply no icon layer. Compare UNKNOWN, which carries the ?.

How to detect it

These elements are marked GraphicType.NA in the model, e.g. in CommonEntity:

UNSPECIFIED("00", "Unspecified", GraphicType.NA),
UNKNOWN("01", "Unknown Symbol", GraphicType.MAIN),

There are 109 GraphicType.NA elements across the generated jmsfx-standard, spread over most symbol
sets, so this is not an edge case. Many are grouping nodes whose children carry the actual icons, which is
precisely where an empty frame is most confusing.

MainElement already has isFreeCanvas() / isFullFrameIcon() predicates in this shape, so a matching
isNoIcon() (or similar) would be the natural place to expose it to the template, rather than having
entity-list.html compare the enum directly.

Scope

Browse (entity-list.html) is where it was noticed. Worth checking whether Generate shows the same empty
frame for these elements and wants the same treatment.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjmsfx-serverThe web-based icon generator

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions