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

Multiple issues with CodeSnippet in latest Carbon Components Angular #2872

Open
Sparker0i opened this issue May 5, 2024 · 3 comments
Open

Comments

@Sparker0i
Copy link
Contributor

Detailed description

Describe in detail the issue you're having.

The following features from Code Snippet docs aren't working (Please check the codesandbox for more):

  1. [expanded]="true"
  2. [hideCopyButton]="true"

Is this a feature request (new component, new icon), a bug, or a general issue?

Bug

Is this issue related to a specific component?

CodeSnippet

What did you expect to happen? What happened instead? What would you like to see changed?

Expected: The above features would work
Actual: Didn't work

What browser are you working in?

Chrome

What version of the Carbon Design System are you using?

"carbon-components-angular": "^5.15.0"

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

IBM CIO Internal Offering

Steps to reproduce the issue

Codesandbox

Additional information

  • Screenshots
    Screenshot 2024-05-05 at 9 01 49 AM
@Sparker0i
Copy link
Contributor Author

I've also tried setting up display="multi" as per docs but that is giving an error both in CodeSandbox as well as on my project on local:
Screenshot 2024-05-05 at 9 04 12 AM

I tried using a different way to setup the display property in my code on local like:

import { SnippetType } from 'carbon-components-angular';
snippetType: SnippetType = SnippetType.multi
<cds-code-snippet [display]="snippetType">{{ code }}</cds-code-snippet>

But that too does not have any effect.

Trying it on CodeSandbox is giving this error:
Screenshot 2024-05-05 at 9 07 36 AM

@Sparker0i
Copy link
Contributor Author

Hey @Akshat55 , only the Copy button issue is fixed. The expanded issue still remains.
Do you want me to open another issue or can this issue remain opened?

@Akshat55
Copy link
Contributor

@Sparker0i Oh sorry, saw a PR associated with this PR was closed, so I thought it was resolved. I'll reopen this issue!

@Akshat55 Akshat55 reopened this May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants