-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
[REF] Cleanup Ang modules in core to follow conventions #19052
Conversation
(Standard links)
|
Jenkins re test this please |
I haven't |
@colemanw test seems to relate
|
f053f27
to
d0b2a75
Compare
Thanks @seamuslee001 I fixed the test. |
d0b2a75
to
195ce2c
Compare
We are moving toward the use of settingsFactory and away from settings for angular modules. This would allow the list of modules to be cached as it would only contain static metadata.
195ce2c
to
cd6afc7
Compare
Since code changes involved the status screen & export I logged into the test site & checked those screens still loaded & responded to basic clicking - which they did. This seemed to be pending only r-run so I'm merging |
https://lab.civicrm.org/extensions/angularprofiles/-/issues/5 - org.civicrm.angularprofiles And also relevant, https://lab.civicrm.org/extensions/angularprofiles/-/issues/3 - an we Deprecate This Extension? |
Probably. But in the meantime I went ahead and fixed the notice: https://lab.civicrm.org/extensions/angularprofiles/-/merge_requests/2 |
Thanks again @colemanw |
Overview
Each Angular module has a "definition" (typically in an
.ang.php
file) which consists of a small amount of information about where the html, js & css files are kept. Our goal is to cache Angular module definitions for performance, which means the data must be static. Historically.ang.php
files were allowed to return an array of "settings" which could contain dynamic information (e.g. the current user's permission levels). That can't be cached, so instead modules can declare "settingsFactory" which is the name of a function which will return the settings.Attention Extension Authors: You can refactor your own extensions simply by moving the
settings
array into a function.Before
crmAttachment
module loaded settings at runtime.After
crmAttachment
module loads settings via factory. Other references tosettings
removed.Technical Details
This gets us another step closer to being able to autoload Angular modules in core and cache the list of modules.
Also renamed module
statuspage
tocrmStatusPage
to match file namecrmStatusPage.ang.php
.