-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature Request]: Proposal for Text-highlighter component #17257
Comments
Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team. |
Thanks for including such thorough information in those links! Providing some styling out of the box is an interesting proposition. Related: https://adrianroselli.com/2017/12/tweaking-text-level-styles.html My first thought is that we might not be able to have this type of thing indicated only by color, it probably also needs a shape change of some kind. Second, we'll need to support high-contrast modes as mentioned in that link. Do you have any ideas on how to tackle those issues? |
@tay1orjones |
As a team, we brainstormed and got solution to visually distinguish between the three variants. We considered several possibilities before reaching this consensus. To ensure high contrast, we can leverage the existing color tokens The storybook has been updated to showcase all the changes mentioned above. |
This is a great idea @punnoosewilson. Unfortunately, due to roadmap limitations, we won't be able to take this on soon, but we'd love to have you come by Carbon's Design Office Hours and we can brain-storm how you might go about implementing this. |
Hey @sstrubberg @tay1orjones , Based on their use cases, I've implemented a new prop called "reference" to enable reference-tagging functionality. The latest changes are reflected in the Storybook: What’s the next step that I need to take? |
@punnoosewilson this is great! Thank you for sharing all the additional context and the storybooks! We want to get your component up on Carbon Labs ASAP, but first, our team needs to finish this epic so you have a place to put your code. We're hoping to have this ready for you by EOY. @kennylam @Gururajj77 |
@punnoosewilson We're ready for this enhancement in Carbon Labs when you're ready! |
@sstrubberg, I'm ready to go. |
@punnoosewilson go ahead and fill it out so we have a record. Then let's get your code up and working. Once you have your submitted your form, no need to wait on a response from us. Go ahead and get your code into Labs. |
The problem
Our team is presently focused on designing versioning governance artefacts, a feature aimed at enhancing our data management capabilities. As part of this project, we are developing a comparison feature that allows users to easily identify differences between two versions of a data set. To improve the usability and clarity of this feature, our objective is to integrate text-highlighters, which will visually indicate where and what changes have taken place between the versions.
Upon investigation, we discovered that there isn’t a text-highlighter component available in Carbon Design System, which we rely on for our UI components. Given this gap, we are considering proposing the development of a text-highlighter component to the Carbon Design System team. This proposal would not only benefit our project but also potentially enhance the toolkit available to the broader Carbon community, supporting a wider range of applications that require similar functionality.
The solution
It’s crucial that we use HTML semantics appropriately to represent the text highlighters, as improper usage could lead to a negative user experience. We must ensure effective communication to users utilizing assistive technologies, necessitating careful control over the markup.
We require a component offering 3 variants:
1st variant -
<mark>
: This HTML element represents text which is marked or highlighted for reference or notation purposes.2nd variant -
<del>
: This HTML element represents a range of text that has been deleted from a document. (Comparison purpose)3rd variant -
<ins>
: This HTML element represents a range of text that has been added to a document. (Comparison purpose)Examples
I've put together a storybook that explains how the component works, with specific use cases.
Use cases and intro: https://pages.github.ibm.com/Punnoose-Wilson/text-highlighter/?path=/docs/text-highlighter--docs
Prototype: https://pages.github.ibm.com/Punnoose-Wilson/text-highlighter/?path=/docs/component-use-cases--docs
Application/PAL
IBM Knowledge Catalog(IKC)
Business priority
High Priority = pressing release
Available extra resources
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: