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

A disabled state/attribute for CodeSnippet #7455

Closed
ashleylord8 opened this issue Dec 14, 2020 · 0 comments · Fixed by #7478
Closed

A disabled state/attribute for CodeSnippet #7455

ashleylord8 opened this issue Dec 14, 2020 · 0 comments · Fixed by #7478

Comments

@ashleylord8
Copy link

Use this template if you want to request a new feature, or a change to an
existing feature.

If you are reporting a bug or problem, please use the bug template instead.

Summary

Please describe your request in one or two sentences:

It would be helpful to have a disabled state for CodeSnippets, in the experience of wanting to show a code snippet "placeholder" BEFORE the value within the CodeSnippet is available. This experienced is used today within Watson Assistant to show Tanya the correct flow of the form, but disable the CodeSnippet (and copy function) when the value has yet to be generated.

Clarify if you are asking for design, development, or both design and
development.

This will most likely require both development and design to understand HOW the CodeSnippet should appear disabled (and remove keyboard focus, etc.).

Justification

Provide the business reasons for this request.

We want to show a placeholder for the CodeSnippet, so that the user understands the flow of the form, but don't want the user to be confused if the CodeSnippet is enabled but does NOT have a value within it yet.

"Must have" functionality

Highlight any "must have" needs and functionality for the request.

The ask is to add another attribute called "disable" to the CodeSnippet component, which allows for it to be disabled stylistically and also not keyboard focusable when disabled.

This should not be a full list of functionality; the Carbon team will work with
you to define functionality based on the desired UX.

Specific timeline issues / requests

Do you want this work within a specific time period? Is it related to an
upcoming release?

No immediate timeline.

NB: The Carbon team will try to work with your timeline, but it's not
guaranteed. The earlier you make a request in advance of a desired delivery
date, the better!

Available extra resources

What resources do you have to assist this effort?

We created a work around for now, which change the styling for the CodeSnippet when we want it to be "disabled." However, we noticed we might need a fuller solution through Carbon since we find an accessibility issue with keyboard focus when the CodeSnippet is disabled (from our implementation).

Screenshots:
Screen Shot 2020-12-14 at 10 30 27 AM
Screen Shot 2020-12-14 at 10 30 19 AM

Carbon is a collaborative system. We encourage teams to build components and
submit them for integration as either add-ons or core components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants