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

Upgrade waves #11

Merged
merged 5 commits into from
Aug 15, 2020
Merged

Upgrade waves #11

merged 5 commits into from
Aug 15, 2020

Conversation

Niels-Be
Copy link

@Niels-Be Niels-Be commented Aug 10, 2020

Waves.js library was outdated.
See Dogfalo#5779, Dogfalo#5472 and Dogfalo#3153

This is 99% original Waves.js code. (See: v0.7.6)
Changes:

  • Initialization on Dom Load
  • Passiv Event Listeners
  • Custom Colors

I am using this in my application for quite some time, seams to work fine.

Moved from Dogfalo#6060

This is 99% original Waves.js code.
The only thing added was the initialization on DomLoad in line 31.
js/waves.js Outdated
Comment on lines 449 to 451
element.addEventListener('touchmove', touchMove, { capture:false, passive: true });
element.addEventListener('touchend', hideEffect, { capture:false, passive: true });
element.addEventListener('touchcancel', hideEffect, { capture:false, passive: true });
Copy link
Member

Choose a reason for hiding this comment

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

eh I'm not sure about this. Have a look at Dogfalo#4720

Copy link
Member

Choose a reason for hiding this comment

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

Looks like you're planning on merging passive event receivers already, no? #7

Choose a reason for hiding this comment

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

Isn't this part of waves.js? I guess this is fine because I think the files are completely replaced with the new ones. Correct?

Copy link
Member

Choose a reason for hiding this comment

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

Isn't this part of waves.js? I guess this is fine because I think the files are completely replaced with the new ones. Correct?

hmm the passive event, no it's not https://github.com/fians/Waves/blob/83fc07e2c0a31a10aa5dc2cf97b965113ddd882c/dist/waves.js#L443-L445

Choose a reason for hiding this comment

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

Ah ok, but I think the 0.8 dev branch is the correct one, the master branch is an old version.

@Waeco please describe from where you got this file / version so we can check this and please split this into two commits. The first one with the new original files and a reference to where it is from and a second commit with your changes.

Choose a reason for hiding this comment

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

I guess it's regarding this:

Screenshot_20200814-151147.jpg

Screenshot_20200814-151155.jpg

Choose a reason for hiding this comment

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

@Waeco can you change the commit for the passive listeners according to the proposed solution at MDN?

https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Browser_compatibility

Choose a reason for hiding this comment

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

Alternatively we can drop the commit for passive event listeners and do it separately and with a global constant for all parts.

Choose a reason for hiding this comment

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

grafik

Copy link
Author

Choose a reason for hiding this comment

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

I added it

background: rgba(255,255,255,0.4);
}

// Waves Colors
Copy link
Member

Choose a reason for hiding this comment

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

add some colors? hmm we might need to add this to the documentation though 😅

Copy link
Member

@Smankusors Smankusors left a comment

Choose a reason for hiding this comment

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

nice 👍

hmm I think the passive warning is also happens on sidenav... but that's would be a different PR I guess...

Copy link

@DanielRuf DanielRuf left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution.

@DanielRuf DanielRuf merged commit 89aa0c8 into materializecss:v1-dev Aug 15, 2020
@DanielRuf
Copy link

Thanks for your contribution to materializecss.

I've invited you to the materializecss org as member and collaborator. You can view and accept the invitation at https://github.com/materializecss.

@Smankusors Smankusors added the enhancement New feature or request label Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: waves enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants