Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
84e48ca
Add files via upload
invincibleyolk Aug 19, 2021
6e095a3
Update readme.md
invincibleyolk Aug 19, 2021
de72f0f
Update readme.md
invincibleyolk Aug 19, 2021
de04704
Update readme.md
invincibleyolk Aug 19, 2021
6cac609
Update readme.md
invincibleyolk Aug 19, 2021
6786c59
Update readme.md
invincibleyolk Aug 19, 2021
85bde8b
init react
invincibleyolk Aug 22, 2021
fa9431d
add packages
Aug 22, 2021
4bf6e43
add packages
Aug 22, 2021
31d77a8
fix bug
Aug 22, 2021
8226941
Add files via upload
Aug 22, 2021
655e7f0
enable less; jest tested;
Aug 22, 2021
4456e32
Merge branch 'main' of https://github.com/visual-heuristics/frontend-…
Aug 22, 2021
cc5b174
test ci
Aug 22, 2021
b142241
test
Aug 22, 2021
ebebe6d
Merge pull request #1 from visual-heuristics/feature/ci-test
invincibleyolk Aug 22, 2021
a86325a
Merge pull request #2 from visual-heuristics/release
invincibleyolk Aug 25, 2021
8bbd77b
add router; add a template;
invincibleyolk Aug 25, 2021
c7c9102
fix: test bugs
invincibleyolk Aug 25, 2021
0fe16ec
test travis
invincibleyolk Aug 25, 2021
44c9a55
Update .travis.yml
invincibleyolk Aug 25, 2021
fe43b37
UI develop
Sep 4, 2021
fb4cd8c
styles
Sep 4, 2021
e586650
app file styles changed
Sep 4, 2021
e20e256
global styles
Sep 4, 2021
6fcf9a0
Merge pull request #4 from visual-heuristics/feat_globalStyles
invincibleyolk Sep 4, 2021
3a7b26b
UI-CSS
mezm94 Sep 6, 2021
a01617a
UI-CSS
mezm94 Sep 6, 2021
69942f4
Update index1.js
mezm94 Sep 6, 2021
0cc8d60
add block image
Aug 27, 2021
1066139
add block world visualization
Sep 6, 2021
f01f60d
nav bar and home page
invincibleyolk Sep 7, 2021
70854b0
page 2 upload VFG
Sep 7, 2021
1f63979
add subgoal with interactions
shelley-zsq Sep 8, 2021
73bdc30
Merge pull request #5 from visual-heuristics/feat_visualization
shelley-zsq Sep 10, 2021
b8c54a3
Initial commit, create basic classes dragAndFetch, dragAndDrop classe…
pippo-sci Sep 10, 2021
33a4eba
styles correction
pippo-sci Sep 11, 2021
570d7da
wiring events to uploadPDDL function
pippo-sci Sep 11, 2021
4759c6b
basic unit testing
pippo-sci Sep 11, 2021
13e4d73
minor corrections dragAndDrop to generalise better
pippo-sci Sep 11, 2021
829be2e
testing corrections
pippo-sci Sep 11, 2021
f946313
fix merge conflicts
Sep 11, 2021
e1def37
minor corrections build
pippo-sci Sep 11, 2021
627601a
adjust the display of claw and blocks
mezm94 Sep 12, 2021
ab0a34a
adjust css
mezm94 Sep 12, 2021
9a84aad
add controllers
mezm94 Sep 12, 2021
aae75e1
Add previous/next step & show final goal
mezm94 Sep 12, 2021
af52427
unifying styles
pippo-sci Sep 13, 2021
5c8581c
fix the getSubGoal()
mezm94 Sep 13, 2021
19286f9
Merge branch 'develop' of https://github.com/visual-heuristics/fronte…
pippo-sci Sep 13, 2021
cf286ee
UI applied
pippo-sci Sep 13, 2021
ab426c0
add the interaction between steps and subgoal(changing background col…
shelley-zsq Sep 14, 2021
a3dcdd7
Merge pull request #8 from visual-heuristics/feat_visualization
shelley-zsq Sep 14, 2021
7d5c9e6
New style change
pippo-sci Sep 14, 2021
06d2f07
initial animation
shelley-zsq Sep 15, 2021
0890d78
Merge pull request #9 from visual-heuristics/feat_visualization
shelley-zsq Sep 15, 2021
8d1cb89
alignment style change
pippo-sci Sep 15, 2021
b418b38
Merge pull request #7 from visual-heuristics/feat_fetch_problem_file
Sep 15, 2021
7b6ea59
advanced animation
shelley-zsq Sep 15, 2021
d63b9d3
Merge pull request #10 from visual-heuristics/feat_visualization
shelley-zsq Sep 15, 2021
7142c52
add start/pause/showTheGoal button event
shelley-zsq Sep 15, 2021
7364e08
Merge pull request #11 from visual-heuristics/feat_visualization
shelley-zsq Sep 15, 2021
13b1715
add click effect to play and pause button
mezm94 Sep 15, 2021
554c361
add click effect to play and pause button
mezm94 Sep 15, 2021
93e2dab
fix play/pause effect
mezm94 Sep 15, 2021
2705889
fix play/pause effect
mezm94 Sep 15, 2021
a665cb5
fix next step display
mezm94 Sep 15, 2021
82fe9dc
fix next step display
mezm94 Sep 15, 2021
1fd6096
Update App.test.js
invincibleyolk Sep 19, 2021
d0dc3a7
add speed control to animation and vfg file analytics from page two(d…
shelley-zsq Sep 26, 2021
8923235
Merge branch 'develop' into feat_visualization
shelley-zsq Sep 26, 2021
d2c2938
Merge pull request #13 from visual-heuristics/feat_visualization
shelley-zsq Sep 26, 2021
0628c34
read base64 from vfg file, restore demo page
pippo-sci Sep 27, 2021
5ba71a9
Merge pull request #14 from visual-heuristics/feat_fetch_problem_file
Sep 27, 2021
75fd579
Draw sprites based on image in VFG file
mezm94 Oct 1, 2021
02a6e4b
Draw sprites based on image in VFG file
mezm94 Oct 1, 2021
3435ea9
Draw sprites based on image in VFG file
mezm94 Oct 1, 2021
1386486
Draw sprites based on image in VFG file
mezm94 Oct 1, 2021
69161d7
Send backend response to page4
pippo-sci Oct 3, 2021
c9042e6
page2 style fix
Oct 3, 2021
8d1eeba
page2 style fix with page1
Oct 3, 2021
42ce6e6
fix: testing fix
Oct 4, 2021
3a03d08
Merge pull request #15 from visual-heuristics/feat_fetch_problem_file
invincibleyolk Oct 4, 2021
b04917d
fix merge conflicts
Oct 4, 2021
053b2fa
fix bugs
Oct 4, 2021
a1636f9
fix the crash
mezm94 Oct 6, 2021
b82fe41
change the color for subgoal
mezm94 Oct 6, 2021
f894872
Add export function and add arrows in subgoals
mezm94 Oct 6, 2021
0d73da8
Add export function and add arrows in subgoals
mezm94 Oct 6, 2021
5d0961c
Add export function and add arrows in subgoals
mezm94 Oct 6, 2021
38ddbdd
Merge branch 'develop' into feat_visualization
mezm94 Oct 6, 2021
51c6367
Add export function and add arrows in subgoals
mezm94 Oct 6, 2021
ea077ab
Turn class components to functional components, implement change URL …
pippo-sci Oct 9, 2021
b411cdd
Merge pull request #19 from visual-heuristics/feat_fetch_problem_file
Oct 9, 2021
fc166c4
fix the lack of animation between steps
shelley-zsq Oct 12, 2021
04878a3
Merge pull request #20 from visual-heuristics/feat_visualization
Oct 13, 2021
4804d31
fix the animation of the initial stage
mezm94 Oct 13, 2021
6ea545d
Merge pull request #21 from visual-heuristics/feat_visualization
mezm94 Oct 13, 2021
7cddea0
fix the subgoal items showing issue
mezm94 Oct 13, 2021
a7d3019
fix the subgoal items showing issue
mezm94 Oct 13, 2021
e8a598c
Merge branch 'develop' into feat_visualization
mezm94 Oct 13, 2021
d12f84e
fix the subgoal items showing issue
mezm94 Oct 13, 2021
999e431
Production deployment files
pippo-sci Oct 13, 2021
e19a474
Merge branch 'develop' of https://github.com/visual-heuristics/fronte…
pippo-sci Oct 18, 2021
e4c4bc9
fix crash issue when jumping to other pages
mezm94 Oct 18, 2021
0817ce5
fix crash issue when jumping to other pages
mezm94 Oct 18, 2021
e505212
add loading
Oct 18, 2021
fc267de
Merge pull request #24 from visual-heuristics/feat_addLoading
invincibleyolk Oct 18, 2021
c6abcd4
modify url and links
Oct 19, 2021
6574056
Merge pull request #25 from visual-heuristics/feat_uiImprove
invincibleyolk Oct 19, 2021
b35a01a
Organise styles, create alert MIU style, add E2E testing
pippo-sci Oct 19, 2021
c1d6bf2
Organise styles, create alert MIU style, add E2E testing, fix conflicts
pippo-sci Oct 19, 2021
6f68d94
Improve display
mezm94 Oct 20, 2021
6fff1af
Update index.js
mezm94 Oct 20, 2021
d570df0
Improve display and change variable names
mezm94 Oct 20, 2021
a47d723
fix bugs; fix styles; responsive view
Oct 20, 2021
76f9b09
Merge pull request #26 from visual-heuristics/feat_fetch_problem_file
Oct 20, 2021
398348b
merge conflicts fixed
Oct 20, 2021
dca8b95
fix merge conflicts
Oct 20, 2021
7b3dfa5
fix merge conflicts
Oct 20, 2021
3c64bf9
fix styles
Oct 20, 2021
a1a19ab
Merge pull request #28 from visual-heuristics/hotfix_styles
invincibleyolk Oct 20, 2021
83a2611
text issue fix
Oct 20, 2021
d176887
fix bugs; add plugin file
Oct 20, 2021
697c5c3
plugin onhold
Oct 20, 2021
d8076ea
fix bug
Oct 20, 2021
bd5a0f9
fix styles
Oct 20, 2021
ffe1f6a
Merge pull request #30 from visual-heuristics/feat_plugin
invincibleyolk Oct 20, 2021
f0a4dd4
All test, unit, integration and E2E working
pippo-sci Oct 20, 2021
60ef0b7
All test, unit, integration and E2E working
pippo-sci Oct 20, 2021
b2c392c
Resolve conflicts
pippo-sci Oct 20, 2021
1b4f3cc
Merge pull request #31 from visual-heuristics/feat_fetch_problem_file
Oct 20, 2021
b6845d7
hot fix page2
pippo-sci Oct 21, 2021
77edf8c
Update ReadMe.md
invincibleyolk Oct 24, 2021
9204908
Update ReadMe.md
mezm94 Oct 24, 2021
dae7039
Update ReadMe.md
mezm94 Oct 24, 2021
12129ff
Update ReadMe.md
mezm94 Oct 24, 2021
39dd4d9
Update ReadMe.md
mezm94 Oct 24, 2021
d8f4a7b
Update ReadMe.md
mezm94 Oct 24, 2021
b67a0b8
clean code home and page4
pippo-sci Oct 28, 2021
610b39a
cleaning, refactoring and commenting
pippo-sci Oct 29, 2021
0bcde46
Merge pull request #32 from visual-heuristics/feat_fetch_problem_file
Oct 29, 2021
86c4136
Merge pull request #33 from visual-heuristics/develop
Oct 29, 2021
18791da
documentation update
pippo-sci Oct 29, 2021
ca58f48
Merge branch 'main' of https://github.com/visual-heuristics/frontend-…
pippo-sci Oct 29, 2021
43ca0b4
documentation allowed
pippo-sci Oct 29, 2021
7b863a8
documentation allowed
pippo-sci Oct 29, 2021
d202645
add tests folder
Oct 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.git
node_modules
build
Dockerfile
.dockerignore
.gitignore
README.md
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build
/prototypes
/data samples
/planimationLibrary.js

# misc
.DS_Store
.env.local
.env.development.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

#documents
/prototypes
/data samples

15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: node_js
node_js:
- 14
branchs:
only:
- master
- develop
cache:
directories:
- node_modules
install:
- yarn install
scripts:
- yarn test
- CI=false yarn build
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:14.18-alpine AS build

WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install

COPY . ./
RUN npm run build

FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
COPY --from=build /app/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD sed -i -e 's/$PORT/'"$PORT"'/g' /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'
293 changes: 267 additions & 26 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,279 @@
# Planimation Javascript Frontend
# COMP900082 - PL-Boxjelly. Project: Planimation

The initial work of Planimation JS Library, and the frontend is waiting to be developed.
planimation is a modular and extensible open source framework to visualize sequential solutions of planning problems specified in PDDL. planimation has a preliminary declarative PDDL-like animation profile specification, expressive enough to synthesise animations of arbitrary initial states and goals of a benchmark with just a single profile.(https://planimation.github.io/documentation/).

## Features
- Visualise Planimation VFG file
- Visualise the last action of a given plan

## Tech
# Table of Contents
[1.0 Project Overview](#1.0)

- [PIXIJS] - The HTML5 Creation Engine
- [RequireJS] - RequireJS is a JavaScript file and module loader
[2.0 Deployment](#2.0)

[3.0 Development Environment](#3.0)

## Run the demo
In the root folder:
```sh
npm install http-server -g
http-server
[4.0 Using the system](#4.0)

[5.0 Architecture and Design](#5.0)

[6.0 Change Log](#6.0)

[7.0 Demo](#7.0)

<h1 id="1.0"> 1.0 Project Overview </h1>

## Background

Planimation is an openSource framework to visualise sequential solutions of planning problems specified in PDDL. The framework was built by a team of University of Melbourne students in the context of the course SWEN90013 and under the lead of Professor Nir Lipovetzky and it has been continually supported by students and contributors. The project has important awards and recognitions.

The planimation goals are:

* help to debug PDDL code for Online PDDL Editor users

* increases user understanding of planning problems

* showing planning solutions to non-technical audiences

The system uses a domain PDDL script, a problem PDDL script and a Animation profile script to produce visualisation.

## Goal for This Project

The main goal is:
* Improve project efficiency, maintainability and extendability of Planimation software

The specific goals are:
* replace the current frontend programed in C# with the Unity engine, for a Javascript and PixiJS framework

* decrease the loading times produced by the Unity engine

* maintaining its current features

* integrate with current development tools (Online pddl Editor plugin)

* develop a new plugin for Visual Studio Code

<h1 id="2.0"> 2.0 Deployment </h1>

## Overview

Before building your development environment, you’ll need:
A code editor
VS Code is suggested. Download link

Recommended extensions: Jest; GitLens;tslint;

WebStorm is an alternative JavaScript IDE for frontend development.

Git
Check if you installed Git:

```
git --version
```
Please refer to https://docs.github.com/en/get-started/quickstart/set-up-git to see the installment and basic usage of Git.

### Node
Please follow the instructions and download Node.js to your system. https://nodejs.org/en/

Recommended version: 14.17.5. Npm is the package manager for the Node JavaScript It is already installed along with Node.

Now you can check the versions:
```
node -v
v14.17.5
npm -v
6.14.14
```

### Install yarn:

```
npm install -g yarn
```

### Building development environment:
Clone the repository from GitHub:
```
git clone https://github.com/visual-heuristics/frontend-js
```
### It’s good if you could setup your username and email address for the repository, so the other team members will have a clear idea the contributors of branches and codes on GitHub.

```
git config user.name "Mona Lisa"

git config user.email "email@example.com"
```
## Install frontend development environment:
In the current working directory to the local repository:

Open the working directory with VS code, in the terminal:
```
yarn //or “npm install”
```
This command will automatically install all the packages you need in this project.

### Run the project:
```
npm run start
```
This will open a page on your browser, and you should see a jumping rabbit like this:



Now, the development environment is all set up! Start coding😊

### Test your code:
```
yarn test //or “npm test” or testing in Jest
./node_modules/.bin/cypress open // for testing in Cypress
```
Open the link in your browser, and you should see a visualisation of block world .

## Development Guide
Currently, only the main logic of the visaulisation part has been developed, and there are lots of other features that can be developed.

For examples:
* Subgoal feature
* Step Control
* Linear animation
<h1 id="3.0"> 3.0 Development Environment</h1>

### Technical Environment

https://confluence.cis.unimelb.edu.au:8443/display/VH/Technical+Environment

### Non-technical Environment

https://confluence.cis.unimelb.edu.au:8443/display/VH/Non-technical+Environment

### Development Environment Setup

https://confluence.cis.unimelb.edu.au:8443/display/VH/Development+Environment+Setup


<h1 id="4.0"> 4.0 Using the system </h1>

## 4.1. Project Homepage:

In coordinator homepage: Shows the four sections of the project.
https://confluence.cis.unimelb.edu.au:8443/display/VH/Design+Notebook

### 4.1.1 Go to PDDL file upload page

Go to the first page to generate visualisation using PDDL files.

### 4.1.2 Go to VFG file upload page

Go to the second page to generate visualisation using VFG files.

### 4.1.3 Check document for the project

Check the documentation for Planimation

### 4.1.4 Check demo video for the project

Check the Demo Video for Planimation


## 4.2. PDDL file upload page

On this page, you need to upload 3 PDDL file to the PDDL editor server, and it will lead you to the visualization page with a generated vfg file.

## 4.3. VFG file upload page

On this page, you need to upload a single vfg file for animation generating. It will lead you to the visualization page once your .vfg file is accepted.

## 4.4. Document Page

On document page, you can access the resources for how to use planimation and how to deploy it on your computer.

## 4.5. Demo Page

In the demo page we have a youtube video which would teach you how does planimation works and how we deployed it.

## 4.6. Visualization Page

This is the main functionality page for the project. It will show the animation generated from the VFG file on pages 1 and page 2. On this page, your could de the following operation.

### 4.6.1 Check the stage list on the left side of the page
On the left, you will see a list of all the stages for this problem. And you can check the visualization for this stage by clicking on it.

### 4.6.2 Check the subgoal list on the right side of the page
On the right, you will see a list of all the subgoal conditions for this problem. And you can check the visualization for the condition where this sub goal is satisfied by clicking on that step.

### 4.6.3 Operation on visualization
In the middle of the page, you will see the visualization sections which will look different depends on your problem. By clicking on the control button in this section, you can easily pause, play, reset, speed up, slow down and move to the pre/next step.


<h1 id="5.0"> 5.0 Architecture and Design </h1>

### Architecture Model

https://confluence.cis.unimelb.edu.au:8443/display/VH/Architecture

### Prototype Design and Interactive Diagram

https://confluence.cis.unimelb.edu.au:8443/display/VH/Prototype+Design+and+Interactive+Diagram

### System Architecture Diagram

https://confluence.cis.unimelb.edu.au:8443/display/VH/System+Architecture+Diagram

### Design Notebook

https://confluence.cis.unimelb.edu.au:8443/display/VH/Design+Notebook

### Operational Concept Documents

https://confluence.cis.unimelb.edu.au:8443/display/VH/Operational+Concept+Documents


### Directory structure and key files and components

https://confluence.cis.unimelb.edu.au:8443/display/VH/Developer+Information+Frontend


<h1 id="6.0"> 6.0 Change Log </h1>


### 19/08/2021
* Fork from original repository, initial commits

### 22/08/2021
* Init react framework

### 23/08/2021
* Update Jest

### 25/08/2021
* Update .travis.yml; Add template

### 06/09/2021
* Updated global styles

### 11/09/2021
* Add drag&drop function
* Animation bugs fixed

### 15/09/2021
* Add animation playing/pausing function

### 18/09/2021
* Updated Confluence

### 26/09/2021
* Added speed control for animation

### 01/10/2021
* Added function of reading vfg file

### 03/10/2021
* Interact with backend

### 06/10/2021
* Added export file function

### 13/10/2021
* Updated Animation display

### 20/10/2021
* Modified styles for pages

When you develop the new features for Planimation JS Libary, please try to modularise it. So it will be easier to maintain the front-end in future. Also, the potential user can use the relevant feature to build their application. Visualise the search tree with Planimation is a good example here.
### 21/10/2021
* Updated tests

## Resources
* Pixi JS - https://www.pixijs.com/
* Pixi JS Tutorial - https://github.com/kittykatattack/learningPixi
* Pixi JS Demos - https://pixijs.io/examples/#/demos-basic/container.js
<h1 id="7.0"> 7.0 Demo</h1>

[PIXIJS]: <https://www.pixijs.com/>
[RequireJS]:<https://requirejs.org/>
https://morning-ridge-78538.herokuapp.com/
Loading