Skip to content

RFC: Support custom names for Object Events #212

Open
@adam-coster

Description

@adam-coster

Object Event names are not particularly descriptive, and they also aren't very searchable since e.g. you might have a hundred objects with a "Step" event.

To provide some extra context in the resource tree, and some extra searchability in the Ctrl+T menu, we could allow for custom event names.

A light-weight mechanism for this would be to define a new JSDoc tag for the purpose, e.g. @eventname My custom name, that would only do something when used in Object Event code (as either a first-wins or last-wins kind of thing).

We'd probably do some light validation on the names, e.g. to cut them off at a reasonable max-length.

We'd then display this custom name in the Stitch resource tree, either instead of or in addition to the actual event name.

For example, Step might become Load (Step).

The same convention would be used in the Ctrl+T symbol searcher, so that these custom names would be searchable.

Thanks to @kevinchatham for the idea!


Would this be useful? Are there any reasons NOT to do this? What would the expected/best behavior be? In particular, should the event name be completely replaced, or used as supplemental info? E.g. for a custom name Load, would we want to see:

  1. Load
  2. Load (Step)
  3. Step (Load)
  4. Something else...

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⌨️ vscodeThe Stitch extension for VSCode🤔 rfcRequest for comment✨ featureNew feature or request

    Type

    No type

    Projects

    • Status

      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions