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

Scrolling behaviour together with the webchat/join - event: The Chatbot doesn't scroll correctly. #3845

Open
MatthiasGwiozda opened this issue Apr 13, 2021 · 9 comments
Assignees
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. ExemptFromDailyDRIReport exempt from daily DRI report

Comments

@MatthiasGwiozda
Copy link

MatthiasGwiozda commented Apr 13, 2021

Screenshots

BUG

Version

latest (current version: 4.13.0)

Describe the bug

When using the welcome - event in combination with the autoScrollSnapOnActivity - option, the welcome message will not be seen completly.

Steps to reproduce

  1. create a backend which answers to the webchat/join event with a long message
  2. use this frontend - example (with your token):
<!DOCTYPE html>
<html>

<head>
    <script crossorigin="anonymous" src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"></script>
    <style>
        html,
        body {
            height: 100%;
        }

        body {
            margin: 0;
        }

        #webchat {
            height: 100%;
            width: 100%;
        }
    </style>
</head>

<body>
    <div id="webchat" role="main"></div>
    <script>
        const store = window.WebChat.createStore({}, ({ dispatch }) => next => action => {
          if (action.type === 'DIRECT_LINE/CONNECT_FULFILLED') {
            dispatch({
              type: 'WEB_CHAT/SEND_EVENT',
              payload: {
                name: 'webchat/join',
                value: { language: window.navigator.language }
              }
            });
          }

          return next(action);
        });

        window.WebChat.renderWebChat(
            {
                directLine: window.WebChat.createDirectLine({
                    token: 'INSERT_TOKEN_HERE'
                }),
                userID: 'YOUR_USER_ID',
                username: 'Web Chat User',
                locale: 'de-de',
                store,
                styleOptions: {
                    bubbleBackground: 'rgba(0, 255, 255, .1)',
                    autoScrollSnapOnActivity: true,
                }
            },
            document.getElementById('webchat')
        );
    </script>
</body>

</html>
  1. open the chatbot in a small window

Expected behavior

The welcome - message should be seen completly. But the chatbot scrolls to the bottom of the message.

Additional context

Not 100% sure if this behaviour is intended or a bug. But I feel like this would be an intuitive addition to the scrolling - behaviour feature.

I have read the following information:

Due to the limitation of chat adapter, we recommend content author not to send initial activities (a.k.a. welcome messages) longer than a page.

But for us it's just not feasible to follow this recommendation.

@MatthiasGwiozda MatthiasGwiozda added Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-reported Required for internal Azure reporting. Do not delete. labels Apr 13, 2021
@corinagum corinagum self-assigned this Apr 13, 2021
@corinagum
Copy link
Contributor

Thanks for the very detailed report! For 100% clarity, would you mind recording a video clip of the (incorrect) behavior and sharing here?

Were you able to experiment with the styleOption features available in #3653? Under the 'Description' section, you can see a video that pauses partially down the scrollbar.

image

image

Could you fiddle with these options and see if you are able to get behavior closer to what you're looking for?

P.S. Just in case you find it helpful, please use the following link for more information on welcome messages: https://github.com/microsoft/BotFramework-WebChat/blob/master/docs/WELCOME_MESSAGE.md

@corinagum corinagum added the customer-replied-to Required for internal reporting. Do not delete. label Apr 15, 2021
@MatthiasGwiozda
Copy link
Author

would you mind recording a video clip of the (incorrect) behavior

I've edited the question and added a gif

Were you able to experiment with the styleOption features available in #3653?

Yes I tried some options. But none of them fixed this problem.

@corinagum
Copy link
Contributor

@MatthiasGwiozda Great, thanks for this info. My next step is to try recreating the bug you're experiencing. If I'm having problems I may ask for some more info from you. I'll report back soon!

One more question - is this behavior that recently broke for you? Or is this a newly created bot with no previous behavior available for comparison?

@corinagum
Copy link
Contributor

corinagum commented Apr 19, 2021

@MatthiasGwiozda I was able to reproduce this issue, but I did find the following comment from the PR 3653 linked above:

Due to the limitation of chat adapter, we recommend content author not to send initial activities (a.k.a. welcome messages) longer than a page.

This is known behavior and could be resolved by sending a shorter welcome message.

@compulim is there a plan to work on this behavior in the future? Can we get more info/documentation on what the limitations are?

Reassigning to compulim for input. Do we want to make this an action item?

@corinagum corinagum assigned compulim and unassigned corinagum Apr 19, 2021
@MatthiasGwiozda
Copy link
Author

is this behavior that recently broke for you? Or is this a newly created bot with no previous behavior available for comparison?

It always behaved like this. The reason why I consider this to be a "bug" is because it feels like the scroll - behaviour should integrate the welcome - message aswell as all the other messages from the bot.

@Gusi88
Copy link

Gusi88 commented Apr 21, 2021

we have the same problem

@corinagum
Copy link
Contributor

@Gusi88 Thanks! Additional chime-ins help us with prioritization. :)

@corinagum corinagum added this to the R14 milestone Apr 26, 2021
@tdurnford tdurnford added the ExemptFromDailyDRIReport exempt from daily DRI report label May 11, 2021
@compulim compulim modified the milestones: R14, R15 Jun 16, 2021
@compulim compulim removed this from the R15 milestone Jun 29, 2021
@nodueck
Copy link

nodueck commented Aug 10, 2022

@corinagum This is still an issue for us.
@MatthiasGwiozda Do you have a good workaround?

@MatthiasGwiozda
Copy link
Author

@nodueck I don't have a workaround - currently our chatbot users need to scroll up to see the whole message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. ExemptFromDailyDRIReport exempt from daily DRI report
Projects
None yet
Development

No branches or pull requests

6 participants