hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
67 stars 42 forks source link

[Bug]: exiting out of the community stake growl did not work #7165

Closed commonwealth-issue-bot[bot] closed 5 months ago

commonwealth-issue-bot[bot] commented 5 months ago

Description

When trying to close the growl for community stake. The growl on the first couple of x clicks did not close and instead was highlighted on the screen.

Internal Reporter (Growth Team)

Mitchy (@cowballzach)

External Reporter

Mark

Initial Conditions

Environment: prod Encounter Date/Time: morning of 3/18 Additional Context: chrome, macbook

Reproduction Steps

try to exit out of the growl not being signed in. (I tried to reproduce and couldn't)

Expected Behavior

the growl should close

Videos / Screenshots

https://www.loom.com/share/d093c30123ff488899b37e429227f6a0?sid=654559f1-ede2-4689-9800-cd373e9f4efc

Additional Information

CowMuon commented 5 months ago

In the wake of #7096 (closed as can't reproduce) we have another report of Growl not closing, which looks like it was also not reproduced based on @cowballzach's comment above.)

@markiscommon Who is affected community here? It seems like we are not able to reproduce, but obviously the affected user is running into something

Chrome on Macbook makes me slightly sus here, as my understanding is that the growl has dismiss issues on some mobile devices, but not on Macbook/Chrome. But having said that, there is a bug in Chrome for Macbook's full screen mode where you can't close tabs. That shouldn't necessarily affect the modal, but worth noting here.

TLDR; we need to work directly with affected user. What community is this btw? @markiscommon

jnaviask commented 5 months ago

I was able to reproduce, seems like it only occurs when NAVIGATING DIRECTLY to https://commonwealth.im/stargatetoken/discussion/16578-can-we-pls-add-solana-support-worst-case-scenario-it-would-add-value-3 -- unable to X out on mobile (Pixel 7 Pro; Android 14; Brave 1.63.174, Chromium 122.0.6261.128).

Reproduced on desktop Brave too (Manjaro Linux), same page as above. Entire page cannot be interacted with / navigation does not work. OTHER PAGES WORK FINE

Israellund commented 5 months ago

I was unable to reproduce this bug outside of the above link from Jake. I eventually did an Empty Cache and Hard Reload which made it possible to close the growl, but not helpful in tracking down why this happens in the first place. Below are some notes of behaviors that I found:

Clearing the cache works but I don’t understand why it would be happing on the same url in both Chrome and Brave. Maybe because they’re both Chromium based? Maybe there is something about shared browser extensions that are effecting the same aspect of local storage?

This is the code in StakeGrowl.tsx that could possibly be refactored to help rectify this bug, since it seems to me to be something funky with localstorage. I didn't want to touch the code because I couldn't reproduce the bug to test.



  const [shouldHideGrowlPermanently, setShouldHideGrowlPermanently] =
    useState(false);

  const [isDisabled, setIsDisabled] = useState(
    localStorage.getItem(LOCALSTORAGE_STAKE_GROWL_KEY) === 'true' ||
      isGrowlHidden,
  );

  const handleExit = () => {
    setIsDisabled(true);
    setIsGrowlHidden(true);

    if (shouldHideGrowlPermanently) {
      localStorage.setItem(LOCALSTORAGE_STAKE_GROWL_KEY, 'true');
    }
  };```
Israellund commented 5 months ago

Zach Lee also found some interesting behavior with the growl. He went to commonwealth.im and the growl would not close for him. He then went to the marketing site, common.xyz, and accessed commonwealth.im through there, and the growl was then able to be closed.

jnaviask commented 5 months ago

Superseded by https://github.com/hicommonwealth/commonwealth/issues/7210