estuary / marketing-site

0 stars 5 forks source link

Brenosalv/bug/help-chat-not-showing-up-sometimes #307

Closed Brenosalv closed 1 month ago

Brenosalv commented 1 month ago

308

Changes

Tests / Screenshots

github-actions[bot] commented 1 month ago

Visit the preview URL for this PR (updated for commit 8bd7011):

https://estuary-marketing--pr307-brenosalv-bug-help-c-1jwe055u.web.app

(expires Sun, 23 Jun 2024 18:32:39 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 76f6b095a0752e5d9c6c890267f9fdc3e392161e

Brenosalv commented 1 month ago

Lighthouse reports in incognito mode for homepage:

Desktop: image

Mobile: image

Brenosalv commented 1 month ago

Desktop report with the help chat placeholder: image

travjenkins commented 1 month ago

So comparing the live analysis from Google and dynamic loading did not make an impact. Let's go ahead and put it back to how it was loading and just go with the new React component approach you made to solve the state issues.

Brenosalv commented 1 month ago

@travjenkins I think we don't need the component because we don't need the state. We just need to check if the screen width or height is less than 768px on load/first render and we can do it without states. Please let me know if you aggree.

travjenkins commented 1 month ago

@Brenosalv - We need the state as this will cause issues with SSR as window will not exist. So once the static site is provided there will be a change and a render will need to be done again.

Brenosalv commented 1 month ago

The problem that was causing the help chat to not show up sometimes was the initial state. I fixed this replacing the intial state with the current screen size.