carbon-components-angular icon indicating copy to clipboard operation
carbon-components-angular copied to clipboard

Multiple issues with CodeSnippet in latest Carbon Components Angular

Open Sparker0i opened this issue 1 year ago • 3 comments

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 avatar May 05 '24 03:05 Sparker0i

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 avatar May 05 '24 03:05 Sparker0i

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?

Sparker0i avatar May 17 '24 06:05 Sparker0i

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

Akshat55 avatar May 17 '24 16:05 Akshat55