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

Document configuring AMD modules via [config, amd] #8997

Closed
mrclay opened this Issue Oct 2, 2015 · 6 comments

Comments

Projects
None yet
2 participants
@mrclay
Member

mrclay commented Oct 2, 2015

This lets us sneak server-side data to modules via the elgg/require_config module. The idea is to eliminate the need for PHP modules just to pass a bit of server data in.

@hypeJunction

This comment has been minimized.

Show comment
Hide comment
@hypeJunction

hypeJunction Oct 2, 2015

Contributor

This is very interesting, I didn't realize we could. Looking forward to learning more.

Contributor

hypeJunction commented Oct 2, 2015

This is very interesting, I didn't realize we could. Looking forward to learning more.

@hypeJunction

This comment has been minimized.

Show comment
Hide comment
@hypeJunction

hypeJunction Oct 2, 2015

Contributor

🎱 Though it would be cooler to just attach it to elgg.config so it's available across all modules.

Contributor

hypeJunction commented Oct 2, 2015

🎱 Though it would be cooler to just attach it to elgg.config so it's available across all modules.

@hypeJunction

This comment has been minimized.

Show comment
Hide comment
@hypeJunction

hypeJunction Oct 2, 2015

Contributor

On a second thought, I think it's easier to just create a new AMD module and require it as needed.

Contributor

hypeJunction commented Oct 2, 2015

On a second thought, I think it's easier to just create a new AMD module and require it as needed.

@hypeJunction

This comment has been minimized.

Show comment
Hide comment
@hypeJunction

hypeJunction Oct 2, 2015

Contributor

In case of lang, I don't see why you would want to pass that via AMD config. We already have elgg.config.language available in the global scope.

Contributor

hypeJunction commented Oct 2, 2015

In case of lang, I don't see why you would want to pass that via AMD config. We already have elgg.config.language available in the global scope.

@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay Oct 2, 2015

Member

Yeah that's simpler.

The thought Evan and I had was that elgg is right now a big God object and I try to avoid depending on it, but realistically that's not going to change soon. First big painful change will be making elgg truly async.

Member

mrclay commented Oct 2, 2015

Yeah that's simpler.

The thought Evan and I had was that elgg is right now a big God object and I try to avoid depending on it, but realistically that's not going to change soon. First big painful change will be making elgg truly async.

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Feb 15, 2016

feature(js): Adds hooks to pass site and page-level data client-side
Adds two hooks `"elgg.data"` that populate the object `elgg.data` available
in the `elgg` module.

Fixes #8997

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Feb 15, 2016

feature(js): Adds hooks to pass site and page-level data client-side
Adds two hooks `"elgg.data"` that populate the object `elgg.data` available
in the `elgg` module.

Fixes #8997
Conflicts:
	engine/lib/views.php
	views/default/elgg.js.php

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Feb 15, 2016

feature(js): Adds hooks to pass site and page-level data client-side
Adds two hooks `"elgg.data"` that populate the object `elgg.data` available
in the `elgg` module.

Fixes #8997

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Feb 15, 2016

feature(js): Adds hooks to pass site and page-level data client-side
Adds two hooks `"elgg.data"` that populate the object `elgg.data` available
in the `elgg` module.

Fixes #8997

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue May 8, 2016

feature(js): Adds hooks to pass site and page-level data client-side
Adds two hooks `"elgg.data"` that populate the object `elgg.data` available
in the `elgg` module.

Fixes #8997

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue May 8, 2016

feature(js): Adds hooks to pass site and page-level data client-side
Adds two hooks `"elgg.data"` that populate the object `elgg.data` available
in the `elgg` module.

Fixes #8997

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue May 12, 2016

feature(js): Adds hooks to pass site and page-level data client-side
Adds two hooks `"elgg.data"` that populate the object `elgg.data` available
in the `elgg` module.

Fixes #8997

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue May 12, 2016

feature(js): Adds hooks to pass site and page-level data client-side
Adds two hooks `"elgg.data"` that populate the object `elgg.data` available
in the `elgg` module.

Fixes #8997

@mrclay mrclay closed this in #9389 May 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment