-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
0.3.0 Loading problem with Aurelia.io #613
Comments
@arnonuem Prepare for us a jsfiddle with Aurelia and gridstack and I'll see if I can figure out a fix. |
As someone having 0.2.6 running with Aurelia for quite some time I can say this looks like a module loading issue. Question is, which loader is used inside Aurelia (JSPM/SystemJS, Webpack, Aurelia CLI) and how is jQuery and Gridstack.js loaded. I am using JSPM and have installed Gridstack through NPM registry. |
Also having problems to import 0.3.0. Using Aurelia + JSPM/SystemJS. This is what I get: When I put this in my config.js: ...I get this: |
I'm using Aurelia with Aurelia CLI and I had the same problem. So I created a repository to exemplify this. Follow the "Problem" section on my README:There is a problem with the drag and drop and the resize features. Currently this project just uses the
To see this error, change |
Thanks, @diegotroitino ! That'll be helpful for me to throw together and make sure I'm actually fixing it. I'm working on a few bugs/features simultaneously, but I will make sure that your example is working for version 1.0.0. |
@diegotroitino Can you get your example working, under any circumstance, with resize/drag? I'm trying to verify that a change I've made works, but I can't, because I can't actually get dragging to work. I'm unsure if this is because of code on my side or code in the aurelia project. |
To resize/drag work we need the I created this fiddle https://jsfiddle.net/troits/624t9shu/ with the same code, without Aurelia, and it works fine. Right, my example don't throw errors because it only refers the If you prefer, I can test it for you. |
@radiolips I changed the way to refer the gridstack. I put the I found the solution for this, that is to map the components to jquery-ui like this answer in stackoverflow. But I don't know how to do that before Aurelia bundle the files. To solve this, I modified the Already updated my repository |
Awesome |
Hi, sorry if I am late to the party, and this is a silly question. I would like to make use of gridsatck in my solution, however, I make use of a build machine that performs an I don't currently need drag/drop or resize. I am implementing this as a Aurelia application. Is there anything else I can try? Thanks in advance |
Hey, @stuartbloom ! If you don't need drag/drop/resize, you are fine if you simply don't use the gridstack.jqueryui file! |
@radiolips Thanks Dylan That's great to know. I will hopefully spend some time over the next day or so implementing my new dashboard. Do you have any simple Aurelia examples? Thanks again |
I don't, but maybe one of the people on this thread could offer some help? @diegotroitino @arnonuem @tipa @ZoolWay |
folks, dont go spending any time on this, i have it figured out by using the repo @diegotroitino has the fix in :) was simpler than I thought. Thanks |
I'm happy to tell you that I have fixed this issue in my project "without any hack"!! I changed the package I just updated my repository Even so, i'm still hungry by the next version without jquery-ui dependency. |
@diegotroitino Hey Diego I am now trying to implement Gridstack in my solution, however, the line I have gidstack included in my packages and aurelia json files and have Thanks in advance |
@stuartbloom, did you add the import of gridstack like this in your dashboard class? |
@diegotroitino of course, thank you so very much :) |
@tipa You seem to be the only other one here using Aurelia with JSPM like me :) Actually, SystemJS has by default a problem to fill in the This is a current workaround which makes it work: In SystemJS configuration, add a meta entry to create a global for GridStackUI:
In
to this:
As you can see, I check if I get an empty There must be a better way to tell SystemJS, still figuring it out. |
Okay, looks like I can provide a solution to use 0.3.0 with SystemJS 0.20 without hacking any code. In my SystemJS configuration (e.g.
Within my aurelia component, I just import all things like this:
Key seemed to be that both modules had to be set to format |
@ZoolWay You are amazing. Great job figuring that out! So, um, I don't know. Is it a bug? Is it not a bug? |
@radiolips That's what I am asking myself, too 🍶 Should the modules be autodectected to be AMD? Maybe, maybe not because GridStack wants to provide multiple module formats? I am not sure as understanding JavaScript module formats and loading still gets me headaches. I tried to get to know more on how SystemJS loads on Gitter but @guybedford was not around while I solved the problem. Maybe he can give a small hint and the GridStack team can do a better job? Also I could not get using |
The configurations added in #613 (comment) could be included in the package.json of this project on the next publish (optionally under a "jspm" prefix) or put directly in the jspm registry to make it work today. Happy to take a registry PR on that @ZoolWay if you're interested. |
@guybedford This is obviously very late, but could you put in a PR? I don't fully understand the request, but if I have a PR to look at, I'm sure I'll be able to better recognize what's going on. |
When using Gridstack 0.3.0 (gridstack.all.js) with Aurelia the following error message occurs:
Example HTML code:
Example JS code:
and
I have no idea what is going on. But since aurelia is a framework this might be an issue in those two parties playing together.
The text was updated successfully, but these errors were encountered: