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

Improve "component name" in component list #216

Open
HugoDF opened this issue May 4, 2021 · 0 comments
Open

Improve "component name" in component list #216

HugoDF opened this issue May 4, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@HugoDF
Copy link
Collaborator

HugoDF commented May 4, 2021

See discussion: #189

Instead of currently rendering the component's "computed name" to be a single field:

<My Component>

We could render (render each of the relevant attributes that help identify the component):

<div x-title="My Component">

Initially we can start with the currently supported attributes see https://github.com/alpine-collective/alpinejs-devtools/blob/master/packages/shell-chrome/src/utils.js#L230-L243:

  • x-title
  • x-id
  • id
  • name
  • wire:id
  • phx-view="name" (live view name)
  • aria-label
  • x-data function name
  • role

We could probably make it configurable through the settings + limit the number of attributes we're displaying (tag name + x-data + 2-3 attributes), some attributes like id and wire:id will tend to be unique, that should be enough to allow users to know which component is which.

@HugoDF HugoDF added the enhancement New feature or request label May 4, 2021
@HugoDF HugoDF changed the title Enhancement: rendering component list "names" Improve "component name" in component list May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant