LivelyKernel / LivelyKernel/lively.next

Getting configuration/env variables in frozen world and development environment

Open
#1,756 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

📟 support inquiry
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.