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

Send box renderer #3532

Closed

Conversation

felixvanleeuwen
Copy link

Fixes #3526
Fixes #3038

Description

Added a prop that is sent down into BasicWebChat and is used to render the send box if not undefined.

Specific Changes

Added a prop to BasicWebChat defaultProps.
Added a check in the BasicWebChat render to use the new prop instead of rendering the BasicSendBox

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@ghost
Copy link

ghost commented Oct 12, 2020

CLA assistant check
All CLA requirements met.

@corinagum
Copy link
Contributor

Thanks for the PR!!

  1. Please fill out the CLA
  2. Could you add the passing snapshots to the committed files? They need to be present in order for the CI to pass.

I'll take a closer look at this sometime this week.

@corinagum corinagum self-assigned this Oct 12, 2020
Copy link
Contributor

@corinagum corinagum left a comment

Choose a reason for hiding this comment

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

This will need to be updated to use the middleware format rather than the deprecated renderer format. Please address that and above requests as well. :)

@compulim feel free to add. Do you think this is a good middle step while we wait for the new sendbox design?

@@ -82,9 +85,11 @@ const BasicWebChat = ({ className }) => {
export default BasicWebChat;

BasicWebChat.defaultProps = {
className: ''
className: '',
sendBoxRenderer: undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than renderer, this will need to be changed to sendBoxMiddleware.
image
https://github.com/microsoft/BotFramework-WebChat/tree/master/packages/component/src/Middleware

I added a new issue to get rid of our deprecations to reduce confusion: #3534

@compulim, do you have thoughts?

Copy link
Author

Choose a reason for hiding this comment

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

I've changed the name of the prop.

"Middleware" implies that can it can be inserted in between existing logic.
This prop is very much an alternative route that can be used, once used it can't pass on to existing logic.

Having said that, do you still feel this is the correct name for the prop?
Or did you mean my solution should be a middleware and I have to change my implementation?

Copy link
Contributor

Choose a reason for hiding this comment

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

The implementation should be middleware. :) I think there are other considerations that @compulim would like to comment on as well. Pinging him.

Copy link
Author

Choose a reason for hiding this comment

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

@compulim is the change satisfactory?

@corinagum corinagum removed their assignment Oct 12, 2020
@felixvanleeuwen
Copy link
Author

I've updated the snaps but the CI still fails.
When I try to check the "Details" I get a 401.

How do I check why my CI is failing?

@corinagum
Copy link
Contributor

@felixvanleeuwen thanks for the updates! Unfortunately non-internal developers are unable to check the CI. Some of them are DL timeouts, so I'm rerunning right now and after that I'll make a list of the failing tests. Thanks for your patience.

@corinagum
Copy link
Contributor

@compulim ping

@felixvanleeuwen
Copy link
Author

Any news on the failing CI?

@felixvanleeuwen
Copy link
Author

@compulim Is this how you imagined it?

@corinagum
Copy link
Contributor

@felixvanleeuwen Thanks for the updates! FYI, compulim is currently on vacation and will be unavailable for a few weeks. Since he wanted to go through the code, I'll go through and possibly leave a few comments, but we'll wait until he's back for the approval.

We just finished a release milestone, and our next is scheduled for next year, so presumably we'll still be able to get this into the next release.

Thanks for your patience!


# Test out the hosted sample

- [Try out MockBot](https://microsoft.github.io/BotFramework-WebChat/02.branding-styling-and-customization/j.enable-emoji)
Copy link
Contributor

Choose a reason for hiding this comment

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

Update URL

@corinagum
Copy link
Contributor

You don't need to do this immediately, since there will be frequent changes to CHANGELOG.md that will cause merge conflicts, but before this gets merged in, you will need to give yourself credit and add the changes to the Changelog :) I would include a line under Added in Unreleased for the SendBox changes, and an entry under Samples for the new sample.

Please also add this sample to the /samples/README.md table. Thanks again :)

@felixvanleeuwen
Copy link
Author

Hello, is there anything blocking about this PR still?
I'd like to hear what's wrong so I can take steps to remedy.

@felixvanleeuwen
Copy link
Author

Hello?

@corinagum
Copy link
Contributor

Hi @felixvanleeuwen sorry I missed your reply. We still need @compulim to do a pass review, but there are still issues unaddresed above that should be fixed. Please take a look at those.

@felixvanleeuwen
Copy link
Author

I think all of the issues have been addressed.
If you feel that some have not been addressed: could you specifically list them?

@corinagum
Copy link
Contributor

Reopening - I'm assuming close was unintentional :) Please let me know if not.

@corinagum corinagum reopened this Mar 24, 2021
@sibbl
Copy link

sibbl commented Apr 21, 2022

Sorry for bringing up this PR again, but is there still any interest in being able to implement a custom search box? From a developers perspective it makes perfect sense to have a middleware for this just like we have for all other crucial parts of the UI.

Or is there some sample of solving it with current tools, as I saw that there's a hideSendBox style option?

@compulim
Copy link
Contributor

compulim commented Apr 8, 2024

Obsoleted by #5120.

@compulim compulim closed this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants