Skip to content

Removed relative positioning from scrollable chat area #74

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

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

dshire
Copy link
Member

@dshire dshire commented Mar 4, 2025

There is a conflict in positioning relative to the parent container between the opened date picker and the "scroll-to-bottom"-button. This PR removes the relative positioning from the scrollable area that was introduced to position the scroll-button.

see here for how it should look (and looks with this fix):

Screenshot from 2025-03-04 13-54-02
Screenshot from 2025-03-04 13-53-45

This "fix" now leads to another issue: If the input area grows (due to long text in it) AND the scroll-button is visible, it will be displayed on top of the input area. see screenshot below.

Screenshot from 2025-03-04 13-53-54

Success criteria

  • date picker is positioned correctly when open
  • scrollable chat area working as expected (no double scroll bars, overflowing elements etc.)

How to test

Please describe the individual steps on how a peer can test your change.

  1. deploy webchat with date picker
  2. make sure there are enough message that chat area is scrolling
  3. test for breaking display

Security

  • Possible injection vector
  • Authentication/Access controls touched
  • Sensitive Data could be exposed
  • XSS
  • Logging/Monitoring touched
  • Exchanges data with external systems
  • No security implications

Additional considerations

  • This PR might have performance implications

Documentation Considerations

These are hints for the documentation team to help write the docs.

@sushmi21
Copy link
Contributor

sushmi21 commented Mar 4, 2025

The scroll button is also visible inside the persistent menu. Can we hide the scroll button when the persistent menu is open?

@dshire
Copy link
Member Author

dshire commented Mar 4, 2025

The scroll button is also visible inside the persistent menu. Can we hide the scroll button when the persistent menu is open?

how do I open the persistent menu?

@vj-venkatesan
Copy link
Contributor

vj-venkatesan commented Mar 4, 2025

The scroll button is also visible inside the persistent menu. Can we hide the scroll button when the persistent menu is open?

how do I open the persistent menu?

you need to set it up in the endpoint editor .

It might be tricky to hide it I think , The logic to open the menu is in WebchatUI

@dshire
Copy link
Member Author

dshire commented Mar 4, 2025

Okay I see it. hiding the button is not the solution here, we need to position it relatively to the scrollable chat area again. Either by changing the date picker to position itself differently, e.g. using portal, or by constantly measuring the input area and positioning the scroll button with a calculation of this measurement. But we can't do either in a quick fix here

@sushmi21
Copy link
Contributor

sushmi21 commented Mar 4, 2025

Okay, then we can merge this and see if we can find a better solution in a follow-up.

@sushmi21
Copy link
Contributor

sushmi21 commented Mar 4, 2025

Rest looks fine

@dshire
Copy link
Member Author

dshire commented Mar 4, 2025

Okay, then we can merge this and see if we can find a better solution in a follow-up.

how about I quickly add a setting to disable this button? then it can be at least disabled from the endpoint in case there is issues

@dshire
Copy link
Member Author

dshire commented Mar 4, 2025

or even better, we hide it by default for now

@vj-venkatesan
Copy link
Contributor

or even better, we hide it by default for now

You mean the scroll button ?
I think we can agree that this button overlapping is not as bad as the original issue. So internally in the team we agreed that is good , anything on top of this shall be done in a follow up in my opinion .

@dshire
Copy link
Member Author

dshire commented Mar 4, 2025

or even better, we hide it by default for now

You mean the scroll button ? I think we can agree that this button overlapping is not as bad as the original issue. So internally in the team we agreed that is good , anything on top of this shall be done in a follow up in my opinion .

ok then feel free to merge and proceed. otherwise please let me know

@sushmi21 sushmi21 merged commit e1228b2 into main Mar 4, 2025
5 checks passed
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