aurelia-ui-toolkits / aurelia-syncfusion-bridge

27 stars 21 forks source link

Update to Aurelia 1.0 RTM #40

Closed AlainBaslter closed 7 years ago

AlainBaslter commented 7 years ago

This is good work and I want to use it.

However it was built from Aurelia 1.0.0.beta.1.xxx days.

Could you please provide guidance as to how to update this to work with Aurelia 1.0.0 RTM i.e. latest?

What changes in packages.config and how does that relate to config.js

Thanks

adriatic commented 7 years ago

Hi @AlainBaslter

A comment on the relationship between package.json and config.js first:

config.js is jspm created "intermediary" file with the instructions for the SystemJS loader. These instructions are derived from the content of the package json, so one can say that the application configuration is completely defined by the packages.config - if it was not for a few lines of data that the app building process needs to properly use babel and a few lines that the application needs to access the syncfusion libraries.

I am copying aurelia-syncfusion-bridge project lead( @Karthick-NR) to upgrade the Aurelia framework - however if you cannot wait for that or are interested in performing such experiments - you could use the information about latest aurelia release and change the version numbers in your application's equivalent of this section of package.json

Note that this is not a completely safe - as you do not necessarily know whether third party modules used in the bridge work with the newest aurelia framework modules. This specific issue is one of the primary reason for our latest development effort - Monterey. See more about it here*. We are working on fully supporting all the issues we are discussing above, with a click of a button :-)

AlainBaslter commented 7 years ago

Note that this is not a completely safe - as you do not necessarily know whether third party modules used in the bridge work with the newest aurelia framework modules.

Indeed I realized that before I ventured into jspm update etc. I thought ahh well there are tests. I'll give it a shot and run the tests, It either works as is or not.

Well I did not get that far. Whereas I can see what the gulp tasks are doing I evidently don't know enough and ran into trouble. Having given it a go, I'd rather let those who know what they are doing handle it.

Monterey is promising. Just as well, confronted with that lot i.e. the build system I wished there was a better way to approach this.

Anyhow, two days ago two of us started looking into using this project being an existing Syncfusion customer. Our goal was to evaluate it as is with the understanding that is is not to date. So we focused on aspect only: How well do these components work combined with each other. The syncfusion samples are control by control oriented with all the things you can do with each and this catalog mirrors that. The missing piece was combination and aggregation. The experiment worked out well and in no time we were able to put tabs inside a dialog with grids within and a toolbar on top. So far no snags.

I am definitely going to b using this.

I'll give it another shot using the pointers you provided if that does not work out I'll wait for a tested update.

adriatic commented 7 years ago

Thanks for your feedback. If I may ask, please explain to me what you meant by:

Monterey is promising. Just as well, confronted with that lot i.e. the build system I wished there was a better way to approach this

In particular, I do not understand the part "I wished there was a better way to approach this":

AlainBaslter commented 7 years ago

@adriatic

Now that I have tried it, let me rephrase that: Monterey is spot on and way to go. I come from another development world where you click a button and a wizard generates you an app to get started with and you don't care about what pile of dependencies come along with it until you get to the point where you need to weed them out to make things leaner. I find all this tooling seemingly common in the front end world intimidating at first then a black hole that sucks all your time in having to learn what those things do. For me that meant countless hours on Pluralsight learning: Grunt then gulp then this and that. Meanwhile the app itself does not get built. What I was wishing for is precisely that Monterey is, buttons to get things done. Gee it is almost as it you read my mind and I am sure that of many others.

I installed Monterey and after playing with a simple TypeScript app I moved on to downloading: aurelia-syncfusion-bridge Using the NPM and JSPM "manager" features I updated the aurelia pieces without having to muck with package.config. That was most convenient.

I ran into two issues:

package gulp-util was missing in package.json causing the gulp tasks to not get recognized. I used the Command feature to configure VS Code to edit package.json. Again convenient.

Then I npm install gulp-util --save-dev That got the gulp tasks to be seen gulp build worked however at runtime I see two issues

  1. font awesome was missing in package.config. I added it manually getting the config from https://github.com/aurelia-ui-toolkits/syncfusion-template-repository/blob/master/package.json "font-awesome": "npm:font-awesome@^4.5.0", Then ran the JSPM install feature.

With those seemingly resolved I still encounter two issues at runtime...

font-awesome and system.js are missing or pointed to the wrong place.

missing

AlainBaslter commented 7 years ago

Here is an attempt to run gulp test on aurelia-syncfusion-bridge with aurelia latest and it appears that something related to system.js configuration is wrong...

[22:36:57] -----STARTED----- [22:37:14] Using gulpfile C:\aurelia\aurelia-syncfusion-bridge\gulpfile.js [22:37:14] Starting 'test'... [22:37:20] 06 09 2016 22:37:20.119:WARN [watcher]: Pattern "C:\aurelia\aurelia-syncfusion-bridge\jspm_packages\system.src.js" does not match any file. [22:37:20] 06 09 2016 22:37:20.122:WARN [watcher]: Pattern "C:\aurelia\aurelia-syncfusion-bridge\jspm_packages\system-polyfills.src.js" does not match any file. [22:37:28] 06 09 2016 22:37:28.373:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/ [22:37:28] 06 09 2016 22:37:28.388:INFO [launcher]: Starting browser Chrome [22:37:31] 06 09 2016 22:37:31.701:INFO [Chrome 52.0.2743 (Windows 7 0.0.0)]: Connected on socket /#Iyxzh9p6-peuzyofAAAA with id 36807182 [22:37:31] Chrome 52.0.2743 (Windows 7 0.0.0) ERROR [22:37:31] Uncaught Error: SystemJS was not found. Please make sure you have initialized jspm via installing a dependency with jspm, or by running 'jspm dl-loader'. [22:37:31] at C:/aurelia/aurelia-syncfusion-bridge/node_modules/karma-jspm/src/adapter.js:22 [22:37:32] 'test' errored after 17 s [22:37:32] Error: karma exited with status 1 [22:37:32] at formatError (C:\Users\adespaignet\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:169:10) [22:37:32] at Gulp. (C:\Users\adespaignet\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:195:15) [22:37:32] at emitOne (events.js:96:13) [22:37:32] at Gulp.emit (events.js:188:7) [22:37:32] at Gulp.Orchestrator._emitTaskDone (C:\aurelia\aurelia-syncfusion-bridge\node_modules\orchestrator\index.js:264:8) [22:37:32] at C:\aurelia\aurelia-syncfusion-bridge\node_modules\orchestrator\index.js:275:23 [22:37:32] at finish (C:\aurelia\aurelia-syncfusion-bridge\node_modules\orchestrator\lib\runTask.js:21:8) [22:37:32] at cb (C:\aurelia\aurelia-syncfusion-bridge\node_modules\orchestrator\lib\runTask.js:29:3) [22:37:32] at C:\aurelia\aurelia-syncfusion-bridge\build\tasks\test.js:13:9 [22:37:32] at removeAllListeners (C:\aurelia\aurelia-syncfusion-bridge\node_modules\karma\lib\server.js:336:7) [22:37:32] at Server. (C:\aurelia\aurelia-syncfusion-bridge\node_modules\karma\lib\server.js:347:9) [22:37:32] at Server.g (events.js:286:16) [22:37:32] at emitNone (events.js:91:20) [22:37:32] at Server.emit (events.js:185:7) [22:37:32] at emitCloseNT (net.js:1548:8) [22:37:32] at _combinedTickCallback (internal/process/next_tick.js:71:11) [22:37:32] -----FINISHED-----

JeroenVinke commented 7 years ago

@AlainBaslter Thanks for your feedback :+1: It's much appreciated.

Regarding the error you are receiving:

All bridges have two applications: image

This means that the NPM modules and JSPM packages for the sample application have to be installed as well. So you would have to add the sample directory to monterey after which you need to npm install and jspm install. After that the project aurelia-syncfusion-bridge project should run OK.

For newly created projects Monterey is able to figure out what steps are necessary for getting the project up and running image

So one thing we'd like to do is to let you use this wizard to install existing projects (and not just to install newly created projects)

AlainBaslter commented 7 years ago

@adriatic @JeroenVinke

Thanks for the tip off about the two separate projects, separate jspm/npm dependencies.

I confirm that it seems everything is working with the latest Aurelia as of today...

http://blog.aurelia.io/2016/09/07/patch-releases-9-7-2016-2/

The cherry pick update feature is most useful.

Now, what tests should I run in order to make sure all is good?

image

JeroenVinke commented 7 years ago

Great! As long as the sample application runs (gulp watch) then you should be good. Can you open a PR?

@karthickthangasamy are you OK with increasing the version range to require versio s above 1.0.0?

karthickthangasamy commented 7 years ago

sure @JeroenVinke :+1:

AlainBaslter commented 7 years ago

Once I got it working after adopting Aurelia latest I did a cursory test of the controls I am interested in.

I am now going through each control rigorously feature by feature and filling a spreadsheet as to what works and what does not as I go along. I need to have that level of confidence in these controls for my own use. There is no e2e and that may be a significant effort so I am doing it manually. I'll be uploading that spreadsheet when I am done. I looked at what gulp test does and it appears it only covers the WidgetBase foundation and incidentally it fails to run from what looks like a configuration issue. I'll put that detail up too.

Once I am done with some more testing I'll open a PR.

AlainBaslter commented 7 years ago

Created Pull request with my changes to Aurelia latest

41

JeroenVinke commented 7 years ago

Merged and released as 0.2.2