Speckle default globals customization

Hi all,

We are thinking of adding a bit of customization to the default (placeholder) globals. We have two changes in mind and wanted to get feedback before we dove into the coding:

  1. Specify the list of placeholder globals in an env variable, as opposed to being hardcoded.
  2. Add an env variable called something like ADD_DEFAULT_GLOBALS_ON_CREATE that will be defaulted to false, but will add the placeholder variables on stream creation.

Why? This allows server admins to set up specific variables (for example, project code, name, region, discipline…) to encourage consistency across an organization.

We know that improvements to Projects and Teams are on the roadmap, so this proposal is limited in scope to not add any new complexity to the UI and UX.

3 Likes

Sounds good! How about we figure out a way to save this settings in the server_config table and expose these options (both create globals on init, and the placeholder globals object) via the admin settings?

I would prefer this route over env variables as they make the actual config more user friendly, and you wouldn’t need to fiddle with env vars, restart the server to actually pick it up, etc.

3 Likes

That sounds good! We’ll do it that way

Sorry to dig this up, but was the default global management ever added?

Hey @Shem_Nor ,

It was not, actually. The Globals functionality doesn’t seem to have picked up much over the past years and I’m also not too sure it’ll make it in the new frontend…

Could you tell us a bit more about your use case and needs? :slight_smile:

Im working with @dvalent on the Atkins’ labs and we are currently discussing using globals to manage data thats input when a project stream is originated. We are already managing this via a custom branch, but globals offer a UI so we wanted to take advantage of it.

I guess, if there are plans of dropping the UI from the frontend, we might not bother at all?

Gotcha!
The current implementation of Globals has nothing special to it, it is essentially a branch that is hidden by default in a few places. With the new frontend and move to projects and models, I think we can find a better way to deal with project data. It would be great to hear your requirements around this.

Nevertheless, if you see value in the current way globals work, you could take its UI from the existing frontend and have it live in a custom Speckle App whenever the time comes…

1 Like

We are on the same page, thank you!