Skip to content

Conversation

@davidmenendez
Copy link
Contributor

Closes #8363

@davidmenendez davidmenendez requested a review from a team as a code owner October 30, 2025 19:08
@davidmenendez davidmenendez requested review from makafsal and matthewgallo and removed request for a team October 30, 2025 19:08
@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for ibm-products-web-components ready!

Name Link
🔨 Latest commit 7461d56
🔍 Latest deploy log https://app.netlify.com/projects/ibm-products-web-components/deploys/691ffd9d5c9153000723311e
😎 Deploy Preview https://deploy-preview-8575--ibm-products-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit 7461d56
🔍 Latest deploy log https://app.netlify.com/projects/carbon-for-ibm-products/deploys/691ffd9d3ad2e1000854a3ac
😎 Deploy Preview https://deploy-preview-8575--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.98%. Comparing base (ef47aa3) to head (7461d56).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8575      +/-   ##
==========================================
- Coverage   82.01%   81.98%   -0.03%     
==========================================
  Files         403      404       +1     
  Lines       18548    18554       +6     
  Branches     4189     4189              
==========================================
  Hits        15212    15212              
- Misses       3336     3342       +6     
Components Coverage Δ
ibm-products 82.56% <0.00%> (-0.05%) ⬇️
ibm-products-web-components 81.19% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davidmenendez davidmenendez requested review from amal-k-joy, anamikaanu96, jlongshore and szinta and removed request for matthewgallo November 13, 2025 14:41
Comment on lines 1 to 45
/**
* Copyright IBM Corp. 2025, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import { EditInPlace } from './EditInPlace';
import figma from '@figma/code-connect';

figma.connect(
EditInPlace,
'https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=15713-9770&t=A1DwBD80AwWFp5NR-0',
{
props: {
cancelLabel: figma.string('Cancel label'),
editLabel: figma.string('Edit label'),
invalid: figma.boolean('Invalid'),
invalidText: figma.string('Invalid text'),
labelText: figma.string('Label text'),
placeholder: figma.string('Placeholder'),
saveLabel: figma.string('Save label'),
size: figma.enum('Size', {
small: 'sm',
large: 'lg',
medium: 'md',
}),
value: figma.string('Value'),
},
example: (props) => (
<EditInPlace
cancelLabel={props.cancelLabel}
editLabel={props.editLabel}
invalid={props.invalid}
invalidText={props.invalidText}
labelText={props.labelText}
placeholder={props.placeholder}
saveLabel={props.saveLabel}
size={props.size}
value={props.value}
/>
),
}
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was able to get it working with these changes in place...

Suggested change
/**
* Copyright IBM Corp. 2025, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { EditInPlace } from './EditInPlace';
import figma from '@figma/code-connect';
figma.connect(
EditInPlace,
'https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=15713-9770&t=A1DwBD80AwWFp5NR-0',
{
props: {
cancelLabel: figma.string('Cancel label'),
editLabel: figma.string('Edit label'),
invalid: figma.boolean('Invalid'),
invalidText: figma.string('Invalid text'),
labelText: figma.string('Label text'),
placeholder: figma.string('Placeholder'),
saveLabel: figma.string('Save label'),
size: figma.enum('Size', {
small: 'sm',
large: 'lg',
medium: 'md',
}),
value: figma.string('Value'),
},
example: (props) => (
<EditInPlace
cancelLabel={props.cancelLabel}
editLabel={props.editLabel}
invalid={props.invalid}
invalidText={props.invalidText}
labelText={props.labelText}
placeholder={props.placeholder}
saveLabel={props.saveLabel}
size={props.size}
value={props.value}
/>
),
}
);
/**
* Copyright IBM Corp. 2025, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from "react"
import { EditInPlace } from "./EditInPlace"
import figma from "@figma/code-connect"
figma.connect(
EditInPlace,
"https://www.figma.com/design/0F9dKH2abAd7gSfvnacfWf/-v11--IBM-Products-%E2%80%93-Carbon-Design-System?node-id=15713%3A9775",
{
props: {
// These props were automatically mapped based on your linked code:
size: figma.enum("Size", {
Small: "sm",
}),
invalid: figma.enum("State", {
Active: false,
Disabled: false,
Enabled: false,
Error: true,
Focus: false,
Hover: false,
}),
invalidText: figma.enum("State", {
Active: undefined,
Disabled: undefined,
Enabled: undefined,
Error: figma.textContent('Error message goes here'),
Focus: undefined,
Hover: undefined,
}),
value: figma.textContent('Input text'),
},
example: (props) => (
<EditInPlace
cancelLabel='Cancel'
editLabel='Edit'
id='Example-ID'
labelText='Example label text'
onCancel={()=> console.log("Cancel clicked")}
onChange={(val) => {console.log("Changed to: " + val)}}
onSave={()=> console.log("Save clicked")}
saveLabel='Save'
size={props.size}
value={props.value}
invalid={props.invalid}
invalidText={props.invalidText}
/>
),
},
)

Copy link
Contributor Author

@davidmenendez davidmenendez Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that doesn't look right to me, but i don't have dev mode so i'll have to take your word for it 😂

fixt

Copy link
Contributor

@szinta szinta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just a small change required to cover all the size prop values.

props: {
// These props were automatically mapped based on your linked code:
size: figma.enum('Size', {
Small: 'sm',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Small: 'sm',
Small: 'sm',
Medium: 'md',
Large: 'lg'

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Figma Code Connect - React (EditInPlace)

3 participants