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

[Odie] Wapuu scroll rework #93145

Merged
merged 5 commits into from
Aug 2, 2024
Merged

Conversation

AllTerrainDeveloper
Copy link
Contributor

@AllTerrainDeveloper AllTerrainDeveloper commented Jul 31, 2024

This is a rework on how the scrolling is working in Wapuu client, as well as a better handling for extra contact flows.

#93109
#93108

Proposed Changes

The changes are still using React References, but this time only for the parent element. This way we can safely and easily iterate on children looking for tags (is last element, is last user message, is error message, is feedback message, etc). That way we improve greatly the control over the scrolling.

Main changes

  1. Styling changes, added min heights to extra contact flows, that were adding UI shifts
  2. Added a loader while the UI is not stable
  3. Removed the feeling stuck link when we are already presenting a different contact flow
  4. Added corrections and debounces in order to keep scroll working while changing UI elements
  5. Removed extra contact options for messages where user was requesting to contact user support, and clicked on thumbs down (that was adding an extra element to contact in addition with the regular one)

Why are these changes being made?

We needed urgently to update the user experience with the scrolling

Testing Instructions

Check scroll behavior

  1. Start a new conversation and send several messages. When available space and Wapuu's long response, your last message (as user) will stay at the top
  2. Adding new message will show the loader in the bottom
  3. Disliking a message will keep the new message in the bottom without flickering
  4. If you click on "Jump to recent" the beginning of the last message will remain at the top of the container, allowing you to scroll a bit more to keep reading

Check contact flows

  1. Check double contact flow options
  2. Start a new conversation
  3. Ask for human support in your first message
  4. Click on Thumbs down icon
  5. Assert that only one button to contact WordPress is presented even after closing and reopening the chat.

@AllTerrainDeveloper AllTerrainDeveloper force-pushed the wapuu/improve-code-and-refactor branch from b23c806 to 76da52d Compare July 31, 2024 14:43
@matticbot
Copy link
Contributor

matticbot commented Jul 31, 2024

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Async-loaded Components (~707 bytes removed 📉 [gzipped])

name                               parsed_size           gzip_size
async-load-automattic-help-center      -1999 B  (-0.4%)     -707 B  (-0.4%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug wapuu/improve-code-and-refactor on your sandbox.

@AllTerrainDeveloper AllTerrainDeveloper self-assigned this Aug 1, 2024
@AllTerrainDeveloper AllTerrainDeveloper marked this pull request as ready for review August 1, 2024 12:09
@AllTerrainDeveloper AllTerrainDeveloper requested a review from a team as a code owner August 1, 2024 12:09
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 1, 2024
@AllTerrainDeveloper AllTerrainDeveloper force-pushed the wapuu/improve-code-and-refactor branch from bfef3a6 to 81ffaac Compare August 2, 2024 09:26
@AllTerrainDeveloper AllTerrainDeveloper merged commit eb6bd5b into trunk Aug 2, 2024
12 checks passed
@AllTerrainDeveloper AllTerrainDeveloper deleted the wapuu/improve-code-and-refactor branch August 2, 2024 09:42
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 2, 2024
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.

2 participants