Giter Site home page Giter Site logo

lolmaus / ember-element-query Goto Github PK

View Code? Open in Web Editor NEW
39.0 3.0 6.0 8.86 MB

Element queries for Ember

Home Page: https://lolmaus.github.io/ember-element-query/

License: MIT License

JavaScript 29.44% CSS 3.16% HTML 0.40% TypeScript 50.68% Handlebars 9.99% Sass 5.40% SCSS 0.94%
ember-addon element-queries element-query

ember-element-query's People

Contributors

betocantu93 avatar ember-tomster avatar lolmaus avatar simonihmig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ember-element-query's Issues

Jumps of unstyled content and test freezes from display none

  1. When an element query element initially renders, it appears unstyled.
  2. When display: none is applied to an element query element or any of its parents, Ember tests would pause forever because of ember-element-query test waiter.

Both issues are caused by the fact that the initial applying of element queries is asynchronous and channeled through ResizeObserver. Running the initial applying synchronously should fix them.

Details discovered by @simonihmig.

Support Embroider

Idk if it works currently or not, but ember-try scenarios should be added to test w/ Embroider. Running ember-cli-update should add those, as they are not part of the official addon boilerplate.

window and Event are undefined in Ember Fastboot

Hi!

I find this library to be super helpful. Thanks for sharing it with the world!

I was experimenting with Ember Fastboot. Since Fastboot renders on the server, some browser functionality is missing. For example, window, document, and Event are not defined.

This leads to trouble when trying to setup the custom eq-update event in addon/trigger.js. Fastboot tries to define the new event and throws an error that prevents successful rendering.

To address this, I added some quick checks to make sure Event and window are defined.

export const event = (typeof Event !== 'undefined') ? new Event('eq-update') : null;

export default function trigger() {
  if (window && event) {
    return window.dispatchEvent(event);
  }
}

I'll open a PR in a moment. I hope that helps.

Thanks again.

Support IE11

IE11 crashes on new Event().

Must use a polyfill or a custom event dispatcher.

new npm release?

Currently I have github:lolmaus/ember-element-query in my package.json
Is there a reason the latest version hasn't been published to npm?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.