Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Support custom names for Object Events #212

Open
adam-coster opened this issue Feb 19, 2024 · 0 comments
Open

RFC: Support custom names for Object Events #212

adam-coster opened this issue Feb 19, 2024 · 0 comments
Labels
✨ feature New feature or request ⌨️ vscode The Stitch extension for VSCode 🤔 rfc Request for comment

Comments

@adam-coster
Copy link
Member

adam-coster commented Feb 19, 2024

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...
@adam-coster adam-coster added ✨ feature New feature or request ⌨️ vscode The Stitch extension for VSCode 🤔 rfc Request for comment labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request ⌨️ vscode The Stitch extension for VSCode 🤔 rfc Request for comment
Projects
Status: Backlog
Development

No branches or pull requests

1 participant