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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach a UI component name in its view representation #16387

Closed
pomek opened this issue May 20, 2024 · 2 comments
Closed

Attach a UI component name in its view representation #16387

pomek opened this issue May 20, 2024 · 2 comments
Assignees
Labels
resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). squad:devops Issue to be handled by the Devops team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@pomek
Copy link
Member

pomek commented May 20, 2024

馃摑 Provide a description of the new feature

To give developers the ability to find a UI component via the programmatically API, it would be good to include a data attribute in the toolbar elements.

Example:

document.querySelector( '[data-cke-component-name="bold"]' );

Would return:

<button class="ck ck-button ck-off" type="button" tabindex="-1" aria-labelledby="ck-editor__aria-label_e97995583af36c0b5559f509c1fa22e26" aria-pressed="false" data-cke-tooltip-text="Bold (Ctrl+B)" data-cke-tooltip-position="s" data-cke-component-name="bold">
    <!-- ... -->
</button>

I wouldn't like to depend on tooltips as they can change at any time, and it's not even noticeable in the changelog.


If you'd like to see this feature implemented, add a 馃憤 reaction to this post.

@pomek pomek added the type:feature This issue reports a feature request (an idea for a new functionality or a missing option). label May 20, 2024
@pomek pomek added the squad:devops Issue to be handled by the Devops team. label May 20, 2024
@pomek pomek self-assigned this May 20, 2024
@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label May 20, 2024
@Witoso
Copy link
Member

Witoso commented May 20, 2024

To add more use cases, we also struggled in the past to measure clicks in toolbars in the docs, due to the lack of easy to access attribute.

@pomek
Copy link
Member Author

pomek commented May 23, 2024

See: #16388 (comment).

@pomek pomek closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2024
@pomek pomek added the resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). label May 23, 2024
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). squad:devops Issue to be handled by the Devops team. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants