github / github/catalyst

Allow definition of targets in kebab-case but access via camelCase

Open
#187 2 comments 1 reaction 0 assignees View on GitHub
@attr
Dominant language
TypeScript
Stars
1.4k
Forks
59
Avg merge
22h 12m
Merged PRs (30d)
5

Description

For attributes, I define in the markup `data-my-attr-name` and in the controller as `@attr myAttrName`

For targets however, I have to define the target name in both the markup and the controller using camelCase:
`data-targets="my-controller.myTargetsName"` and `@targets myTargetsName`
I think it would be nice (more consistent?) if the markup could support kebab-case.

Contributor guide

Open the contributing guide

Research direction

Start by locating the target-name handling and the existing attribute conversion behavior. Compare the markup examples for kebab-case and camelCase, then add coverage showing that a kebab-case target can be accessed through the camelCase controller property; done means both forms work consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.