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

Figma Code Connect #345

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Figma Code Connect #345

wants to merge 23 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?

@@ -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 />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants