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

SLVUU-127: Include username in local storage layout key #132

Closed
wants to merge 38 commits into from

Conversation

pling-scottlogic
Copy link

Description

When using the local implementation of layout management, the relevant information is saved to local storage under the keys layouts/layouts, layouts/metadata and api/vui. This can cause problems once a second user is introduced, so we change the keys here to include a username. We also add the username to cookies for the NewTheme showcase example, matching the behaviour of the sample app.

Change List

  • Add username to local storage keys (application layout, layout and metadata)
  • Convert private functions in LocalLayoutPersistenceManager to arrow functions
  • Get actual username from cookies
  • Add username to cookies for showcase example

Testing

Saving and loading layouts tested using local and remote implementations, from both showcase and sample app.

Copy link

@vferraro-scottlogic vferraro-scottlogic left a comment

Choose a reason for hiding this comment

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

I have added a couple of comments on how to tidy up the signature of the arrow functions inside LocalLayoutPersistenceManager class

@pling-scottlogic pling-scottlogic force-pushed the SLVUU127-local-storage-keys branch from 8b7ffa3 to 5800579 Compare December 14, 2023 17:29
heswell and others added 22 commits December 18, 2023 10:47
* allow more recent react versions

* allow more recent react versions

* allow more recent react versions
* SLVUU-49: Improve selectors for screenshot test

* SLVUU-49: Implement POM for ShellWithNewTheme

* SLVUU-49: Implement POM for SaveLayoutDialog and LayoutList

* SLVUU-49: Use existing function to format date

* SLVUU-49: Give accessible name to context menu buttons

* SLVUU-49: Rename layouts tab list

* SLVUU-49: Improve user flow to get layout tile

Includes refactor of LayoutList:
- Extract LayoutTile from LayoutList
- Nest grouped lists inside overall list
- Add accessible selectors

* SLVUU-49: Convert cypress files to Typescript

* SLVUU-49: Wrap LayoutTile with list item

* SLVUU-49: Rename tab list

* SLVUU-49: Include .ts files in tsconfig.json

* SLVUU-49: Refactor POM

* SLVUU-49: Refactor LayoutTile

* SLVUU-49: Extract LayoutTile
* SLVUU-101 improve take screenshot functionality

* SLVUU-101 tidy up takescreenshot code

* SLVUU-101 fix unit tests

* SLVUU-101 remove redundant css class and styling

* SLVUU-101 extract ternary operation in useMemo

* SLVUU-101 add comment to takeScreenshot filter
* all packages typecheck

* fix all type issues

* omit build script from semgrep

* omit build script from semgrep

* fix final type issues

* bump version of salt

* WIP

* refactor dialog to use native html element, discard scrim

* WIP table styling

* fix styling issues in checkbox, switch

* rename KatoutPersistende to Persistence

* add misisng hook dependency

* fix persistence manager tests broken by file rename

* move screenshot utils from utils to shell

* move from classnames to clsx

* fix classnames import
* bump versions of vite and esbuild

* try localhost in cypress config

* remove config on open
… fixed a big jump at doWidenBidAndAsk (ric not in states)
…#1087)

* finos#1073 enable date/time pattern selection through ColumnSettings

- converges date and time column types to one unified date/time type, consistent
  with how some major programming languages handles datetime.
- date/time pattern selection is only available for columns with "date/time" type.
- changes DateTimePattern to be an object instead of strings to enable
  simultaneous selection of both date and time patterns.
- also moves DateTimeColumnDescriptor to vuu-table-types package for consistency.

* finos#1073 add ability to switch inferred column type for long columns

- users can now declare the type of long columns as plain number or
  date/time.
- removed isSimpleColumnType as its no longer needed.
- added a timestamps (long) column in showcase's instruments-extended
  table.

* finos#1073 use unformatted initial value for input-cell renderers

* finos#1073 only show supported cell renderers for boolean columns
* fix double add button on column header, basket edit

* fix fade behaviour of Background Cell Renderer, add example

* switch RCP message types to RPC
junaidzm13 and others added 16 commits January 3, 2024 08:56
* finos#1096 add lint and typecheck to test-ui CI/CD workflow

- Our current CI/CD workflow is unable to catch any linting or
  typecheck errors. Adding these checks will help catch them
  before they are committed into main.
- This change also defines a new action `setup-vuu-ui` which
  abstracts away common steps for ui jobs leading to better
  modularity and reusability.

* finos#1096 fix eslint related errors

- eslint will ignore inlined-worker.js since its auto-generated.
- lint script to also include .ts,.tsx files.
- for now I've changed `@typescript-eslint/no-unused-vars` to
  only emit a warning as there are quite a few places where
  this rule is violated. Fixing all those with this MR
  would result in quite a big change.
- we can do a separate follow-up change to fix all those and
  then revert to emitting errors for unused vars.

* finos#1096 fix path casing for Tooltip.examples.tsx
* persist basket table column changes

* save entire table config for basket tables
…ndling when it errors & sourcing test resources for test
@pling-scottlogic pling-scottlogic force-pushed the SLVUU127-local-storage-keys branch from 5800579 to e7e868f Compare January 4, 2024 15:26
@pling-scottlogic
Copy link
Author

PR raised to Finos

@pling-scottlogic
Copy link
Author

PR raised to Finos

PR merged

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.

use username to save ApplicationLayout in local storage
8 participants