Skip to content

[LG-5933] feat(message-feed) MessagePrompts Subcomponent#3491

Merged
shaneeza merged 72 commits intos/initial-message-integrationfrom
LG-5933-message-prompt-subcomponent
Feb 3, 2026
Merged

[LG-5933] feat(message-feed) MessagePrompts Subcomponent#3491
shaneeza merged 72 commits intos/initial-message-integrationfrom
LG-5933-message-prompt-subcomponent

Conversation

@shaneeza
Copy link
Collaborator

@shaneeza shaneeza commented Jan 29, 2026

✍️ Proposed changes

🎟 Jira ticket: LG-5933

This PR adds MessagePrompts subcomponents to the MessageFeed component, allowing developers to display suggested prompts within the InitialMessage.

  1. [LG-5932, LG-5934] refactor,feature(chat) Compound MessageFeed #3488
  2. [LG-5935] feat(message-feed) InitialMessage Subcomponent #3490
  3. (This PR) [LG-5933] feat(message-feed) MessagePrompts Subcomponent #3491
  4. [LG-5936] feat(message-feed): ResourceList Subcomponent #3495
  5. (message-feed) InitialMessage README #3498

✅ Checklist

For new components

  • I have added my new package to the global tsconfig
  • I have added my new package to the Table of Contents on the global README
  • I have verified the Live Example will look as intended on the design website.

For bug fixes, new features & breaking changes

  • I have added stories/tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have run pnpm changeset and documented my changes

🧪 How to test changes

…afygreen-ui into LG-5932-message-feed-compound
@shaneeza shaneeza changed the title [LG-5933] feat(message-feed) Message prompt subcomponent [LG-5933] feat(message-feed) MessagePrompt Subcomponent Jan 30, 2026
@shaneeza shaneeza changed the title [LG-5933] feat(message-feed) MessagePrompt Subcomponent [LG-5933] feat(message-feed) MessagePrompts Subcomponent Jan 30, 2026
Comment on lines 7 to 8
MessagePrompts: 'isLGMessageFeedMessagePrompts',
MessagePrompt: 'isLGMessageFeedMessagePrompt',
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should be subcomponent properties of InitialMessage

Comment on lines 1 to 3
import { type MessagePromptProps as LGMessagePromptProps } from '@lg-chat/message-prompts';

export type MessagePromptProps = LGMessagePromptProps;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: could also be written as:
export { type MessagePromptProps } from '@lg-chat/message-prompts';

@@ -55,5 +57,7 @@ export const InitialMessage = CompoundSubComponent(
{
displayName: 'InitialMessage',
key: MessageFeedSubcomponentProperty.InitialMessage,
MessagePrompts,
MessagePrompt,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Down for MessagePromptsItem

@shaneeza shaneeza requested a review from stephl3 February 2, 2026 21:15
Base automatically changed from LG-5935-initial-message to s/initial-message-integration February 3, 2026 16:11
@shaneeza shaneeza merged commit f74ae7e into s/initial-message-integration Feb 3, 2026
6 checks passed
@shaneeza shaneeza deleted the LG-5933-message-prompt-subcomponent branch February 3, 2026 16:21
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Coverage after merging LG-5933-message-prompt-subcomponent into s/initial-message-integration will be

79.38%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
chat/message-feed/src/components/InitialMessage
   InitialMessage.tsx100%100%100%100%
chat/message-feed/src/components/MessagePrompts
   MessagePrompts.tsx100%100%100%100%
chat/message-feed/src/components/MessagePromptsItem
   MessagePromptsItem.tsx100%100%100%100%

gargantia-prime pushed a commit that referenced this pull request Feb 5, 2026
* [LG-5932, LG-5934] refactor,feature(chat) Compound MessageFeed (#3488)

* refactor(MessageFeed): convert to CompoundComponent and temp remove assistant name

* refactor(MessageFeed): enhance component structure

* feat(MessageFeed): add MessageFeedContext

* docs(MessageFeed): add changeset

* fix(MessageFeed): update error message for context provider

* refactor(Message): undo message changes

* chore(MessageFeed): add compound-component dependency

* chore(pnpm-lock): add compound-component to dependencies

* refactor(MessageFeed): move shared types

* chore(changeset): update dependency version for @lg-chat/message-feed

* fix(tsconfig): add missing newline at end of file

* fix(MessageFeedContext): handle error boundary for React 17 in context hook tests

* testing

* [LG-5935] feat(message-feed) InitialMessage Subcomponent (#3490)

* refactor(MessageFeed): convert to CompoundComponent and temp remove assistant name

* refactor(MessageFeed): enhance component structure

* feat(MessageFeed): add MessageFeedContext

* docs(MessageFeed): add changeset

* fix(MessageFeed): update error message for context provider

* refactor(Message): undo message changes

* chore(MessageFeed): add compound-component dependency

* chore(pnpm-lock): add compound-component to dependencies

* chore(MessageFeed): update dependencies for compound-component integration

* refactor(MessageFeed): move shared types

* refactor(InitialMessage): update import path for shared types and use enum for key

* feat(InitialMessage): integrate MessageFeedContext to manage initial message visibility

* chore(changeset): update dependency version for @lg-chat/message-feed

* fix(tsconfig): add missing newline at end of file

* fix(MessageFeedContext): handle error boundary for React 17 in context hook tests

* feat(InitialMessage): implement styles and update component structure for initial message display

* feat(InitialMessage): enhance initial message component with structured content and styles

* refactor(InitialMessage): replace hardcoded title and description with constants for improved maintainability

* feat(ChatWindow): add initial message prompts and enhance message handling in chat window stories

* refactor(ChatWindow): remove enableHideOnSelect prop from Suggested Prompts in initial message component

* test(InitialMessage): add unit tests for accessibility, rendering, and visibility behavior

* test(MessageFeed): enhance tests with scrollTo mock and update query methods for initial message visibility

* refactor(InitialMessage): simplify getWrapperStyles function and remove unused props

* chore(MessageFeed): update dependencies and tsconfig to include new LeafyGreen UI components

* refactor(ChatWindow): rename initial message component and update props for message prompts

* chore(MessageFeed): remove unused @leafygreen-ui/hooks dependency from package.json and pnpm-lock.yaml

* refactor(MessageFeed): remove commented-out MyMessage component from InitialMessage story

* chore(MessageFeed): update changeset

* refactor(InitialMessage): update styles for title and description components

* refactor(InitialMessage): adjust inner wrapper styles with focus ring for improved layout

* refactor(InitialMessage): restructure inner wrapper and remove description styles for cleaner layout

* refactor(InitialMessage): integrate LeafyGreenProvider for dark mode support and simplify props in stories

* refactor(InitialMessage): remove LeafyGreenProvider and streamline component structure for improved readability

* feat(InitialMessage): add generated story for initialMessage

* refactor(InitialMessage): update AssistantAvatar size and adjust props in InitialMessage types for improved clarity

* fix(InitialMessage): export InitialMessageProps type for better type safety

* refactor(InitialMessage): Components to components

* refactor(InitialMessage): update import paths from Components to components

* feat(InitialMessage): add interactive story for message addition with state management

* fix(InitialMessage): add visibility property to transition styles for improved animation handling

* feat(MessageFeed): enhance InitialMessage stories with new message handling and improve visibility checks in tests

* refactor(MessageFeed): simplify initial message handling by removing unnecessary state and improving readability

* refactor(MessageFeed): export InitialMessageProps type for better accessibility in message feed components

* chore(MessageFeed): disable Chromatic snapshots for InitialMessage stories to streamline visual testing

* [LG-5933] feat(message-feed) MessagePrompts Subcomponent (#3491)

* refactor(MessageFeed): convert to CompoundComponent and temp remove assistant name

* refactor(MessageFeed): enhance component structure

* feat(MessageFeed): add MessageFeedContext

* docs(MessageFeed): add changeset

* fix(MessageFeed): update error message for context provider

* refactor(Message): undo message changes

* chore(MessageFeed): add compound-component dependency

* chore(pnpm-lock): add compound-component to dependencies

* chore(MessageFeed): update dependencies for compound-component integration

* refactor(MessageFeed): move shared types

* refactor(InitialMessage): update import path for shared types and use enum for key

* feat(InitialMessage): integrate MessageFeedContext to manage initial message visibility

* chore(changeset): update dependency version for @lg-chat/message-feed

* fix(tsconfig): add missing newline at end of file

* fix(MessageFeedContext): handle error boundary for React 17 in context hook tests

* feat(InitialMessage): implement styles and update component structure for initial message display

* feat(InitialMessage): enhance initial message component with structured content and styles

* refactor(InitialMessage): replace hardcoded title and description with constants for improved maintainability

* feat(ChatWindow): add initial message prompts and enhance message handling in chat window stories

* refactor(ChatWindow): remove enableHideOnSelect prop from Suggested Prompts in initial message component

* test(InitialMessage): add unit tests for accessibility, rendering, and visibility behavior

* test(MessageFeed): enhance tests with scrollTo mock and update query methods for initial message visibility

* refactor(InitialMessage): simplify getWrapperStyles function and remove unused props

* chore(MessageFeed): update dependencies and tsconfig to include new LeafyGreen UI components

* refactor(ChatWindow): rename initial message component and update props for message prompts

* chore(MessageFeed): remove unused @leafygreen-ui/hooks dependency from package.json and pnpm-lock.yaml

* refactor(MessageFeed): remove commented-out MyMessage component from InitialMessage story

* chore(MessageFeed): update changeset

* refactor(MessageFeed): integrate MessagePrompts and MessagePrompt components into InitialMessage

* refactor(InitialMessage): update styles for title and description components

* refactor(InitialMessage): adjust inner wrapper styles with focus ring for improved layout

* test(InitialMessage, MessagePrompt, MessagePrompts): enhance tests for rendering and type validation

* refactor(InitialMessage): rename component and add message prompts for enhanced user interaction

* chore(pnpm-lock): add '@lg-chat/message-prompts' dependency and clean up unused entries

* test(InitialMessage, MessagePrompts): improve error handling tests for enableHideOnSelect prop

* chore(changeset): update to include new components

* test(InitialMessage): fix JSX syntax in type validation tests for proper rendering

* test(MessageFeed): add tests for rendering MessagePrompts and its child MessagePrompt components

* refactor(InitialMessage): restructure inner wrapper and remove description styles for cleaner layout

* refactor(InitialMessage): integrate LeafyGreenProvider for dark mode support and simplify props in stories

* test(InitialMessage, MessageFeed): update tests to ensure proper rendering of MessagePrompts and prevent rendering of children when not a subcomponent

* refactor(InitialMessage): remove LeafyGreenProvider and simplify component structure for improved readability

* refactor(InitialMessage): remove LeafyGreenProvider and streamline component structure for improved readability

* feat(InitialMessage): add generated story for initialMessage

* feat(InitialMessage): enhance story with interactive MessagePrompts and update children prop for better demonstration

* chore(ALL_PACKAGES): revert ALL_PACKAGES

* refactor(InitialMessage): update AssistantAvatar size and adjust props in InitialMessage types for improved clarity

* fix(InitialMessage): export InitialMessageProps type for better type safety

* refactor(InitialMessage): Components to components

* refactor(InitialMessage): update import paths from Components to components

* feat(InitialMessage): add interactive story for message addition with state management

* fix(InitialMessage): add visibility property to transition styles for improved animation handling

* feat(MessageFeed): enhance InitialMessage stories with new message handling and improve visibility checks in tests

* feat(InitialMessage): rename Components to components

* fix(InitialMessage): update import paths from Components to components for consistency

* refactor(InitialMessage): replace MessageFeedSubcomponentProperty with InitialMessageSubcomponentProperty in relevant components

* feat(MessagePromptsItem): add MessagePromptsItem component with associated types and tests

* refactor(MessagePrompts): rename MessagePrompt to MessagePromptsItem across components and update related tests and stories

* refactor(MessageFeed): simplify initial message handling by removing unnecessary state and improving readability

* refactor(MessageFeed): export InitialMessageProps type for better accessibility in message feed components

* refactor(MessageFeed): export additional message prompts types for improved component integration

* [LG-5936] feat(message-feed): ResourceList Subcomponent (#3495)

* refactor(MessageFeed): convert to CompoundComponent and temp remove assistant name

* refactor(MessageFeed): enhance component structure

* feat(MessageFeed): add MessageFeedContext

* docs(MessageFeed): add changeset

* fix(MessageFeed): update error message for context provider

* refactor(Message): undo message changes

* chore(MessageFeed): add compound-component dependency

* chore(pnpm-lock): add compound-component to dependencies

* chore(MessageFeed): update dependencies for compound-component integration

* refactor(MessageFeed): move shared types

* refactor(InitialMessage): update import path for shared types and use enum for key

* feat(InitialMessage): integrate MessageFeedContext to manage initial message visibility

* chore(changeset): update dependency version for @lg-chat/message-feed

* fix(tsconfig): add missing newline at end of file

* fix(MessageFeedContext): handle error boundary for React 17 in context hook tests

* feat(InitialMessage): implement styles and update component structure for initial message display

* feat(InitialMessage): enhance initial message component with structured content and styles

* refactor(InitialMessage): replace hardcoded title and description with constants for improved maintainability

* feat(ChatWindow): add initial message prompts and enhance message handling in chat window stories

* refactor(ChatWindow): remove enableHideOnSelect prop from Suggested Prompts in initial message component

* test(InitialMessage): add unit tests for accessibility, rendering, and visibility behavior

* test(MessageFeed): enhance tests with scrollTo mock and update query methods for initial message visibility

* refactor(InitialMessage): simplify getWrapperStyles function and remove unused props

* chore(MessageFeed): update dependencies and tsconfig to include new LeafyGreen UI components

* refactor(ChatWindow): rename initial message component and update props for message prompts

* chore(MessageFeed): remove unused @leafygreen-ui/hooks dependency from package.json and pnpm-lock.yaml

* refactor(MessageFeed): remove commented-out MyMessage component from InitialMessage story

* chore(MessageFeed): update changeset

* refactor(MessageFeed): integrate MessagePrompts and MessagePrompt components into InitialMessage

* refactor(InitialMessage): update styles for title and description components

* refactor(InitialMessage): adjust inner wrapper styles with focus ring for improved layout

* test(InitialMessage, MessagePrompt, MessagePrompts): enhance tests for rendering and type validation

* refactor(InitialMessage): rename component and add message prompts for enhanced user interaction

* chore(pnpm-lock): add '@lg-chat/message-prompts' dependency and clean up unused entries

* test(InitialMessage, MessagePrompts): improve error handling tests for enableHideOnSelect prop

* chore(changeset): update to include new components

* test(InitialMessage): fix JSX syntax in type validation tests for proper rendering

* test(MessageFeed): add tests for rendering MessagePrompts and its child MessagePrompt components

* feat(MessageFeed): add ResourceLists and ResourceList properties to MessageFeedSubcomponentProperty

* feat(MessageFeed): add InitialMessageWithResourceList story and update InitialMessage component to include ResourceList and ResourceListItem

* refactor(InitialMessage): restructure inner wrapper and remove description styles for cleaner layout

* refactor(ResourceListItem): update styles to use theme-based icon colors and improve structure

* refactor(InitialMessage): integrate LeafyGreenProvider for dark mode support and simplify props in stories

* test(InitialMessage, MessageFeed): update tests to ensure proper rendering of MessagePrompts and prevent rendering of children when not a subcomponent

* refactor(InitialMessage): remove LeafyGreenProvider and simplify component structure for improved readability

* refactor(InitialMessage): remove LeafyGreenProvider and streamline component structure for improved readability

* feat(InitialMessage): add generated story for initialMessage

* feat(InitialMessage): enhance story with interactive MessagePrompts and update children prop for better demonstration

* chore(ALL_PACKAGES): revert ALL_PACKAGES

* fix(InitialMessage): remove unused darkMode prop from story and include resourceList in the InitialMessage component

* feat(ResourceList): integrate LeafyGreenProvider for dark mode support and update ResourceListProps to include DarkModeProps

* feat(InitialMessage): add additional resource list items and update story configuration for enhanced interactivity

* fix(ResourceListItem): update prop documentation for glyph and children to clarify usage

* docs(MessageFeed): update changeset

* refactor(InitialMessage): update AssistantAvatar size and adjust props in InitialMessage types for improved clarity

* fix(InitialMessage): export InitialMessageProps type for better type safety

* refactor(InitialMessage): Components to components

* refactor(InitialMessage): update import paths from Components to components

* feat(InitialMessage): add interactive story for message addition with state management

* fix(InitialMessage): add visibility property to transition styles for improved animation handling

* feat(MessageFeed): enhance InitialMessage stories with new message handling and improve visibility checks in tests

* feat(InitialMessage): rename Components to components

* fix(InitialMessage): update import paths from Components to components for consistency

* refactor(InitialMessage): replace MessageFeedSubcomponentProperty with InitialMessageSubcomponentProperty in relevant components

* feat(MessagePromptsItem): add MessagePromptsItem component with associated types and tests

* refactor(MessagePrompts): rename MessagePrompt to MessagePromptsItem across components and update related tests and stories

* feat(InitialMessage): implement InitialMessage component with accessibility tests, styles, and subcomponents for prompts and resource lists

* fix(MessageFeed): correct import paths for InitialMessage component

* feat(ResourceListItem): export ResourceListItemProps type for improved type safety

* test(InitialMessage): add tests for ResourceList subcomponent and update existing tests

* refactor(MessageFeed): simplify initial message handling by removing unnecessary state and improving readability

* refactor(MessageFeed): export InitialMessageProps type for better accessibility in message feed components

* feat(index): export ResourceList and its props for improved component accessibility

* refactor(MessageFeed): export additional message prompts types for improved component integration

* fix(chat) Update MessagePrompt padding (#3502)

* fix(MessagePrompt.styles): update padding values for improved layout consistency

* Update MessagePrompt padding to align with design specifications

* (message-feed) InitialMessage README (#3498)

* refactor(MessageFeed): convert to CompoundComponent and temp remove assistant name

* refactor(MessageFeed): enhance component structure

* feat(MessageFeed): add MessageFeedContext

* docs(MessageFeed): add changeset

* fix(MessageFeed): update error message for context provider

* refactor(Message): undo message changes

* chore(MessageFeed): add compound-component dependency

* chore(pnpm-lock): add compound-component to dependencies

* chore(MessageFeed): update dependencies for compound-component integration

* refactor(MessageFeed): move shared types

* refactor(InitialMessage): update import path for shared types and use enum for key

* feat(InitialMessage): integrate MessageFeedContext to manage initial message visibility

* chore(changeset): update dependency version for @lg-chat/message-feed

* fix(tsconfig): add missing newline at end of file

* fix(MessageFeedContext): handle error boundary for React 17 in context hook tests

* feat(InitialMessage): implement styles and update component structure for initial message display

* feat(InitialMessage): enhance initial message component with structured content and styles

* refactor(InitialMessage): replace hardcoded title and description with constants for improved maintainability

* feat(ChatWindow): add initial message prompts and enhance message handling in chat window stories

* refactor(ChatWindow): remove enableHideOnSelect prop from Suggested Prompts in initial message component

* test(InitialMessage): add unit tests for accessibility, rendering, and visibility behavior

* test(MessageFeed): enhance tests with scrollTo mock and update query methods for initial message visibility

* refactor(InitialMessage): simplify getWrapperStyles function and remove unused props

* chore(MessageFeed): update dependencies and tsconfig to include new LeafyGreen UI components

* refactor(ChatWindow): rename initial message component and update props for message prompts

* chore(MessageFeed): remove unused @leafygreen-ui/hooks dependency from package.json and pnpm-lock.yaml

* refactor(MessageFeed): remove commented-out MyMessage component from InitialMessage story

* chore(MessageFeed): update changeset

* refactor(MessageFeed): integrate MessagePrompts and MessagePrompt components into InitialMessage

* refactor(InitialMessage): update styles for title and description components

* refactor(InitialMessage): adjust inner wrapper styles with focus ring for improved layout

* test(InitialMessage, MessagePrompt, MessagePrompts): enhance tests for rendering and type validation

* refactor(InitialMessage): rename component and add message prompts for enhanced user interaction

* chore(pnpm-lock): add '@lg-chat/message-prompts' dependency and clean up unused entries

* test(InitialMessage, MessagePrompts): improve error handling tests for enableHideOnSelect prop

* chore(changeset): update to include new components

* test(InitialMessage): fix JSX syntax in type validation tests for proper rendering

* test(MessageFeed): add tests for rendering MessagePrompts and its child MessagePrompt components

* feat(MessageFeed): add ResourceLists and ResourceList properties to MessageFeedSubcomponentProperty

* feat(MessageFeed): add InitialMessageWithResourceList story and update InitialMessage component to include ResourceList and ResourceListItem

* refactor(InitialMessage): restructure inner wrapper and remove description styles for cleaner layout

* refactor(ResourceListItem): update styles to use theme-based icon colors and improve structure

* refactor(InitialMessage): integrate LeafyGreenProvider for dark mode support and simplify props in stories

* test(InitialMessage, MessageFeed): update tests to ensure proper rendering of MessagePrompts and prevent rendering of children when not a subcomponent

* refactor(InitialMessage): remove LeafyGreenProvider and simplify component structure for improved readability

* refactor(InitialMessage): remove LeafyGreenProvider and streamline component structure for improved readability

* feat(InitialMessage): add generated story for initialMessage

* feat(InitialMessage): enhance story with interactive MessagePrompts and update children prop for better demonstration

* chore(ALL_PACKAGES): revert ALL_PACKAGES

* fix(InitialMessage): remove unused darkMode prop from story and include resourceList in the InitialMessage component

* feat(ResourceList): integrate LeafyGreenProvider for dark mode support and update ResourceListProps to include DarkModeProps

* feat(InitialMessage): add additional resource list items and update story configuration for enhanced interactivity

* fix(ResourceListItem): update prop documentation for glyph and children to clarify usage

* docs(MessageFeed): update changeset

* refactor(InitialMessage): update AssistantAvatar size and adjust props in InitialMessage types for improved clarity

* fix(InitialMessage): export InitialMessageProps type for better type safety

* refactor(InitialMessage): Components to components

* refactor(InitialMessage): update import paths from Components to components

* feat(InitialMessage): add interactive story for message addition with state management

* fix(InitialMessage): add visibility property to transition styles for improved animation handling

* feat(MessageFeed): enhance InitialMessage stories with new message handling and improve visibility checks in tests

* feat(InitialMessage): rename Components to components

* fix(InitialMessage): update import paths from Components to components for consistency

* refactor(InitialMessage): replace MessageFeedSubcomponentProperty with InitialMessageSubcomponentProperty in relevant components

* feat(MessagePromptsItem): add MessagePromptsItem component with associated types and tests

* refactor(MessagePrompts): rename MessagePrompt to MessagePromptsItem across components and update related tests and stories

* feat(InitialMessage): implement InitialMessage component with accessibility tests, styles, and subcomponents for prompts and resource lists

* fix(MessageFeed): correct import paths for InitialMessage component

* feat(ResourceListItem): export ResourceListItemProps type for improved type safety

* test(InitialMessage): add tests for ResourceList subcomponent and update existing tests

* wip

* docs(README): enhance documentation for MessageFeed and InitialMessage components, detailing subcomponents and usage examples

* fix(README): correct syntax errors in useState initialization and update documentation for MessagePrompts and MessagePromptsItem

* docs(MessageFeed): update README primary example
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.

4 participants