LivelyKernel / LivelyKernel/lively.next
Getting configuration/env variables in frozen world and development environment
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 90
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
**What would you like to achieve?**
I'm passing a few configuration variables to the world in URL parameters, and getting them consistently is something I could use guidance on. The constraints are:
- In the frozen world, they need to be available on initialization
- They need to be settable from function calls /standard JavaScript `get`/`set` for development
I have a few options:
- create an object `GALYLEO_ENV` with the right properties
- export the properties from `GalyleoStudioWorld extends LivelyWorld` where, ideally, they are available as `$world` variables
At the moment, I'm exporting the `GALYLEO_ENV` global and initializing it in `GalyleoStudioWorld.onLoad()` but I would appreciate guidance on how to do it better.
```
$world.execCommand("open browser", {moduleName: "studio/ui.cp.js", packageName: "engageLively--galyleo-dashboard", codeEntity: "onLoad"});
```
**How are you trying to achieve that**
**Alternative solutions**
If applicable, what other solutions have you tried?
**Additional Resources**
Please provide links to any custom code that might be necessary to grasp your problem. Screenshots of custom component, etc. are also appreciated.
**Version**: Please paste the lively.next commit on which the problem occurred here (use the copy button of the Version Checker in the bottom left corner).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with GalyleoStudioWorld.onLoad() and the GALYLEO_ENV initialization described in the issue, then inspect studio/ui.cp.js and its onLoad entry point. Compare how URL parameters, frozen-world initialization, and standard JavaScript get/set calls should expose the configuration, and define a single supported approach for both environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100