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

feat(InviteAgents): new component #1363

Merged
merged 27 commits into from
Sep 26, 2024
Merged

feat(InviteAgents): new component #1363

merged 27 commits into from
Sep 26, 2024

Conversation

VadymBezpalko
Copy link
Contributor

@VadymBezpalko VadymBezpalko commented Sep 23, 2024

Description

New component: FIGMA

Storybook

https://feature-invite-agents--613a8e945a5665003a05113b.chromatic.com

Checklist

Obligatory:

  • Self review (use this as your final check for proposed changes before requesting the review)
  • Add correct label
  • Assign pull request with the correct issue

@VadymBezpalko VadymBezpalko self-assigned this Sep 23, 2024
@VadymBezpalko VadymBezpalko marked this pull request as ready for review September 25, 2024 10:52
@mreszke
Copy link
Collaborator

mreszke commented Sep 26, 2024

IMO it would be better to remove onSetUpChatbotClick from the props and allow to pass an array of custom elements

  <InviteAgents
    agents={agents}
    onAddTeammateClick={onAddTeammateClick}
    customElements={[
       onClick: onSetUpChatbotClick,
       icon: ChatbotIcon,
       text: 'Set up ChatBot'
    ]}
    animatedInviteButton={true}
    tooltipArrowOffset={13}
    className="invite-agents"
  />

/**
* Custom style for the avatar
*/
style?: React.CSSProperties;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this should be a part of ComponentCoreProps? 🤔

];

const onAddTeammateClick = () => {
console.log('Add Teammate Clicked');
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we shouldn't put the console.log in the docs. Simple () => {} is enough imo 🤔

>
{hasOnlyUnavailableAgents ? (
<Interactive
header="No one's available to assist customers"
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO a request to change copy here or elsewhere will appear sooner rather than later. 😅 Shouldn't we leave this open for custom string? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are at least a few different places with this copy, so if we want to move it to props then other places should be covered too, so I'd leave it like that for now

avatar: string;
}

export interface InviteAgentsProps {
Copy link
Contributor

Choose a reason for hiding this comment

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

extend ComponentCoreProps? 🤔

Copy link
Contributor

@marcinsawicki marcinsawicki left a comment

Choose a reason for hiding this comment

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

left some comments

@VadymBezpalko
Copy link
Contributor Author

IMO it would be better to remove onSetUpChatbotClick from the props and allow to pass an array of custom elements

  <InviteAgents
    agents={agents}
    onAddTeammateClick={onAddTeammateClick}
    customElements={[
       onClick: onSetUpChatbotClick,
       icon: ChatbotIcon,
       text: 'Set up ChatBot'
    ]}
    animatedInviteButton={true}
    tooltipArrowOffset={13}
    className="invite-agents"
  />

@mreszke The problem is that we have a 'Set up ChatBot' CTA in a dedicated tooltip, so it needs to be passed either way.
image

@VadymBezpalko VadymBezpalko merged commit f721eb7 into main Sep 26, 2024
5 checks passed
@VadymBezpalko VadymBezpalko deleted the feature/invite-agents branch September 26, 2024 08:13
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.

3 participants