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

The property named 'media' cannot be omitted from <InlineTip> component, which forces the Inline Tip widget to be uncollapsable #6099

Open
2 tasks done
rcbell opened this issue Sep 23, 2024 · 0 comments
Assignees
Labels
area: typescript component: InlineTip Sev 3 Visible or noticeable to users but does not impede functionality. Has a workaround. type: bug 🐛 Something isn't working
Milestone

Comments

@rcbell
Copy link

rcbell commented Sep 23, 2024

Package

Carbon for IBM Products

Description

when using in typescript code, we want the widget to be collapsable. This is controlled by the passing of the "media" property. In the InlineTip.d.ts file:

/**
     * The object describing an image in one of two shapes.
     * - If a single media element is required, use `{render}`.
     * - If a stepped animation is required, use `{filePaths}`.
     *
     * Enabling `media` disables the `collapsible` feature.
     */
    media: MediaType;

To get the collapse feature, one must not pass media, but without the ? (optional flag) the code will not compile without supplying "media=...". The fix is to add the ? to the property:

   media?: MediaType;

Component(s) impacted

InlineTip
Screenshot_0071

Browser

Chrome, Firefox

@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version

2.39.0

Suggested Severity

Severity 3 = The problem is visible or noticeable to users but does not impede the usability or functionality. Affects minor functionality, has a workaround.

Product/offering

IBM Storage Defender

CodeSandbox or Stackblitz example

https://carbon-for-ibm-products.netlify.app/?path=/story/experimental-onboarding-inline-tip-inlinetip--inline-tip&globals=viewport:basic

Steps to reproduce the issue (if applicable)

this is reproducible in v2.50.2

Uing the story code for InlineTip, comment out the "media: MediaType;" property.
You will see the compile-error.

Release date (if applicable)

No response

Code of Conduct

@matthewgallo matthewgallo added area: typescript type: bug 🐛 Something isn't working Sev 3 Visible or noticeable to users but does not impede functionality. Has a workaround. component: InlineTip and removed status: needs triage 🕵️‍♀️ labels Sep 23, 2024
@matthewgallo matthewgallo added this to the 2024 Q3 milestone Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: typescript component: InlineTip Sev 3 Visible or noticeable to users but does not impede functionality. Has a workaround. type: bug 🐛 Something isn't working
Projects
Status: Backlog 🌋
Development

No branches or pull requests

3 participants