Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

fix(ToggleChannelNotifications): improve toggle notification icon consistency #5378

Closed

Conversation

jzabala
Copy link
Contributor

@jzabala jzabala commented Jul 22, 2020

Status

  • WIP
  • Ready for review
  • Needs testing

Deploy after merge (delete what needn't be deployed)

  • hyperion (frontend)

Problem description
The problem is that a disabled button doesn't fire the onMouseLeave event (more here), preventing isHoveringNotifications being set to false.

Related issues (delete if you don't know of any)
Closes #5369

@jzabala
Copy link
Contributor Author

jzabala commented Jul 22, 2020

Not sure why ci/circleci: test_static_js check is failing. It has nothing to do with what is done in this PR.

@@ -151,10 +151,9 @@ const Channel = (props: Props) => {
<Tooltip content={tipText}>
<span style={{ marginLeft: '8px', display: 'flex' }}>
<OutlineButton
disabled={isLoading}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we remove this, the user could double click and we might end up with some race conditions on network requests, right? Is there any way to preserve this?

Copy link
Contributor Author

@jzabala jzabala Jul 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to remove the disabled prop because in reality it is not preventing the double click right now. The component with the onClick functionality is ToggleChannelNotifications that is the parent of the button. The disabled at the moment is only giving the opacity effect.

Current app functionality

Jul-22-2020 13-43-54

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could also prevent that in this PR if you want.

@brianlovin brianlovin closed this Aug 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants