8000 Figma Code Connect by calebnance · Pull Request #345 · eBay/ebayui-core-react · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.

Figma Code Connect #345

Closed
wants to merge 40 commits into from
Closed

Figma Code Connect #345

wants to merge 40 commits into from

Conversation

calebnance
Copy link
Contributor

hey @HenriqueLimas

i think Stephen has already talked to you about this coming down the pipeline. please add anyone else to this PR that might need to be on here.

this is the first go at it, but i have mapped most if not all components to our DS library on figma. i wanted to get this in front of y'all so we can talk around it, and let me know of any changes needed. you can test this right now on designs that use our ds components, just make sure you're in dev mode.

also the more i looked at it; there are definitely different namings + how DS has structured their components vs how the React components are structured, so i did the best i could where things are not 1:1.

example when in dev mode:
Screenshot 2024-05-21 at 3 45 27 PM

i have also hooked up variant handling where i could:

checkbox with no label checkbox with label
Screenshot 2024-05-21 at 3 51 59 PM Screenshot 2024-05-21 at 3 51 51 PM

@calebnance calebnance added documentation Improvements or additions to documentation enhancement New feature or request labels May 21, 2024
@calebnance calebnance requested a review from HenriqueLimas May 21, 2024 19:57
@calebnance calebnance self-assigned this May 21, 2024
Copy link
Member
@HenriqueLimas HenriqueLimas left a comment

Choose a reason for hiding this comment

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

Thank you for the PR. In the @figma/code-connect documentation, they suggest to use storybook instead. Isn't possible to use our stories instead?

package.json Outdated
@@ -62,6 +62,7 @@
"@babel/preset-typescript": "^7.23.3",
"@babel/register": "^7.0.0",
"@ebay/skin": "^17.0.0",
"@figma/code-connect": "^0.1.2",
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to also add a new script that we will need to use to make the connection

"scripts": {
   ...,
   "figma:connect": "figma connect publish \"https://...\" --token $FIGMA_TOKEN"
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@HenriqueLimas this has been added, thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

@shpandian
Copy link
Contributor

@calebnance did we also go through SAFE review? if so can you attach a SAFE ticket in the PR description as well?

@darkwebdev
Copy link
Collaborator

@HenriqueLimas
So is this for storybook or for figma? Looks like developers who look at designs in figma can use the generated code easily, right?

@calebnance
Copy link
Contributor Author

@darkwebdev @HenriqueLimas

Screenshot 2024-09-05 at 3 03 43 PM

Basically it creates dynamic code snippets, taking the properties data available and injects where it should be in the code.

So as a designer, i set the title to: "Hello, this is a title"

Then as a developer, in Dev Mode, the code snippet has "Hello, this is a title" in the <EbayDialogHeader />

Copy link
changeset-bot bot commented Mar 6, 2025

⚠️ No Changeset found

Latest commit: 68154bc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -7,6 +7,7 @@ const getDisplayName = <Props, >(Component: FC<Props>) => Component.displayName
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const withForwardRef = <Props, >(Component: FC<Props>) => {
const ForwardRef = forwardRef<FC<Props>, Props>((props, ref) =>
// @ts-ignore
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't have this, what is the issue of this type?

import React from 'react'
import { EbayAlertDialog } from '.'
/* @ts-ignore: this is only to help code connect */
import { EbayDialogHeader } from '@ebay/ui-core-react/ebay-dialog-base'
Copy link
Member

Choose a reason for hiding this comment

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

Why this one is being imported from the npm package? The . path should have the EbayDialogHeader

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None ye 45EE t
Development

Successfully merging this pull request may close these issues.

4 participants
0