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

alija/feature/webpack #37

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

alija/feature/webpack #37

wants to merge 38 commits into from

Conversation

sabicalija
Copy link
Contributor

@sabicalija sabicalija commented Mar 17, 2019

WebACS and most of the resources (css, images) are bundled now with webpack. Previous test were migrated from QUnit to jest. (Almost) all functions of the WebACS were successfully tested manually. Working with it, creating models and deploying to/from ARE, starting/stopping models is working fine.

Tests with jest were mocked were necessary (e.g. FileReader). Tests with jquery-ui are failing currently and were excluded and annotated. jquery-ui cannot be ingrated in current build setup. Until workaround (or solution) is found, test are to be excluded, and possibly replaced in future anyway.

A multibranch-pipeline was setup at the Jenkins server, Jenkinsfile provides following steps: Cleanup, Build, Test, Deploy and results can now be downloaded from the server after a build (cf. here).


Jenkinsfile currently uses different agents, because zip utilities are not supported within node container. Following workarounds/solution were tested so far:

  • Pipeline Utility Steps: Jenkins parameter error when using zip command (cf. here)
  • File Operations Plugin: worked, but zipped folder is placed inside another folder (cf. here)
  • Linux zip command: current setup. this step should be changed eventually to support different environments (linux, mac, win)
  • Custom Dockerfile: proposed. using a custom docker container (or Dockerfile), the zip package could be installed in the container

Notes:

  • it is not clear, where archives are stored (server, agent)
  • post action to cleanup workspace failed (for no reason), no explanation is shown (cf. here)

Suggested next steps:

  • setup babel for broader browser support
  • deploy to asterics-web.studyathome.technikum-wien.at
  • refactor problematic code parts
  • review code and tests
  • workaround or change tests depending on jquery-ui
  • remove sinon dependency of current test and use native jest when possible
  • refine xml handling (parsing, loading, minify/beautify (pretty-data)
  • plan next features
  • plan deployment, usage and docs, update README within AsTeRICS framework
  • add service-worker and app install capability

Additional notes:

  • favicons is created and bundled with webpack. Only one file (logo) is necessary (TODO: change to svg).
  • images are loaded with copy-webpack-plugin (conversion and injection of base64). Currently set up to not convert, but copy images instead. Check pros and cons and adapt if necessary to reduce files needed for deployment.

@sabicalija sabicalija self-assigned this Mar 17, 2019
@sabicalija
Copy link
Contributor Author

We should probably configure webpack to lazy-load some of the code, so that main bundle gets smaller and the webpage is built up and loaded faster.

@deinhofer
Copy link
Contributor

The components tab is rendered smaller and the > sign is missing. Also the menu entries are rendered smaller.
image

The original WebACS was like this:
image


Also, please check with browser compatibility and if necessary tweak babel settings.

@deinhofer
Copy link
Contributor

When downloading a model and then trying to upload model again, there is an error message:
image

The current release of http://asterics.github.io/AsTeRICS/webapps/WebACS/ does not throw that error.

@deinhofer
Copy link
Contributor

Please update README.md with build and run instructions

@sabicalija
Copy link
Contributor Author

When downloading a model and then trying to upload model again, there is an error message:
image

The current release of http://asterics.github.io/AsTeRICS/webapps/WebACS/ does not throw that error.

I've encountered this problem too. But I don't believe it is caused by this PR. But I may be wrong.

You need to connect all ports to be able to upload any model - apparently. I had this error too when working on dynamic properties. But this was before this PR. I'll test with pull/36 just to be sure.

@sabicalija sabicalija force-pushed the alija/feature/webpack branch from d666af7 to 72ef080 Compare April 1, 2019 13:27
@deinhofer deinhofer mentioned this pull request Apr 10, 2019
@sabicalija sabicalija changed the title Alija/feature/webpack alija/feature/webpack Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants