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

VUU-333: Implement layout server #970

Merged
merged 255 commits into from
Nov 21, 2023
Merged

Conversation

pling-scottlogic
Copy link
Contributor

Description

Adds a Spring Boot server to manage layouts remotely, and introduces an environment variable for the front end to determine whether layouts are saved locally or remotely. This also handles "application layouts", which refer to all open tabs visible to the user.

Change List

vferraro-scottlogic and others added 12 commits November 8, 2023 16:57
* finos#900 disable failing test

* Update check on viewport and context menu (finos#913)

* remove reprecated Portal, fixes in COntextMenu

* use woff2 font, fix portal

* make sure ContextMenu always has theme attributes

* type fixes

* Tidy package and type issues (finos#914)

* fix package references, type issues

* add typescript config for correct auto import resolution

* Layout Management (finos#916)

* fix vuu-filters types

* drawer and dialog fix

* drag drop flexbox editable

* Update vuu-ui/packages/vuu-filters/src/filter-utils.ts

Whitespace between guard clauses

Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>

* layout header

* restore double quotes

* layout-provider

* layout-reducer

* layout-view

* palette

* palette

* placeholder

* layout-view decomment

* registry

* rollback multi filter dropdown

* stack

* tabs

* config wrapper

* tools

* utils

* layout top level

* revert flexbox layout change

* restore lost semicolon

* missing space

* change action to a type union

* Update README.md

* Sync with Finos main

* VUU-41 style fixes

* VUU-41 rename css variable to --vuu

* Manage layout persistence via interface (#55)

* VUU-27 interface to return promises

* VUU-47 add methods for loading and saving tempLayout

* VUU-47 use loadLayoutById in LayoutList

* VUU-47 remove unused files

* VUU-47 update other examples to use new hook

* Calculated column (finos#882)

* calculated column in settings, instrument search

* additional mock data sources

* instrument tiles

* calculated column editing

* measured-container

* Row used columnMap rathe than column key

* full keyboard nav for table

* fix drag drop in column group headerr

* use MeasuredContainer for Table List

* table cell editing updates datasource

* table editing

* fix type issues

* fix old background renderer

* remove outdated import in showcase story

* exclude PatternValidator from semgrep

* add vuu tooltip component (finos#885)

* VUU-47 improve naming

* VUU-47 use placeholder in defaultLayout

* VUU-47 update docs with new naming

* remove duplicate CSS

* VUU-47 fix layoutList styling

* VUU-47 add loaded layouts to layout view

* VUU-47 rename currentLayout to applicationLayout

* VUU-47 make defaultLayout closeable and update features

* VUU-27 interface to return promises

* VUU-54: Validate IDs in LocalLayoutPersistenceManager

* VUU-54: Mock get/saveLocalEntity

* VUU-54: Refactor promises

* VUU-54: Remove unnecessary asyncs

* VUU-54: Use string union to distinguish layouts/metadata

* VUU-54: Rename variables

* VUU-54: Convert layout types to interfaces

* VUU-54: Extract loadAndFilter method

* VUU-54: Replace filter with find

* VUU-54: Rename validateId variables

* VUU-54: Change vars to lets

* VUU-54: Update imports for consistency

* VUU-54: Add comment to explain filter(Boolean)

* VUU-54: Refactor tests

* VUU-54: Extract expectError

* VUU-54: Remove loadAndFilter method

* VUU-54: Remove removeEntry method

* VUU-52: Add E2E tests to CI

* VUU-52: Use commit hash for cypress-io

* VUU-52: Add comment to explain full SHA

* VUU-47 rename imports

* VUU-59 set up notification context

* VUU-47 fix cypress test

* Update vuu-ui/packages/vuu-layout/src/layout-persistence/LayoutPersistenceManager.ts

Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>

* VUU-47 remove unused import

* VUU-59 notifications with animation

* VUU-59 revert changes to imports

* VUU-59 change toast timeout

* VUU-59 change notificationType to enum

* VUU-59 improvements to example and add comments

---------

Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: cfisher-scottlogic <cfisher@scottlogic.com>
Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: heswell <steve@heswell.com>

* add Layout Management Provider to sample apps (finos#917)

* add Layout Management Provider to sample apps

* fix test dependencies

* Drag drop provider (finos#918)

* add DragDrop example, resume drag in DragProvider

* full flow for remote drag

* fix type issues

* fix post rebase conflicts, type issues

* ignore type issue in drag drop code for now, so packages build

* Filterbar styling (finos#919)

* improve the keyboards navigation in Toolbar

* fix form control styling, uennecessaryb layout rerenders, table resize bug

* make sure all table config setting changes are saved, style tweaks

* calculated columns

* fix dropdown width

* fix width of combo in SaveLayout Panel

* remove console.log

* fix bug in OverflowContainer when orientation vertical

* remove global error listener, leave this to cypress

* move test schemas out of showcase (finos#920)

* Update dependency electron to v22 [SECURITY] (finos#894)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* bump vite, vitest versions to latest (finos#921)

* Instrument picker (finos#923)

* make instrument-picker more generic

* refactor Table navigation, preparing for row highlighting

* fix broken import paths

* add empty inlined worker as vitext mocj fails otherwise

* reinstate ignore for inlined-wotker so stub file doesn't get overwritten (finos#924)

* disable basket functionality in showcase while we wait for full server (finos#925)

* disable basket functionality in showcase while we wait for server implementation

* remove console log

* fix styling of main tabs during drag (finos#929)

* wiring together calculated column pieces (finos#931)

* wiring together calculated column pieces

* remove logging

* re-enable all tests

* fix FilterTable resize bug (finos#932)

* move table height fix to measured container (finos#933)

* type fixes (finos#934)

* final styling for calculated column input (finos#935)

* connect filterbar to persistence (finos#936)

* connect filterbar to persistence

* skip test for missing TreeWalker finctionality until its there

* final adjustments to table column header styling (finos#937)

* move date generators to test data package (finos#938)

* Bump postcss from 8.4.27 to 8.4.31 in /vuu-ui (finos#926)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* finos#850 added for functionality to the rpc service, not ready for the big time yet, but not far off.

* finos#850 added ability to reference tables in separate modules.

* finos#850 refactored simul module to take prices out to prices module

* finos#850 refactored tableDefContainer to make it an implicit, otherwise it is re-used in the tests causing issues.

* finos#850 found a bug with basket constituents, not resolved as of this commit.

* finos#850 found a bug with basket constituents, not resolved as of this commit.

* Update basket tables UI (finos#940)

* update all basket tables, integrate basket server changes

* filter basket tables when loading

* connect cell editing

* remove console log

* fix newFeature story

* remove console log

* fix for dropdown width error

* remove console.log

* basket workflow (finos#941)

* Login panel (finos#942)

* login panel

* WIP

* tidy up type issues etc

* import fixes

* remove deprecated example

* finos#944 Added fix for threading related issue in ViewPortContainer.scala when change was called.

* finos#944 Reduced logging

* Switch UI to new Theme (finos#943)

* remove sample app

* rename basket trading app to sample-app

* fix broken inmports

* fix bugs persistning table settings

* 862 create a basketdesign table that represents the specific instance of a basket that we are modifying it will be based on a basket entry but can be customized to what the user needs (finos#948)

* finos#862 Fixed test versions to abstract out clock.

* finos#862 Added Viewport scoped rpc service to test.

* finos#862 Added ability to edit baskets join service.

* Fix minor UI issues (finos#949)

* fix UI dataTable issue - bugs after resize

A column resize operation populates the ColumnState state value. From
this point on columnState shadows modelColumns so subsequent changes
to modelColumns are not rendered.

* enable custom editors for cell renderers

Column Settings Panel allows a custom renderer to be selected.
Some renderers will have settings of their own. This enables
editors form those settings to be made available.

* fix type issue

* update baskets used in showcase examples to match server tables (finos#950)

* add initial support for columns backed by lookup tables (finos#951)

* move basket data generation into simulated vuu module to pave way for rpc support

* add updater for prices, insert for array data source

* create Table for test data in modules

* fix scrolling issue in table when focusing edit fields

* add initial support for table columns backed by lookup tables

* wire table cell editing to server calls (finos#953)

* Schema load sequence (finos#955)

* cache table meta requests with promise to avoid multiple server requests

* ensure table meta is loaded before client is notified of subcribe

table meta for all tables was being requested from server every
time any hook asked for the table data. This was happening twice
at startup. Now we cache the metadata.
If we didn't have table meta at point where CREATE_VP_SUCCESS was
handled, we notified client anyway. This caused tables to be rendered
with no type information, so alignment was wrong on numerics.

* fix all data tests

* Merge persistence manager generator approaches

* Fix duplicated NavigationStyle export in `TableNext.examples.tsx`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: keikeicheung <keikei274@gmail.com>
Co-authored-by: heswell <steve@heswell.com>
Co-authored-by: Vasco <98337074+vferraro-scottlogic@users.noreply.github.com>
Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris <chris.stevenson@gmail.com>
Co-authored-by: chrisjstevo <chrisjstevo@users.noreply.github.com>
- Header alignment
- Border
- Fonts
- 'Close' button
- Body padding
* finos#900 disable failing test

* Update check on viewport and context menu (finos#913)

* remove reprecated Portal, fixes in COntextMenu

* use woff2 font, fix portal

* make sure ContextMenu always has theme attributes

* type fixes

* Tidy package and type issues (finos#914)

* fix package references, type issues

* add typescript config for correct auto import resolution

* Layout Management (finos#916)

* fix vuu-filters types

* drawer and dialog fix

* drag drop flexbox editable

* Update vuu-ui/packages/vuu-filters/src/filter-utils.ts

Whitespace between guard clauses

Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>

* layout header

* restore double quotes

* layout-provider

* layout-reducer

* layout-view

* palette

* palette

* placeholder

* layout-view decomment

* registry

* rollback multi filter dropdown

* stack

* tabs

* config wrapper

* tools

* utils

* layout top level

* revert flexbox layout change

* restore lost semicolon

* missing space

* change action to a type union

* Update README.md

* Sync with Finos main

* VUU-41 style fixes

* VUU-41 rename css variable to --vuu

* Manage layout persistence via interface (#55)

* VUU-27 interface to return promises

* VUU-47 add methods for loading and saving tempLayout

* VUU-47 use loadLayoutById in LayoutList

* VUU-47 remove unused files

* VUU-47 update other examples to use new hook

* Calculated column (finos#882)

* calculated column in settings, instrument search

* additional mock data sources

* instrument tiles

* calculated column editing

* measured-container

* Row used columnMap rathe than column key

* full keyboard nav for table

* fix drag drop in column group headerr

* use MeasuredContainer for Table List

* table cell editing updates datasource

* table editing

* fix type issues

* fix old background renderer

* remove outdated import in showcase story

* exclude PatternValidator from semgrep

* add vuu tooltip component (finos#885)

* VUU-47 improve naming

* VUU-47 use placeholder in defaultLayout

* VUU-47 update docs with new naming

* remove duplicate CSS

* VUU-47 fix layoutList styling

* VUU-47 add loaded layouts to layout view

* VUU-47 rename currentLayout to applicationLayout

* VUU-47 make defaultLayout closeable and update features

* VUU-27 interface to return promises

* VUU-54: Validate IDs in LocalLayoutPersistenceManager

* VUU-54: Mock get/saveLocalEntity

* VUU-54: Refactor promises

* VUU-54: Remove unnecessary asyncs

* VUU-54: Use string union to distinguish layouts/metadata

* VUU-54: Rename variables

* VUU-54: Convert layout types to interfaces

* VUU-54: Extract loadAndFilter method

* VUU-54: Replace filter with find

* VUU-54: Rename validateId variables

* VUU-54: Change vars to lets

* VUU-54: Update imports for consistency

* VUU-54: Add comment to explain filter(Boolean)

* VUU-54: Refactor tests

* VUU-54: Extract expectError

* VUU-54: Remove loadAndFilter method

* VUU-54: Remove removeEntry method

* VUU-52: Add E2E tests to CI

* VUU-52: Use commit hash for cypress-io

* VUU-52: Add comment to explain full SHA

* VUU-47 rename imports

* VUU-59 set up notification context

* VUU-47 fix cypress test

* Update vuu-ui/packages/vuu-layout/src/layout-persistence/LayoutPersistenceManager.ts

Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>

* VUU-47 remove unused import

* VUU-59 notifications with animation

* VUU-59 revert changes to imports

* VUU-59 change toast timeout

* VUU-59 change notificationType to enum

* VUU-59 improvements to example and add comments

---------

Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: cfisher-scottlogic <cfisher@scottlogic.com>
Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: heswell <steve@heswell.com>

* add Layout Management Provider to sample apps (finos#917)

* add Layout Management Provider to sample apps

* fix test dependencies

* Drag drop provider (finos#918)

* add DragDrop example, resume drag in DragProvider

* full flow for remote drag

* fix type issues

* fix post rebase conflicts, type issues

* ignore type issue in drag drop code for now, so packages build

* Filterbar styling (finos#919)

* improve the keyboards navigation in Toolbar

* fix form control styling, uennecessaryb layout rerenders, table resize bug

* make sure all table config setting changes are saved, style tweaks

* calculated columns

* fix dropdown width

* fix width of combo in SaveLayout Panel

* remove console.log

* fix bug in OverflowContainer when orientation vertical

* remove global error listener, leave this to cypress

* move test schemas out of showcase (finos#920)

* Update dependency electron to v22 [SECURITY] (finos#894)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* bump vite, vitest versions to latest (finos#921)

* Instrument picker (finos#923)

* make instrument-picker more generic

* refactor Table navigation, preparing for row highlighting

* fix broken import paths

* add empty inlined worker as vitext mocj fails otherwise

* reinstate ignore for inlined-wotker so stub file doesn't get overwritten (finos#924)

* disable basket functionality in showcase while we wait for full server (finos#925)

* disable basket functionality in showcase while we wait for server implementation

* remove console log

* fix styling of main tabs during drag (finos#929)

* wiring together calculated column pieces (finos#931)

* wiring together calculated column pieces

* remove logging

* re-enable all tests

* fix FilterTable resize bug (finos#932)

* move table height fix to measured container (finos#933)

* type fixes (finos#934)

* final styling for calculated column input (finos#935)

* connect filterbar to persistence (finos#936)

* connect filterbar to persistence

* skip test for missing TreeWalker finctionality until its there

* final adjustments to table column header styling (finos#937)

* move date generators to test data package (finos#938)

* Bump postcss from 8.4.27 to 8.4.31 in /vuu-ui (finos#926)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* finos#850 added for functionality to the rpc service, not ready for the big time yet, but not far off.

* finos#850 added ability to reference tables in separate modules.

* finos#850 refactored simul module to take prices out to prices module

* finos#850 refactored tableDefContainer to make it an implicit, otherwise it is re-used in the tests causing issues.

* finos#850 found a bug with basket constituents, not resolved as of this commit.

* finos#850 found a bug with basket constituents, not resolved as of this commit.

* Update basket tables UI (finos#940)

* update all basket tables, integrate basket server changes

* filter basket tables when loading

* connect cell editing

* remove console log

* fix newFeature story

* remove console log

* fix for dropdown width error

* remove console.log

* basket workflow (finos#941)

* Login panel (finos#942)

* login panel

* WIP

* tidy up type issues etc

* import fixes

* remove deprecated example

* finos#944 Added fix for threading related issue in ViewPortContainer.scala when change was called.

* finos#944 Reduced logging

* Switch UI to new Theme (finos#943)

* remove sample app

* rename basket trading app to sample-app

* fix broken inmports

* fix bugs persistning table settings

* 862 create a basketdesign table that represents the specific instance of a basket that we are modifying it will be based on a basket entry but can be customized to what the user needs (finos#948)

* finos#862 Fixed test versions to abstract out clock.

* finos#862 Added Viewport scoped rpc service to test.

* finos#862 Added ability to edit baskets join service.

* Fix minor UI issues (finos#949)

* fix UI dataTable issue - bugs after resize

A column resize operation populates the ColumnState state value. From
this point on columnState shadows modelColumns so subsequent changes
to modelColumns are not rendered.

* enable custom editors for cell renderers

Column Settings Panel allows a custom renderer to be selected.
Some renderers will have settings of their own. This enables
editors form those settings to be made available.

* fix type issue

* update baskets used in showcase examples to match server tables (finos#950)

* add initial support for columns backed by lookup tables (finos#951)

* move basket data generation into simulated vuu module to pave way for rpc support

* add updater for prices, insert for array data source

* create Table for test data in modules

* fix scrolling issue in table when focusing edit fields

* add initial support for table columns backed by lookup tables

* wire table cell editing to server calls (finos#953)

* Schema load sequence (finos#955)

* cache table meta requests with promise to avoid multiple server requests

* ensure table meta is loaded before client is notified of subcribe

table meta for all tables was being requested from server every
time any hook asked for the table data. This was happening twice
at startup. Now we cache the metadata.
If we didn't have table meta at point where CREATE_VP_SUCCESS was
handled, we notified client anyway. This caused tables to be rendered
with no type information, so alignment was wrong on numerics.

* fix all data tests

* Issue 850 added the first example module test for rpc services  (finos#954)

* finos#850 Refactored example code so that simulation is in its own module

* finos#850 Refactored example code into its own module

* finos#850 updated documentation

* finos#850 organized imports

* finos#850 added first consumer test outline

* finos#850 added ability to create viewport in test easily

* finos#850 added ability to create viewport in test easily

* finos#850 added first example working test calling viewport Rpc call.

* finos#850 renamed test case.

* finos#850 Added example flow for baskets

* finos#850 Added additional example for editRowAction

* finos#850 Added additional methods for editable example.

* finos#850 Added additional methods for editable example.

* finos#850 Added more functionality to the demo basket app.

* finos#850 Added thorough test of basket functionality.

* finos#850 Fixed test assert which accidentally changed contract in test.

* finos#850 Fixed test assert which accidentally changed contract in test.

* finos#850 Fixed test assert which accidentally changed contract in test.

* finos#850 fixed the bad pom definition.

* finos#850 deleted duplicate and not required config and updated semgrep.

* Release 0.9.20 beta (finos#956)

* [maven-release-plugin] prepare release vuu-parent-0.9.20-beta

* [maven-release-plugin] prepare for next development iteration

---------

Co-authored-by: GitHub Actions <actions@github.com>

* finos#957 added all projects to release build. (finos#960)

* finos#957 added all projects to release build.

* finos#957 added all projects to release build.

* finos#957 added all projects to release build.

* Release 0.9.33 beta (finos#961)

* [maven-release-plugin] prepare release vuu-parent-0.9.33-beta

* [maven-release-plugin] prepare for next development iteration

---------

Co-authored-by: GitHub Actions <actions@github.com>

* finos#957 fixed issue with javadoc. (finos#963)

* Release 0.9.35 beta (finos#964)

* [maven-release-plugin] prepare release vuu-parent-0.9.35-beta

* [maven-release-plugin] prepare for next development iteration

---------

Co-authored-by: GitHub Actions <actions@github.com>

* enable context menu on basket constituents (finos#965)

* fix behaviour in baskets module in data-test

* fix pinned column rendering gap

* enable context menu in basket constituent table in basket feature

* remove console log

* Fix conflict resolutions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: keikeicheung <keikei274@gmail.com>
Co-authored-by: heswell <steve@heswell.com>
Co-authored-by: Vasco <98337074+vferraro-scottlogic@users.noreply.github.com>
Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris <chris.stevenson@gmail.com>
Co-authored-by: chrisjstevo <chrisjstevo@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
# Conflicts:
#	vuu-ui/packages/vuu-data-react/src/hooks/useVuuMenuActions.ts
#	vuu-ui/packages/vuu-data/src/connection-manager.ts
#	vuu-ui/packages/vuu-data/src/inlined-worker.js
#	vuu-ui/packages/vuu-data/src/json-data-source.ts
#	vuu-ui/packages/vuu-data/src/remote-data-source.ts
#	vuu-ui/packages/vuu-layout/src/layout-persistence/LayoutPersistenceManager.ts
#	vuu-ui/packages/vuu-layout/src/layout-persistence/LocalLayoutPersistenceManager.ts
#	vuu-ui/packages/vuu-layout/src/layout-persistence/index.ts
#	vuu-ui/packages/vuu-layout/src/layout-persistence/useLayoutContextMenuItems.tsx
#	vuu-ui/packages/vuu-layout/test/layout-persistence/LocalLayoutPersistenceManager.test.ts
#	vuu-ui/packages/vuu-popups/src/dialog/useDialog.tsx
#	vuu-ui/packages/vuu-shell/src/layout-management/LayoutList.tsx
#	vuu-ui/packages/vuu-shell/src/layout-management/SaveLayoutPanel.css
#	vuu-ui/packages/vuu-shell/src/layout-management/layoutTypes.ts
#	vuu-ui/packages/vuu-shell/src/layout-management/useLayoutManager.tsx
#	vuu-ui/packages/vuu-shell/src/shell.tsx
#	vuu-ui/packages/vuu-table/src/table-next/useDataSource.ts
#	vuu-ui/packages/vuu-theme/fonts/NunitoSans.css
#	vuu-ui/sample-apps/feature-basket-trading/src/new-basket-panel/NewBasketPanel.css
#	vuu-ui/sample-apps/feature-filter-table/src/useFilterTable.tsx
#	vuu-ui/tsconfig.json
Copy link

netlify bot commented Nov 14, 2023

Deploy Preview for papaya-valkyrie-395400 canceled.

Name Link
🔨 Latest commit 9d060cf
🔍 Latest deploy log https://app.netlify.com/sites/papaya-valkyrie-395400/deploys/655b8aecd1af5f0008a7bd34

Copy link
Contributor

@heswell heswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm seeing errors on some operations.

  1. The initial save for a new user saves application.json twice. I suspect this is unnecessary and could be reduced to a single call (its probably a longstanding issue)
    However, it causes an exception on the server
exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint ["PUBLIC.PRIMARY_KEY_2 ON PUBLIC.APPLICATION_LAYOUT(USERNAME) VALUES ( /* 1 */ 'vuu-user' )"; SQL statement:
insert into application_layout (definition, username) values (?, ?) [23505-214]]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement] with root cause

org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Unique index or primary key violation: "PUBLIC.PRIMARY_KEY_2 ON PUBLIC.APPLICATION_LAYOUT(USERNAME) VALUES ( /* 1 */ 'vuu-user' )"; SQL statement:
insert into application_layout (definition, username) values (?, ?) [23505-214]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:508) ~[h2-2.1.214.jar!/:na]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) ~[h2-2.1.214.jar!/:na]

When I try to save a layout, I also see an exception, look slike the data is too big

exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement] with root cause

org.h2.jdbc.JdbcSQLDataException: Value too long for column "DEFINITION CHARACTER VARYING(255)": "'{""id"":""5WpjhdJwWI3ClI1XYzeJu"",""type"":""Flexbox"",""props"":{""active"":0,""splitterSiz... (3416)"; SQL statement:
insert into layout (definition, metadata_id, id) values (?, ?, ?) [22001-214]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:506) ~[h2-2.1.214.jar!/:na]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) ~[h2-2.1.214.jar!/:na]
	at org.h2.message.DbException.get(DbException.java:223) ~[h2-2.1.214.jar!/:na]
	at org.h2.message.DbException.getValueTooLongException(DbException.java:322) ~[h2-2.1.214.jar!/:na]
	at org.h2.value.Value.getValueTooLongException(Value.java:2573) ~[h2-2.1.214.jar!/:na]
	at org.h2.value.Value.convertToVarchar(Value.java:1261) ~[h2-2.1.214.jar!/:na]
	at org.h2.value.Value.convertTo(Value.java:1117) ~[h2-2.1.214.jar!/:na]

@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("http://127.0.0.1:5173")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works for showcase, but not the sample app.
can we add "https://localhost:8443", that will work for the default Vuu deployment

Should probably to think about making this a configuration option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: b55f1e4

@pling-scottlogic
Copy link
Contributor Author

When I try to save a layout, I also see an exception, look slike the data is too big

exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement] with root cause

org.h2.jdbc.JdbcSQLDataException: Value too long for column "DEFINITION CHARACTER VARYING(255)": "'{""id"":""5WpjhdJwWI3ClI1XYzeJu"",""type"":""Flexbox"",""props"":{""active"":0,""splitterSiz... (3416)"; SQL statement:
insert into layout (definition, metadata_id, id) values (?, ?, ?) [22001-214]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:506) ~[h2-2.1.214.jar!/:na]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) ~[h2-2.1.214.jar!/:na]
	at org.h2.message.DbException.get(DbException.java:223) ~[h2-2.1.214.jar!/:na]
	at org.h2.message.DbException.getValueTooLongException(DbException.java:322) ~[h2-2.1.214.jar!/:na]
	at org.h2.value.Value.getValueTooLongException(Value.java:2573) ~[h2-2.1.214.jar!/:na]
	at org.h2.value.Value.convertToVarchar(Value.java:1261) ~[h2-2.1.214.jar!/:na]
	at org.h2.value.Value.convertTo(Value.java:1117) ~[h2-2.1.214.jar!/:na]

We have fixed this by using a different type to model the definition. This is something we were working on anyway, as it means the definition is fully embedded within the JSON of the request (providing implicit validation of the JSON structure). The fix was merged into the base branch under this PR.

@pling-scottlogic
Copy link
Contributor Author

The initial save for a new user saves application.json twice. I suspect this is unnecessary and could be reduced to a single call (its probably a longstanding issue)
However, it causes an exception on the server

exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint ["PUBLIC.PRIMARY_KEY_2 ON PUBLIC.APPLICATION_LAYOUT(USERNAME) VALUES ( /* 1 */ 'vuu-user' )"; SQL statement:
insert into application_layout (definition, username) values (?, ?) [23505-214]]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement] with root cause

org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Unique index or primary key violation: "PUBLIC.PRIMARY_KEY_2 ON PUBLIC.APPLICATION_LAYOUT(USERNAME) VALUES ( /* 1 */ 'vuu-user' )"; SQL statement:
insert into application_layout (definition, username) values (?, ?) [23505-214]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:508) ~[h2-2.1.214.jar!/:na]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) ~[h2-2.1.214.jar!/:na]

We've not been able to reproduce this error. Can we discuss it together next week?

* SLVUU-113: Add `process.env.LOCAL` flag to `esbuild.mjs`

* SLVUU-113: Remove runtime null coalescence of envar

* SLVUU-113: Add BASE_URL envar to sample-app's esbuild.mjs

* SLVUU-113: Add BASE_URL envar to showcase's vite.config.js
@heswell heswell merged commit 0badbdc into finos:main Nov 21, 2023
8 checks passed
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.

7 participants