Skip to content

feat(f36-ai-components): add AIChatLayout component#3203

Merged
Elliot Massen (elliotmassen) merged 18 commits intoPIC-694-forma36-create-aichatlayout-componentfrom
PIC-694-forma36-create-aichatlayout-component-implementation
Oct 27, 2025
Merged

feat(f36-ai-components): add AIChatLayout component#3203
Elliot Massen (elliotmassen) merged 18 commits intoPIC-694-forma36-create-aichatlayout-componentfrom
PIC-694-forma36-create-aichatlayout-component-implementation

Conversation

@elliotmassen
Copy link
Copy Markdown
Member

@elliotmassen Elliot Massen (elliotmassen) commented Oct 23, 2025

Purpose of PR

This PR continues from #3202 by adding the AIChatLayout component.

Collapsed Normal Expanded
Screenshot 2025-10-23 at 17 41 41 Screenshot 2025-10-23 at 17 41 45 Screenshot 2025-10-23 at 17 42 09

Notes

  • The component is built to be agnostic its contents. In the designs the contents can be an overlay introduction screen, a traditional chat history listing or a set of results to be reviewed - and I imagine there could well be others in the future - therefore I have presumed that the consuming code should be responsible for managing the contents, rather than the layout itself being prescriptive.
  • I have made the component props fairly flexible with the ability to provide custom icons and buttons so that it can be adapted for different use cases.
  • I have taken some creative liberties with the button animations - I am not wedded to them and I'm completely happy to remove or amend these as required! I thought worth putting something in place as a starting point.

PR Checklist

  • I have read the relevant readme.md file(s)
  • All commits follow our Git commit message convention
  • Tests are added/updated/not required
  • Tests are passing
  • Storybook stories are added/updated/not required
  • Usage notes are added/updated/not required
  • Has been tested based on Contentful's browser support
  • Doesn't contain any sensitive information

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Oct 23, 2025

⚠️ No Changeset found

Latest commit: 8e56100

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
forma-36 Error Error Oct 27, 2025 11:13am

Comment thread packages/f36-ai-components/src/AIChatLayout/AIChatLayout.styles.ts Outdated
@elliotmassen Elliot Massen (elliotmassen) changed the title Pic 694 forma36 create aichatlayout component implementation feat(f36-ai-components): add AIChatLayout component Oct 24, 2025
@elliotmassen Elliot Massen (elliotmassen) marked this pull request as ready for review October 24, 2025 09:30
Comment on lines +160 to +173
<svg xmlns="http://www.w3.org/2000/svg" width={0} height={0}>
<defs>
<linearGradient
id="icon-gradient"
gradientTransform="rotate(46.64 .5 .5)"
gradientUnits="objectBoundingBox"
>
<stop offset="19.41%" stopColor="#1872E5" />
<stop offset="38.04%" stopColor="#8C2EEA" />
<stop offset="56.68%" stopColor="#E65325" />
<stop offset="75.31%" stopColor="#EAAF09" />
</linearGradient>
</defs>
</svg>
Copy link
Copy Markdown
Member Author

@elliotmassen Elliot Massen (elliotmassen) Oct 24, 2025

Choose a reason for hiding this comment

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

Moe Shaaban (@mshaaban0) / @contentful/team-ui-foundation Do you have any advice on where best to put this SVG? It's used to apply a gradient to the icon (see aiGradientIcon in the styles)? I previously had tried to avoid needing to place it in the DOM, and had something working with a CSS fill with a data URL, however it didn't work with Safari.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it's fine to keep it in it's own file.. I recommend making it an icon with icon component helper, See https://github.com/contentful/forma-36/tree/main/packages/components/icons/src/custom

Comment thread packages/f36-ai-components/src/AIChatLayout/AIChatLayout.tsx Outdated
Copy link
Copy Markdown

@fabe Fabian Schultz (fabe) left a comment

Choose a reason for hiding this comment

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

Great stuff 💅

Copy link
Copy Markdown
Collaborator

@mshaaban0 Moe Shaaban (mshaaban0) left a comment

Choose a reason for hiding this comment

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

Very Nice 🥇

@elliotmassen Elliot Massen (elliotmassen) merged commit 6a44dfe into PIC-694-forma36-create-aichatlayout-component Oct 27, 2025
13 of 18 checks passed
@elliotmassen Elliot Massen (elliotmassen) deleted the PIC-694-forma36-create-aichatlayout-component-implementation branch October 27, 2025 11:33
Elliot Massen (elliotmassen) added a commit that referenced this pull request Oct 29, 2025
…tlayout-component-implementation

feat(f36-ai-components): add AIChatLayout component
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants