question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tech: Centralize all user settings in single service that also handles cascading.

See original GitHub issue

Feature Request

Description

This is a tech story with no value for the user, but still important for future features.

The single service centralizes all settings a user can set. Modules are notified of changes using something like rx.js.

Cascading means that settings can overwrite each other if they are from different sources. F.ex. the default settings can be overwritten by url parameters.

TODO

  • map is immutable, take map out of settings, markingPackage in settings instead in map
  • Simplify settings to only handle getting and updating settings from partial settings objects
  • Updated settings object, which uses three sub-objects. See interface codeCharta.model.ts#L32
  • Create codeCharta.model.ts file which holds all globally needed interfaces
  • Create codeCharta.service.ts file which combines simplified functionality from former codeCharta.component, data.service, data.validator.service, data.loading.service. The codeCharta.service.ts get called from codeCharta.component and is supposed to be the global connection to the core functionality like onLoadApplication
  • Deleted data.service, data.validator.service, data.loading.service
  • Implement ScenarioService behaviour onLoad and onFileImport(?)
  • Merge fileSettings from visible CCFiles into settingsService.settings.fileSettings
  • Check if #352 is fixed
  • Implement UrlUtils which updates the settings. Don’t forget about the mode=Delta
  • Update content of the dialog when clicking URL Parameters button inside sidebar. Only show file and mode keys
  • Remove URL Parameters functionality from UrlLUtils and SettingsService, but keep option to import files and set a mode (renderState) from within the url
  • Adapt the new settings/fileState/metric behaviour step by step to the UI components
  • Adapt all tests and try to follow the scheme for setting all objects like nodeContextMenu.component.spec.ts
  • Everywhere -> Remove unused injections
  • scenarioHelper -> Refactor getScenarioByName array[string]
  • Tests -> update skipped Tests
  • settingsService -> onCameraChanged
  • fix latency issue with gitignore search/blacklist

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Richarghcommented, Jan 29, 2019
  • Going reactive is an interesting choice. Should work well with Typescript async/await.
  • I think of settings the way CSS thinks about styles. It goes from general to specific:, global -> tags -> classes -> ids. I probably missed some CSS stuff in there. The more specific CSS style overwrites the more general style.
  • What does that mean for our settings, they also go from general to specific: default -> application -> user -> file. That’s my initial ordering at least. The more specific one overwrites the more general one. This would mean file overwrites user, which does sound strange, now that I have written it. Something to ponder I guess.
  • Unlike CSS our settings have things that do not make sense to specify on all levels. ** A user can have a list of “recent files” he openend in the standalone. That only makes sense to store in the user settings. A user might also prefer to view the CodeMap by default from the top. That to me are user settings. You have them in almost all programs and they are usually stored in something like user.properties.

… I would go on but I think my sentences only go longer and less coherent. I’ll sleep about it and talk some more in two weeks 😃 If you have a solution by then it’s fine by me 😄

0reactions
Richarghcommented, Mar 22, 2019

Url Parameter can probably be removed. The only useful feature is opening specific files in normal, multiple or delta mode.

I’ll check with the teams.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microservice Architecture and its 10 Most Important Design ...
Every business Application has many configuration parameters for various Infrastructure (e.g., Database, Network, connected Service addresses, ...
Read more >
Hibernate: When should I use Cascade.ALL and when ...
java. It defines “cascade=CascadeType. ALL” and it essentially means that any change happened on EmployeeEntity must cascade to AccountEntity ...
Read more >
Navigation options for SharePoint Online
This article describes navigation options sites with SharePoint Publishing enabled in SharePoint Online.
Read more >
Building member trust through a centralized and scalable ...
The setting values service acts as a central access point for all settings across LinkedIn, and also provides a centralized database for storing ......
Read more >
What is Software Defined Networking? SDN Explained
A single change can have a cascading effect on the network performance and has the potential to bring down the entire network.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found