Skip to content

Playground / API: Better ThemeWarnings / Feedback #29

@azriel91

Description

@azriel91

Currently for feedback, we:

  1. Return an IndexSet<String>.
  2. Only return feedback for stroke/outline/fill CSS class partials that don't result in an actual tailwind CSS class being generated.

Improvements that we can do (perhaps do these one at a time) are:

  1. Proper typed errors instead of Strings, e.g. enum with a variant for each error.

  2. Validate keys that aren't used:

    Keep a Map<ThemeAttr, UsedOrNot>, and mark it as used as each node/edge's CSS classes are computed.

    At the end, find unused ThemeAttr keys, and report these back to the user.

    Bonus points if we know the src location, but that generally means not losing it during deserialization. See [saphyr#]

  3. Parse values for each key -- or instead of using Map<ThemeAttr, String>, we actually have a proper type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions