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 ☂️ #16273

Closed
57 tasks done
alisonjoseph opened this issue Apr 26, 2024 · 9 comments
Closed
57 tasks done

Figma Code Connect ☂️ #16273

alisonjoseph opened this issue Apr 26, 2024 · 9 comments
Assignees
Labels
area: AI4UX planning: umbrella Umbrella issues, surfaced in Projects views role: dev 🤖
Milestone

Comments

@alisonjoseph
Copy link
Member

alisonjoseph commented Apr 26, 2024

Research and test feasibility of using Figma Code Connect to link Carbon Figma and Carbon React for AI readiness.

Demo video https://www.youtube.com/watch?v=5GVNfbltrQg
Demo repo https://github.com/jake-figma/code-connect-demo

Tasks

Preview Give feedback
  1. area: AI4UX role: dev 🤖
    alisonjoseph
  2. area: AI4UX role: dev 🤖
    alisonjoseph
  3. area: AI4UX
    alisonjoseph
  4. area: AI4UX role: dev 🤖
  5. alisonjoseph
  6. area: AI4UX role: dev 🤖
    alisonjoseph
  7. area: AI4UX role: dev 🤖
    alisonjoseph

Audit/connect all components

Connect / attempt to connect all components.
Document mismatch between Figma / code & create issues where appropriate.
Followup with Figma / create issues on needed functionality.

Components

Preview Give feedback
  1. area: AI4UX role: dev 🤖
    alisonjoseph
  2. area: AI4UX role: dev 🤖
    alisonjoseph
  3. area: AI4UX role: dev 🤖
    alisonjoseph
  4. area: AI4UX role: dev 🤖
    alisonjoseph
  5. area: AI4UX role: dev 🤖
    alisonjoseph
  6. area: AI4UX role: dev 🤖
    alisonjoseph
  7. area: AI4UX role: dev 🤖
    alisonjoseph
  8. area: AI4UX role: dev 🤖
    alisonjoseph
  9. area: AI4UX role: dev 🤖
    alisonjoseph
  10. area: AI4UX role: dev 🤖
    alisonjoseph
  11. area: AI4UX role: dev 🤖
    alisonjoseph
  12. area: AI4UX role: dev 🤖
    alisonjoseph
  13. area: AI4UX role: dev 🤖
    alisonjoseph
  14. area: AI4UX role: dev 🤖
    alisonjoseph
  15. area: AI4UX role: dev 🤖
    alisonjoseph
  16. area: AI4UX role: dev 🤖
    alisonjoseph
  17. area: AI4UX role: dev 🤖
    alisonjoseph
  18. area: AI4UX role: dev 🤖
    alisonjoseph
  19. area: AI4UX role: dev 🤖
    alisonjoseph
  20. area: AI4UX role: dev 🤖
    alisonjoseph
  21. area: AI4UX role: dev 🤖
    alisonjoseph
  22. area: AI4UX role: dev 🤖
    alisonjoseph
  23. area: AI4UX role: dev 🤖
    alisonjoseph
  24. area: AI4UX role: dev 🤖
    alisonjoseph
  25. area: AI4UX role: dev 🤖
    ariellalgilmore
  26. area: AI4UX role: dev 🤖
    alisonjoseph
  27. area: AI4UX role: dev 🤖
    alisonjoseph
  28. area: AI4UX role: dev 🤖
    alisonjoseph
  29. area: AI4UX role: dev 🤖
    alisonjoseph
  30. area: AI4UX role: dev 🤖
    alisonjoseph
  31. area: AI4UX role: dev 🤖
    alisonjoseph
  32. area: AI4UX role: dev 🤖
    alisonjoseph
  33. area: AI4UX role: dev 🤖
    alisonjoseph
  34. area: AI4UX role: dev 🤖
    alisonjoseph
  35. area: AI4UX role: dev 🤖
    alisonjoseph
  36. area: AI4UX role: dev 🤖
    alisonjoseph
  37. area: AI4UX role: dev 🤖
    alisonjoseph
@alisonjoseph alisonjoseph self-assigned this Apr 26, 2024
@alisonjoseph alisonjoseph converted this from a draft issue Apr 26, 2024
@alisonjoseph
Copy link
Member Author

alisonjoseph commented Apr 30, 2024

Need to be able to access nested component properties - figma/code-connect#11

Variable modes aren't currently supported. (we are using them for AI presence) figma/code-connect#6

Components with no issues 🥳

  • Button
  • Link
  • Select
  • Search
  • Accordion, AccordionItem
  • Toggle
  • ContentSwitcher
  • Loading
  • InlineLoading
  • TextInput, TextInputSkeleton
  • TextArea
  • Dropdown
  • Slider
  • Tooltip, DefinitionTooltip
  • Modal
  • Popover
  • Menu
  • OverflowMenu (parent component only)
  • ComboButton
  • MenuButton
  • MultiSelect
  • FilterableMultiSelect
  • StructuredList
  • Tag
  • ComboBox

Components tested with issues/bugs 🐞

FluidComboBox

FluidMultiSelect

Treeview

  • Figma component isn't built with nesting
  • Icon within the tree node is just a child component, not a swap icon

OverflowMenuItem

  • Figma has one Menu item component that maps to two different React components depending on the context. So we aren't able to map this.

MenuItem

  • Nested menus aren't able to be fully connected

Form

  • 2 column form isn't connected, need to figure out layouts/grid
  • form modal isn't connected

Time picker

Date picker

ProgressIndicator

Fluid components

FluidTextInput

ContainedList

UnorderedList/OrderedList

  • Nested lists are built differently in code vs. Figma.

FluidSearch, FluidSearchSkeleton

RadioButton

  • Props in Figma can be set on individual radio buttons vs. code where they are set on the group
  • labeltext, warningtext, helpermessage, warningmessage, errormessage, helpertext, errortext, label
  • Use case for ever having only one radio button? Arguable that should always use RadioButtonGroup.

FluidSelect

NumberInput / NumberInputSkeleton

Dropdown / DropdownSkeleton

AccordionSkeleton

Tabs

  • TabPanel doesn't exist in Figma
  • Similar to above, many props in Figma exist on Tabs items when in code they are set on Tabs.
  • fixed secondaryLabel isn't a property in Figma, just text. - on roadmap Can you target "Text" layers as "children"? figma/code-connect#30
  • TabsSkeleton in code refers to an entire component, in Figma it is a state on Tabs items so can't be mapped.
  • IconTab nesting bugs in dev mode in Figma

Notification

DataTable

  • Data table header doesn't exist in code
  • Size properties don't match. Figma has 'XL / LG / MD' or 'SM / XS' where code has xs ,sm, md, lg, xl. Figma requires you set the size properties on different components vs. code.
  • WIP....
  • .. coming back to this one later

Breadcrumb / BreadcrumbItem

  • noTrailingSlash is set on parent Breadcrumb in code, in Figma it is set as current property on individual breadcrumb item component(s).
  • Skeleton state in Figma is set on individual Breadcrumb items vs. in code it is the entire Breadcrumb component.
  • OverflowMenu doesn't appear to be a child of BreadcrumbItem in Figma, so can't directly pull into dev mode code.
  • Variant restriction nesting bug

Checkbox / CheckboxGroup

  • indented in Figma doesn't exist in code, has to be added via custom styles by a dev in code.
  • label in Figma can be added to any Checkbox, although would only ever be added to the first item, in code it can only be added to a Checkbox group as legendText.
  • CheckboxGroup missing horizontal variant #16486
  • In Figma you can set the component state to warn or invalid and then hide the message, this is impossible in code, if the state is warn or invalid the icon for the message always shows up.

CodeSnippet

Inline

Single

Multiline

Skeleton

  • Singleline skeleton not available in Figma

Toggle

@juanencalada

This comment was marked as resolved.

@alisonjoseph

This comment was marked as resolved.

@alisonjoseph
Copy link
Member Author

@juanencalada I'm still pretty new to Figma, but was looking at seeing if there was a way to bring nested properties from children into their parent and found this. https://forum.figma.com/t/add-a-forward-props-property-on-parent-component-inherit-props-from-a-selected-child-component/27875/2 Would this work with the way things are built in Carbon?

@juanencalada
Copy link

Hey @alisonjoseph, yes this is possible and something we do in several components already. However, it happens for each nested component, so we don't do it in cases where we have lots of nested components like in an accordion or dropdown because it would make the properties panel really long and harder to navigate. Unfortunately, there's currently also no control over which nested props we want to surface, so it's all or nothing. Meaning, we might expose properties we don't want to expose. If for example we have an accordion with left aligned, and we exposed the props of all accordion items, the right align prop would be visible there too which would just be noise.

@alisonjoseph
Copy link
Member Author

@juanencalada hmm, for Accordion specifically I think we would want most of the properties exposed. I suppose the ones that would be weird/confusing would be the state or titleText since those need to be set on the individual item. There should never be an instance where someone is right and left aligning items within the same Accordion.

@alisonjoseph alisonjoseph changed the title Research Figma's Code Connect Figma Code Connect ☂️ May 7, 2024
@alisonjoseph alisonjoseph added the planning: umbrella Umbrella issues, surfaced in Projects views label May 7, 2024
@alisonjoseph
Copy link
Member Author

@juanencalada another thing to keep in mind is that anything that changes or gets renamed in Figma will break Code Connect. It looks like sometime in the last few days Dropdown changed "Label text" to "Label" and that completely broke publishing. I was able to fix the error, however my sample Figma file with dropdown didn't update and code connect stopped working with an error that Label didn't exist when swapping to dev mode. Not sure how often changes like this happen?

@juanencalada
Copy link

Hey Alison, that makes sense and thanks for highlighting this! I don't think this happens too often. Most common would be around times when there are new feature releases or a component is getting updated for some reason.

This one in particular I had noticed the other day that the naming of the props wasn't matching how we name similar props in other components so that's probably what changed here.

I think something we could do is a full audit of the component props to ensure we have the consistency we want at least within Figma to minimize any breaking changes, as well communicate around release schedules to ensure component props are aligned across design and dev.

Something that comes to mind is I wonder if good feedback for Figma might be having some alias associated with the props so that if a prop name changes it's not entirely dependent on that to make a connection from the Figma side. Just a thought but might not be much there.

@alisonjoseph alisonjoseph moved this to 🏗 In Progress in Design to Code May 23, 2024
@alisonjoseph alisonjoseph moved this from 🏗 In Progress to No status in Design to Code May 23, 2024
@alisonjoseph alisonjoseph moved this from No status to 🏗 In Progress in Design to Code May 23, 2024
@alisonjoseph alisonjoseph moved this from 🏗 In Progress to 🚦 In Review in Design to Code Jun 14, 2024
@alisonjoseph alisonjoseph moved this from 🚦 In Review to 🏗 In Progress in Design to Code Jun 14, 2024
@sstrubberg sstrubberg added this to the 2024 Q3 milestone Jun 26, 2024
@sstrubberg sstrubberg moved this from 🏗 In Progress to 🪆 Needs Refined in Design System Jun 26, 2024
@sstrubberg sstrubberg moved this from 🪆 Needs Refined to 🏗 In Progress in Design System Jul 22, 2024
@sstrubberg sstrubberg moved this to In Progress in Roadmap (deprecated) Jul 26, 2024
@github-project-automation github-project-automation bot moved this to Triage in Roadmap Sep 12, 2024
@sstrubberg sstrubberg moved this from Triage to Now 💫 in Roadmap Sep 12, 2024
@sstrubberg sstrubberg modified the milestones: 2024 Q3, 2024 Q4 Sep 12, 2024
@alisonjoseph
Copy link
Member Author

Closing, remaining work being tracked here #17606

@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in Design to Code Sep 30, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in Design System Sep 30, 2024
@github-project-automation github-project-automation bot moved this from Now 💫 to Completed 🚢 in Roadmap Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: AI4UX planning: umbrella Umbrella issues, surfaced in Projects views role: dev 🤖
Projects
Archived in project
Archived in project
Archived in project
Development

No branches or pull requests

3 participants