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

Media Queries Plugin Event Name #4

Closed
jantimon opened this issue Jun 6, 2018 · 0 comments
Closed

Media Queries Plugin Event Name #4

jantimon opened this issue Jun 6, 2018 · 0 comments
Assignees

Comments

@jantimon
Copy link
Contributor

jantimon commented Jun 6, 2018

To allow us more flexibility and be a little bit more correct we should rename the event of the media queries plugin event name from viewportChanged to viewportEntered.

Also we should export the event name as variable so that we get type safety and a future dev will understand the source of the event:

 import {VIEWPORT_ENTERED} from '@gondel/plugin-media-queries';

@EventListener(VIEWPORT_ENTERED)

We could also provide a viewportEvents enum instead:

 import {viewportEvents} from '@gondel/plugin-media-queries';

@EventListener(viewportEvents.viewportChanged)
// or
@EventListener(viewportEvents.VIEWPORT_CHANGED)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants