Skip to content

Commit

Permalink
Release v0.0.5 (#39)
Browse files Browse the repository at this point in the history
* build(dep): `@babylonjs` & `@types/node`:

- @BabylonJS:4.1.0-beta.9
- @types/node:12.12.16

* feat(apps/frontend): select initial tool

* fix(apps/frontend): import hammerjs

* refactor(frontend): scene-viewer into container

* feat(frontend): dispatch `pointerPick` action

* feat(frontend): dispatch `add|removeVoxel` action

* build(packaging): simplify `prettier:check` command

* doc(frontend): add readme with ngrx resources

* feat(frontend): support adding voxel

* refactor(frontend): don't inject `GridService`

* feat(frontend): effects for when app goes on/offline

* test(frontend): on/offline effects

* test(vdb): remove `normals` from test

* feat(vdb): add `setValueOff` & `isValueOn`

* test(frontend): set expected position to pass

* fix(frontend): make public for use in template

* build(dep): `@types/node` & `core-js`

* feat(frontend): enable `removeVoxel`

* build(dep): `@babylonjs/*`

* build(github): keep `develop` after PR merge

* build(dep): `cypress` to `v3.8.0`

* build(dep): `cypress` to `v3.7.0`

* test(vdb): set value with float coordinates:

- coordinates get always rounded down

* build(dep): `cypress` to `v3.7.0`

* feat(frontend): support adding and removing voxels

* test(ui): remove unused imported components

* build(CircleCi): use `13.3.0` due failing tests:

- Test suite failed to run
  - Call retries were exceeded at ChildProcessWorker.initialize()
- jest-community/vscode-jest#486 (comment)

* fix(frontend): add voxel on positive normal

- but negative position

* test(frontend): set `setupFilesAfterEnv`

- to run in Jest tests within WebStorm
- nrwl/nx#1439 (comment)

* test(frontend): set `globals`>`tsConfig`

- to run in Jest tests within WebStorm with SCSS imports in component

* build(CircleCi): use `13.4.0`

* build(dep): update diverse dependencies:

- @ngrx/effects, @ngrx/store
- core-js, mnemonist, codelyzer
- @types/jest, @types/node

* doc(readme): record macro & git setup

* build(dep): `@angular-devkit/build-angular` & `@angular/cli`

* feat(frontend): draw separate mesh per InternalNode1 (#9)

* feat(frontend): add multiple voxels

* feat(ui): add output for dropped files

* doc(readme): add openVDB repo link

* feat(vdb): implement `beginLeafOn` iterator

* feat(frontend/vdb): draw InternalNode1 chunks

* feat(frontend/vdb): don't return LeafNode

* feat(frontend/vdb): don't return `LeafNode` in `setValueAndCache`

* feat(frontend/vdb): use only key from accessor

* feat(frontend/vdb): remove `getLeafNodeAndCache`

* feat(frontend/vdb): remove `beginLeafOn`

* feat(frontend/vdb): remove `getLeafNodeAndCache` & `beginLeafOn`

* fix(frontend/vdb): dispose mesh instead of just remove it:

- so we resolve memory issue

* refactor(frontend): optimize scene & mesh

- https://doc.babylonjs.com/how_to/optimizing_your_scene

* refactor(frontend): remove unused method & obj loader

* refactor(vdb): increase `InternalNode1` size to reduce draw calls

* refactor(vdb): remove inspector & loading obj

* refactor(vdb): align to `probeNode` & `probeNodeAndCache`

* refactor(vdb): s/grid-to-mesh/node-to-mesh

* refactor(vdb): use un-indexed mesh

* fix(ui): read normal directly from picked mesh

* refactor(frontend): remove `objFileLoader`

* refactor(frontend): s/updateGridMesh/updateNodeMesh & key/Node1Origin

* feat(benchmark): test single vs. multiple `array.push()`

* build(CircleCi): update node to `13.5.0` & cypress `3.8.1`

* build(nx): nx migrate @nrwl/workspace (v8.11.0)

- nx migrate --run-migrations=migrations.json

* fix(benchmark): add `.nxignore` to get benchmark through linter

* build(dep): update dependencies

* feat(frontend): add undo/redo & enable `strictNullChecks` (#10)

* feat(frontend): add undo/redo & enforce `strictNullChecks`

* feat(frontend): undo/redo with max buffer size

* test(frontend): handle possible `undefined`

* feat(frontend): make remove a voxel undoable

* feat(frontend): place initial voxel at [0, 0, 0]

* fix(frontend): dispose previous history if new `addUndo`

* refactor(frontend): extract method for creating `addUndo`

* feat(frontend): set active state of voxel, return color when deleting (#11)

* feat(ui/frontend): add menu-bar (#12)

* feat(frontend): add menu-bar

* feat(frontend): add menu-bar-container

* test(frontend): inject mock store for menu-bar-container

* refactor(frontend): add missing `menu-bar.component`

* test(frontend): import `MenuBarModule`

* feat(frontend): undo/redo with start/end actions (#13)

* feat(frontend): undo/redo with start/end actions

* test(frontend): provide `valueToColor()`

* feat(frontend): set random color when adding a voxel

* test(frontend): add same color of voxel

* refactor(frontend): use directly `props<VoxelChange>`

* refactor(frontend): throw error when coord&values not same length

* build(dep): update dependencies

* build(dep): update cypress to `v3.8.2`

* build(dep): update stylelint to `v13.0.0`

* refactor(ui): prefix UI components with `Ui` like Angular does with `Mat` (#14)

* refactor(ui): prefix `MenuBar` with `Ui` like Angular does with `Mat`

* refactor(ui): prefix `SceneViewer` with `Ui` as Angular does with `Mat`

* test(ui): check `menu-bar` menus & items

* refactor(ui): remove ctor & onInit

* test(ui): check if sidnav has left & right navigation

* refactor(ui): prefix `SidenavShell` with `Ui` as Angular does with `Mat`

* refactor(ui): prefix `SceneViewerService` with `Ui` (ng with `Mat`)

* refactor(ui): prefix `SceneViewerTestModule` with `Ui` (ng with `Mat`)

* refactor(ui): prefix `ToolbarModule` with `Ui` (ng with `Mat`)

* refactor(ui): prefix `UiPointer[Button|PickInfo]` with `Ui`

* build(dep): update handlebars to `v4.7.2` due to security issues

* test(ui): should emit `value` of clicked menu items

* test(ui): should emit on tool select

* test(ui): should close left & right sidenav

* test(frontend): should dispatch action

* test(frontend): check `scene-viewer-container.reducer`

* test(frontend): check `scene-viewer-container.reducer` selector

* refactor(ui): import `hammerjs` to remove warning in test run

* test(frontend): check `tools-panel.reducer`

* test(frontend): check `undo-redo.reducer`

* test(frontend): check `undo-redo.reducer` with `stepX`

* test(frontend): check `undo-redo.reducer` too many undo/redo's

* style(prettier): fix imports

* test(vdb): add tests for `tree`

* test(vdb): improve coverage

* test(vdb): check coord

* test(vdb): check grid

* test(vdb): check `nodeToMesh`

* feat(ui): add `Storybook` (#16)

* feat(ui): add `Storybook`

* feat(ui): add `Storybook` e2e test

* doc(ui): how to watch e2e

* build(dep): update storybook to `v5.3.6`

* build(dep): back to storybook `v5.3.2` due to:

- info => Using angular project 'frontend' for configuring Storybook.

* build(dep): back to storybook `v5.3.6` since it works

* test(ui-e2e): open/close `menu-bar`

* ci(storybook): run, build & deploy storybook for `ui-e2e` (#17)

* ci(storybook): build storybook

* ci(storybook): move `frontend e2e` step down

* ci(storybook): store storybook & deploy to gh-pages

* ci(storybook): extract git(hub) configs

* ci(storybook): extract deploy to gh-pages

* ci(storybook): change to `test-results` folder & use `junit` reporter

* ci(storybook): run `ui-e2e` and store test-results & artifacts

* ci(storybook): run `ui-e2e` only on `master` & `develop`

* fix(ui): to high/large canvas by setting `display: block;`

* feat(frontend): paint voxel (#18)

* feat(frontend): dispatch paint-voxel action

* feat(frontend): set voxel on paint

* feat(frontend): finish renaming `addVoxel` to `setVoxel`

* feat(frontend): save old/new values and undo/redo painting

* refactor(frontend): s/positions/coord

* refactor(frontend): fix prettier issue

* refactor(frontend): s/position/xyz

* build(dep): update `@nrwl` to `v8.11.2`

* build(dep): update `@angular/(cli|core)` to `v8.3.22`

- `ng update @angular/cli @angular/core`

* build(dep): update @BabylonJS, @babel, @storybook, @types

* feat(ui): color-dialog (#19)

* feat(ui): color-dialog

* refactor(ui): always open dialog in story

* refactor(ui): flatten config to just menus & type safety in story

* feat(ui): pass colors to color-dialog

* refactor(ui): make data & return value type-safe.

* refactor(ui): extract interface `UiColorDialogData`

* refactor(ui): extract open into `UiColorDialogService`

* test(ui): s/UiMenuBarConfig/UiMenuBarMenu

* refactor(ui): provide `selectedColorIndex`

* build(dep): update `circleci/node` to `v13.6.0`

* feat(frontend): use color-dialog (#20)

* feat(frontend): use color-dialog

* refactor(ui): s/draggable-dialog/color-dialog

* feat(frontend): open (empty) color-dialog

* feat(frontend): provide some first colors

* feat(frontend): use effects to open color-dialog

* feat(frontend): use effects to set selected color in store

* feat(frontend): temp. consider just `color.r`

* feat(frontend): save colors and selected-index

* refactor(frontend): move `tool.model.ts` to `model` (put in lib later)

* feat(frontend): `intToRgba` & `rgbaToInt`

* refactor(frontend): s/model/value

* refactor(frontend): use `Rgba` and `rgbaToInt` to set voxel in grid

* refactor(frontend): provide selector for retrieving CSS colors

* refactor(frontend): move comment `Front`

* refactor(vdb): define all colors

* refactor(frontend): fix prettier

* test(frontend): import `OptionsPanelModule`

* refactor(frontend): prettier

* refactor(ui): `forceDepthWrite` for transparent cubes

- there are still some artifacts (seeing through cubes behind)

* refactor(ui): use `rgba` to set initial voxel at [0, 0, 0]

* test(frontend): provide stub component in `AppComponent` test

* test(frontend): provide `initialMockState`

* test(frontend): mock & expect proper `Rgba` values

* test(ui): fix type of dialog result (`UiColorDialogColor` to `number`)

* feat(frontend): support dark & light theme (#21)

* feat(ui): add theme toggle to storybook (#22)

* feat(ui): remove `mat-button` from story

* build(dep): update `@storybook` to `v5.3.8`

* build(dep): update `tslint` to `v6.0.0`

* build(dep): back to `tslint` `v5.20.1`

* refactor(model): extract `Rgba` & `Tool` to lib `model` (#24)

* refactor(model): extract `Rgba` & `Tool` to lib `model`

* refactor(model): remove mapping path to non-existing `@talus/math`

* refactor(vdb): use `eslint` over `tslint` (#25)

* refactor(benchmark): use `eslint` over `tslint` (#26)

* refactor(benchmark): use `eslint` over `tslint`

* refactor(benchmark): s/benchmarkjs/Benchmark

* ci(circle): `git pull` before `gh-pages` deploy

* refactor(frontend): prefix unused variables with `_`

* refactor(frontend): register pointer events

* refactor(frontend): draw initial chessboard

* docs(talus): add ui-e2e command & update deploy url

* docs(frontend): add most used commands

* docs(vdb): move install & test to blog

* docs(ui): clean-up storybook commands

* feat(vdb): implement raytracing (#27)

* refactor(vdb): move `ValueType` & `Index` to `types.ts`

* feat(vdb): add delta value

* feat(vdb): add `floor()` to `Coord`

* feat(vdb): add `Vec3`

* feat(vdb): add `minValue` to `Vec3`

* feat(vdb): add `Ray`

* feat(vdb): implement `probeLeafNodeAndCache`

* test(vdb): improve comments about cache misses

* test(vdb): check if correct cache level was hit

* feat(frontend): add selection tool & stop moving camera on voxel hit

* refactor(benchmark): reduce amount of values (CircleCI)

* build(dep): update `node` to `v13.7.0`

* ci: start using `yarn nx ...`

* refactor(benchmark): set `--maxWorkers` to 10 (was 32 on CircleCI)

* ci: uniform calls by using `yarn nx ...`

* doc: add debug CircleCI via `ssh`

* feat(vdb): add `empty()` & `numBackgroundTiles()`

* feat(vdb): add `keyToCoord()`

* feat(vdb): `expand()` on `CoordBBox`

* feat(vdb): `isInside()` on `CoordBBox`

* feat(vdb): add `offset`, `expand`, `reset`, `translate`

* feat(vdb): add `add`, `divide` to `Vec3`

* feat(vdb): add `clip`, `intersects` & `setTimes` to `Ray`

* test(vdb): add C++ tests for `VolumeRayIntersector`, `Ray`, `Coord`

* feat(vdb): add `VolumeRayIntersector`

* style(vdb): eslint-disable @typescript-eslint/no-explicit-any

* test(vdb): min coord is `Number.MIN_SAFE_INTEGER`

* test(vdb): remove `console.log()`

* refactor(vdb): export `VolumeRayIntersector`

* test(vdb): add test with checking all voxels intersecting given ray

* refactor(vdb): organize imports with barrel files (1)

* feat(frontend): add basic line drawing (#28)

* refactor(frontend/vdb): remove `colors` & comments for `beginValueOn()`

* feat(vdb): add `removeFraction()`

* feat(frontend): add `Select line point` tool

* feat(frontend): add basic line drawing

* test(model): improve test description for `Rgba`

* style(frontend): fix prettier (imports)

* refactor(frontend): extract methods

* refactor(frontend): move declaration `dda` to usage

* build(dep): update @storybook, @types, @typescript-eslint, eslint

* build(CircleCI): `git co gh-pages` before pull and commit

* build(CircleCI): use `checkout` over not-existing `co` alias

* build(dep): migrate to `@nrwl` `v8.12.1`

* build(dep): keep `cypress` `v3.8.3`

* build(dep): `ng update @angular/cli` `v8.3.24`

* build(dep): `@babel/core` `v7.8.4`

* build(CircleCI): deploy in `$DEPLOY_CONTEXT` folder on `gh-pages`

* build(CircleCI): echo variables and `git fetch origin gh-pages:gh-pages`

* build(CircleCI): echo variables and `git pull`

* build(CircleCI): don't `echo` variables

* feat(ui): `pointUnderPointer$` emitting when hover over mesh

* build(CircleCI): adjust base-path (`apps/frontend`

* fix(frontend): return all `VoxelChange` & filter dupl. origins in effect

* test(vdb): check if accessor returns background

* test(vdb): should fill buffer with `0`

* test(vdb): should initialise with `0`

* test(vdb): check if accessor returns background

* feat(frontend): bg value = -1, `removeVoxel` uses `setValueOff`

* fix(frontned): import `VoxelChange`

* feat(frontend): preview line (#29)

* feat(frontend): preview line

* style(frontned): prettier

* test(frontend): provide `GridService`

* test(vdb): add C++ tests `testSetActiveState`

* feat(frontend): start & finish line drawing

* feat(frontend): temporary set start & end voxel of line

* feat(frontend): use `voxelsSet` action

* feat(frontend): support undo line drawing

* feat(frontend): pass position to chessboard

* refactor(frontend): use only one coord `selectedLineStartCoord`

* test(frontend): check `scene-viewer-container.reducer.ts`

* test(frontend): check filter out duplicate origins in effect

* test(frontend): check `setVoxel(s)` & `setVoxel(s)Failed`

* doc(frontend): update readme with 'Angular Update Guide'

* test(frontend): extract voxel change

* refactor: update to @angular 9.0.0 & cypress 4.0.0 (#30)

* refactor(ui/frontend): import deeply to specific material component

* build(dep): update `@angular/cli` to `v8.3.25`

* build(dep): update `@nrwl/*` to `v8.12.2`

* build(dep): update `@angular/*` to `v9`

* build(dep): update `@angular/material` to `v9`

* build(dep): update `@storybook`, `@typescript-eslint`

* build(dep): update `cypress` to `v4.0.0`

* build(dep): remove `handlebars`

* build(dep): update `@babylonjs`

* feat(vdb): add `touchLeafAndCache()` (#31)

* feat(vdb): add `touchLeafAndCache()`

* refactor(frontend): only set `end` temporary in `selectLine()`

* refactor(frontend): don't initialize with chessboard

* fix(frontend): not drawing of line in same node:

- probe for InternalNode1 for affected origin, don't use accessor

* refactor(frontend): use `tap` over `map`

* build(dep): update to `nx` `v9.0.0` (#34)

* build(dep): update to `nx` `v9.0.0`

* build(dep): update @storybook, @typescript-eslint, cypress, stylelint

* build(dep): update @BabylonJS & conform to newly created nx workspace

* style(frontend): disable stylelint for angular theme color keys

* build(dep): update @angular to `9.0.1`

* build(dep): @storybook/*, @types/node, stylelint

* feat(ui): add basic status-bar with connection status

* feat(frontend): add empty status-bar

* feat(ui): use outlined icon for changing theme & put icon at bottom

* test(frontend): include `UiStatusBarModule`

* build(CircleCi): set upstream

* feat(ui): session-dialog with radio-group (#37)

* feat(ui): add basic skeleton for session-dialog

* feat(ui): session-dialog with radio-group

* test(ui): fix providers for session-dialog spec

* feat(frontend): open session-dialog via menu-bar

* test(frontend): check emitted action `selectSession`

* refactor(lib): s/session/topic

* refactor(lib): select or create a topic

* fix(frontend): voxels on wrong position due unresized canvas

* test(frontend): mock dialog result `UiTopicDialogSelectionResult`

* feat(kafka): add kafka-proxy (websocket) & kafka with docker-comp… (#38)

* feat(kafka): use `docker-compose` to start `kafka` & `Kafdrop`

* feat(kafka): start kafka, use kafka-proxy to send msg via WS to kafka

* feat(kafka): start kafka, use kafka-proxy to send msg via WS to kafka 2

* feat(kafka): compress ws data & regsiter to connection state

* fix(frontend): missing dep. & comment out initial ws test emit

* feat(frontend): use `connectionStatus$` for status-bar

* feat(frontend): basic synchronisation of actions between ws-connections

* feat(frontend): sync editor & undo/redo actions

* feat(frontend): set `needsSync` in effect

* feat(frontend): set `needsSync` in effect

* feat(kafka-proxy): remove `identity` method

* test(frontend): mock & check dispatch

* test(frontend): add `needsSync: true`

* refactor(kafka): add project to nx ignore since it's not a real nx-app

* doc(kafka-proxy): add readme

* test(frontend): add generic parameter to fix error:

- Error: connect ECONNREFUSED 127.0.0.1:80

* test(frontend): put correct describe name (MenuBarContainerComponent)

* test(ui): import relative

* test(frontend/ui): specify globals in `jest.config.js`

- preventing `Error: connect ECONNREFUSED 127.0.0.1:80` when started
from WebStorm

* test(frontend/kafka-proxy): use `socket.broadcast` (send to all but me)

* test(frontend): prefer `io.connect` for readability

* refactor(kafka-proxy): extract kafka logic into `KafkaService` + tests

* refactor(frontend/kafka-proxy): basic create/delete/get topic(s)

* refactor(frontend/kafka-proxy): make topics an observable

* refactor(frontend): don't wrap observable with `new Actions()`

* refactor(frontend): emit `updateTopics` action when `kafkaPrSer.topics$`

* test(frontend): add `sessions` to state & update tests

* feat(frontend): set sessions in store & provide it in session-dialog

* feat(frontend): set `session`

* feat(frontend): s/AllActions/SyncAction

* feat(frontend/kafka-proxy): Consume topic & emit actions for viewer

* feat(kafka-proxy): remove old consumers on connection close

* refactor(frontend/kafka-proxy): extract `EventName` to `@talus/model`

* refactor(shared): extract `notNil()` to `@talus/shared`

* refactor(kafka-proxy): remove scaffolded files

* test(kafka-proxy): update gate tests

* fix(frontend): s/session(s)/topic(s) after rebase

* refactor(frontend): s/session/topic

* feat(kafka): start-up 'kafka-manager' to have more info

* refactor(frontend): extract `initialize()` for reuse

* feat(kafka-proxy): provide `resetOffsets()`

* feat(frontend): add `createTopic` action

* feat(ui): provide `disposeSceneAndRestartRendering()`

* feat(frontend/kafka-proxy): consumption of different topics

* fix(frontend): don't sync start/end-line action (effects emit them)

* fix(frontend): only emit action from kafka which have a diff. socket-id

* fix(frontend): load all messages from current "session" when re-open it

* refactor(frontend): remove `AfterViewInit` and order ctor arguments

* refactor(kafka): add (commented) `kafka-magic` UI as alternative

* refactor(kafka-proxy): move consumer management into `kafka.service.ts`

* doc(kafka-proxy): add links about REST proxy & kafkajs issue to readme

* style(kafka): fix prettier

* fix(frontend): filter `__consumer_offsets` from topics

* feat(frontend): get topics with total topic offset

* feat(ui): support status text in status-bar

* refactor(frontend): remove voxel count from state/reducer/specs

* refactor(frontend): update state if connection-status changed & fix test

* refactor(frontend): don't sync undo/redo, but setVoxels action

* fix(frontend): remove old parameter for undo action

* refactor(frontend): remove duplicated undo/redo action

* doc: add last generation step, macro & release links

* refactor(frontend): use `Promise.resolve()`

* fix(frontend): don't add initial voxel when existing topic loaded

* fix(kafka-proxy): return observable, so frontend gets new topic names

* test(frontend): adapt test for `needsSync` & initial action

* build(dep): update `@nrwl/workspace` to `v9.0.4`

* build(dep): update `@angular` to `v9.0.4`

* build(dep): update `@babylonjs` to `v4.1.0`

* build(dep): update `@babel` & '@nestjs' and use `--async=false` (CI)

* build(dep): update `tslib`, `@storybook`, `@types`, `@typescript-eslint`

* build(dep): update `cypress`

* test(kafka-proxy): mock `disconnectConsumer()`

* build(dep): update `@angular` to `v9.0.5`

* feat(ui): leaf empty space on top/bottom of sidenav panel

* refactor(frontend): use h6 and materials typography

* refactor(ui): make collapse button smaller

* feat(ui): add story for sidenav-shell component

* build(dep): update `@babel/core` to `v7.8.7`

* refactor(frontend): remove unused `Nil` type (moved to shared)

* refactor(kafka): specify specific image versions

* refactor(ui): make canvas background color transparent

* feat(frontend): get `lastLoadedMessageOffset` for future loading status
  • Loading branch information
PhilippeMorier authored Mar 6, 2020
1 parent d632e97 commit 5cd33ec
Show file tree
Hide file tree
Showing 89 changed files with 2,931 additions and 740 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ aliases:
# https://github.com/cypress-io/cypress-docker-images/tree/master/included
- &use_docker_cypress_included
docker:
- image: cypress/included:4.0.1
- image: cypress/included:4.1.0

- &workspace ~/talus

Expand Down
3 changes: 3 additions & 0 deletions .nxignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Hack for getting benchmark app (generated with ng g @nrwl/node:application) through linting
/apps/benchmark

# kafka app is not a real @nrwl/nx app
/apps/kafka
60 changes: 51 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ This project was generated using [Nx](https://nx.dev) with the following command

11. `nx g @nrwl/angular:storybook-configuration ui`

12. `ng generate @nrwl/workspace:library shared --linter=eslint`

## Installations

### Node
Expand Down Expand Up @@ -117,13 +119,15 @@ Setting up a macro which will fix all the linting issues, optimizes the imports

2. Record macro (Edit > Macros > Start Macro Recording) in this order

- Action: TsLintFileFixAction (with opened \*.ts file)
- Action: OptimizeImports
- Action: ReformatWithPrettierAction
- Action: FileWatcher.runForFiles (with opened \*.scss file)
- Action: SaveAll
- Action: `OptimizeImports`
- Action: `TsLintFileFixAction` (with opened \*.ts file)
- Action: `Javascript.Linters.EsLint.Fix`
- Action: `ReformatWithPrettierAction`
- Action: `FileWatcher.runForFiles` (with opened \*.scss file)
- Action: `SaveAll`

3. Save macro as e.g. `Fix & Save`
3. Save macro as e.g. `Fix & Save`
(macros are saved under `/home/<user>/.WebStorm2019.3/config/options/macros.xml`)

4. Assign Keyboard shortcut `Ctrl` + `S` to macro `Fix & Save` (search for macro)

Expand Down Expand Up @@ -191,11 +195,49 @@ See scripts on [nx.dev](https://nx.dev/angular/api/workspace/npmscripts)
- `ngc -p ./apps/frontend/tsconfig.app.json` (output: `./dist/out-tsc`)
## Backend
### NestJS
- `yarn add --dev @nrwl/nest`
- `nx g @nrwl/nest:application kafka-proxy --frontend-project frontend --linter eslint`
### Docker
### Docker Engine - Community
https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository
- `sudo apt-get update`
- `sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common`
- `curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -`
- `sudo apt-key fingerprint 0EBFCD88`
- `sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) eoan test"`
(https://unix.stackexchange.com/a/363058)
- `sudo apt-get update`
### Docker Compose binary
https://docs.docker.com/compose/install/
- `sudo curl -L "https://github.com/docker/compose/releases/download/1.25.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose`
- `sudo chmod +x /usr/local/bin/docker-compose`
### Docker Command-line completion
https://docs.docker.com/compose/completion/
- `sudo curl -L https://raw.githubusercontent.com/docker/compose/1.25.3/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose`
## Github Pages
CircleCI pushes every build onto the
CircleCI pushes every develop/master branch build (frontend & storybook of ui) onto the
[gh-pages branch](https://github.com/PhilippeMorier/talus/tree/gh-pages) which gets published on
GitHub under:
- Schema: `https://philippemorier.github.io/talus/<branch>/<commit-hash>/frontend/`
- Example: `https://philippemorier.github.io/talus/develop/56c699a/frontend/`
Example:
- frontend: `https://philippemorier.github.io/talus/master/d632e97/apps/frontend/`
- storybook of ui: `https://philippemorier.github.io/talus/master/d632e97/storybook/ui/`
See also the [releases page](https://github.com/PhilippeMorier/talus/releases) for older versions.
97 changes: 92 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "frontend:build"
"browserTarget": "frontend:build",
"proxyConfig": "apps/frontend/proxy.conf.json"
},
"configurations": {
"production": {
Expand All @@ -88,7 +89,8 @@
"options": {
"jestConfig": "apps/frontend/jest.config.js",
"tsConfig": "apps/frontend/tsconfig.spec.json",
"setupFile": "apps/frontend/src/test-setup.ts"
"setupFile": "apps/frontend/src/test-setup.ts",
"passWithNoTests": true
}
}
}
Expand Down Expand Up @@ -138,7 +140,8 @@
"options": {
"jestConfig": "libs/ui/jest.config.js",
"tsConfig": "libs/ui/tsconfig.spec.json",
"setupFile": "libs/ui/src/test-setup.ts"
"setupFile": "libs/ui/src/test-setup.ts",
"passWithNoTests": true
}
},
"storybook": {
Expand Down Expand Up @@ -243,7 +246,8 @@
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/vdb/jest.config.js",
"tsConfig": "libs/vdb/tsconfig.spec.json"
"tsConfig": "libs/vdb/tsconfig.spec.json",
"passWithNoTests": true
}
}
}
Expand Down Expand Up @@ -294,7 +298,90 @@
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/model/jest.config.js",
"tsConfig": "libs/model/tsconfig.spec.json"
"tsConfig": "libs/model/tsconfig.spec.json",
"passWithNoTests": true
}
}
}
},
"kafka-proxy": {
"root": "apps/kafka-proxy",
"sourceRoot": "apps/kafka-proxy/src",
"projectType": "application",
"prefix": "kafka-proxy",
"schematics": {},
"architect": {
"build": {
"builder": "@nrwl/node:build",
"options": {
"outputPath": "dist/apps/kafka-proxy",
"main": "apps/kafka-proxy/src/main.ts",
"tsConfig": "apps/kafka-proxy/tsconfig.app.json",
"assets": ["apps/kafka-proxy/src/assets"]
},
"configurations": {
"production": {
"optimization": true,
"extractLicenses": true,
"inspect": false,
"fileReplacements": [
{
"replace": "apps/kafka-proxy/src/environments/environment.ts",
"with": "apps/kafka-proxy/src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@nrwl/node:execute",
"options": {
"buildTarget": "kafka-proxy:build"
}
},
"lint": {
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"config": "apps/kafka-proxy/.eslintrc",
"tsConfig": [
"apps/kafka-proxy/tsconfig.app.json",
"apps/kafka-proxy/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**", "!apps/kafka-proxy/**"]
}
},
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "apps/kafka-proxy/jest.config.js",
"tsConfig": "apps/kafka-proxy/tsconfig.spec.json",
"passWithNoTests": true
}
}
}
},
"shared": {
"root": "libs/shared",
"sourceRoot": "libs/shared/src",
"projectType": "library",
"schematics": {},
"architect": {
"lint": {
"builder": "@nrwl/linter:lint",
"options": {
"linter": "eslint",
"config": "libs/shared/.eslintrc",
"tsConfig": ["libs/shared/tsconfig.lib.json", "libs/shared/tsconfig.spec.json"],
"exclude": ["**/node_modules/**", "!libs/shared/**"]
}
},
"test": {
"builder": "@nrwl/jest:jest",
"options": {
"jestConfig": "libs/shared/jest.config.js",
"tsConfig": "libs/shared/tsconfig.spec.json",
"passWithNoTests": true
}
}
}
Expand Down
15 changes: 15 additions & 0 deletions apps/frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,19 @@ module.exports = {
// When using `Run test` directly in WebStorm, change the used config to
// this file i.e. `./frontend/jest.config.js` and not `<rootDir>/jest.config.js`.
setupFilesAfterEnv: ['./src/test-setup.ts'],

// https://github.com/thymikee/jest-preset-angular/issues/293#issuecomment-513544717
// When using `Run test` directly in WebStorm, the scss couldn't be loaded.
// - Error: connect ECONNREFUSED 127.0.0.1:80
// - Error: Uncaught (in promise): Failed to load *.component.scss
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json',
// stringifyContentPathRegex: '\\.html$',
// astTransformers: [
// 'jest-preset-angular/build/InlineFilesTransformer',
// 'jest-preset-angular/build/StripStylesTransformer',
// ],
},
},
};
6 changes: 6 additions & 0 deletions apps/frontend/proxy.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"/api": {
"target": "http://localhost:3333",
"secure": false
}
}
16 changes: 15 additions & 1 deletion apps/frontend/src/app/app.actions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
import { createAction } from '@ngrx/store';
import { createAction, props } from '@ngrx/store';
import { Topic } from '@talus/model';

const actionTypePrefix = '[app]';

export const wentOnline = createAction(`${actionTypePrefix} Went online`);
export const wentOffline = createAction(`${actionTypePrefix} Went offline`);

export const updateTopics = createAction(
`${actionTypePrefix} Update topics`,
props<{ topics: Topic[] }>(),
);
export const updateConnectionStatus = createAction(
`${actionTypePrefix} Update connection status`,
props<{ isConnectedToKafkaProxy: boolean }>(),
);
export const updateLastLoadedMessageOffset = createAction(
`${actionTypePrefix} Update last loaded message offset`,
props<{ offset: number }>(),
);
8 changes: 8 additions & 0 deletions apps/frontend/src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ main {
// https://stackoverflow.com/a/38383437
min-height: 0;
}

h6 {
margin-bottom: 0;

&:not(:first-child) {
margin-top: 1rem;
}
}
24 changes: 21 additions & 3 deletions apps/frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import * as fromApp from './app.reducer';
<main>
<ui-sidenav-shell>
<ui-sidenav-shell-left>
<h5>Tools</h5>
<h6 class="mat-h6">Tools</h6>
<fe-tools-panel></fe-tools-panel>
<h5>Options</h5>
<h6 class="mat-h6">Options</h6>
<fe-options-panel></fe-options-panel>
</ui-sidenav-shell-left>
Expand All @@ -33,7 +33,11 @@ import * as fromApp from './app.reducer';
</ui-sidenav-shell>
</main>
<ui-status-bar></ui-status-bar>
<ui-status-bar
[connected]="isConnectedToKafkaProxy$ | async"
[status]="topicName$ | async"
[progressValue]="topicLoadingProgressValue$ | async"
></ui-status-bar>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
styleUrls: ['./app.component.scss'],
Expand All @@ -46,6 +50,20 @@ export class AppComponent {
map(state => state.isDarkTheme),
);

topicName$: Observable<string | undefined> = this.store.pipe(
select(fromApp.selectSceneViewerContainerState),
map(state => state.topic),
);

isConnectedToKafkaProxy$: Observable<boolean> = this.store.pipe(
select(fromApp.selectSceneViewerContainerState),
map(state => state.isConnectedToKafkaProxy),
);

topicLoadingProgressValue$: Observable<number> = this.store.pipe(
select(fromApp.selectTopicLoadingProgressValue),
);

constructor(private store: Store<fromApp.State>, private renderer: Renderer2) {}

setTheme(isDarkTheme: boolean): void {
Expand Down
Loading

0 comments on commit 5cd33ec

Please sign in to comment.