feat(admin): #IMPULS-5903 add Screeb integration - #1077
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a Screeb (user feedback/surveys) integration to the admin Angular 14 frontend, modeled after the existing conversation integration, with runtime-controlled enablement via the platform publicConf.
Changes:
- Adds an
ScreebServicethat conditionally loads/initializes Screeb based on/admin/conf/publicand session profile. - Registers
ScreebModulewithautoInit: false/shouldLoad: falseand triggers initialization fromAppRootComponent. - Exposes Screeb configuration in
admin’stemplate.j2, adds a dev proxy mock for/admin/conf/public, and introduces Screeb SDK dependencies.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| admin/src/main/ts/src/app/core/services/screeb.service.ts | Introduces a dedicated Screeb bridge service that loads/initializes Screeb based on platform public configuration. |
| admin/src/main/ts/src/app/core/core.module.ts | Registers ScreebService in the core providers. |
| admin/src/main/ts/src/app/app.module.ts | Adds ScreebModule.forRoot() configured for manual load/init. |
| admin/src/main/ts/src/app/app-root.component.ts | Initializes Screeb after session retrieval, with error capture. |
| admin/src/main/ts/proxy-development.conf.js | Adds a dev-only bypass to mock /admin/conf/public when SCREEB_APP_ID_DEV is set. |
| admin/src/main/ts/package.json | Adds Screeb Angular + browser SDK dependencies. |
| admin/src/main/resources/template.j2 | Adds publicConf keys for screeb-app-id and optional allowed profiles. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
jcbe-ode
left a comment
There was a problem hiding this comment.
OK pour moi, à voir si Pascal a des retours.
| // Screeb is loaded and initialized manually (see ScreebService): the app id is | ||
| // only known at runtime, from the platform publicConf, and no script must be | ||
| // loaded at all when Screeb is not enabled for the platform. | ||
| ScreebModule.forRoot({ |
There was a problem hiding this comment.
forRoot fait partie des choses que je ne connais pas :)
There was a problem hiding this comment.
comme au dessus, ça semble etre une methode pour declarer une dependance à la racine du module. (methode de Screeb dont les parametres permettent ici de ne pas charger Screeb automatiquement => c'est ici qu'on decide de le charger en fonction de la conf plateforme https://github.com/edificeio/entcore/blob/feat-IMPULS-5903-add-screeb-admin/admin/src/main/ts/src/app/app-root.component.ts#L100)
* fead(admin):#IMPULS-5903 add screeb * clean Screeb interface without useless method
* fead(admin):#IMPULS-5903 add screeb * clean Screeb interface without useless method
* fead(admin):#IMPULS-5903 add screeb * clean Screeb interface without useless method
* fead(admin):#IMPULS-5903 add screeb * clean Screeb interface without useless method
* fead(admin):#IMPULS-5903 add screeb * clean Screeb interface without useless method
* fead(admin):#IMPULS-5903 add screeb * clean Screeb interface without useless method
* fead(admin):#IMPULS-5903 add screeb * clean Screeb interface without useless method



Description
Intègre le SDK Screeb (outil de feedback/enquêtes utilisateurs) dans le module admin (Angular 14), sur le même modèle que l'intégration déjà en place côté conversation.
@screeb/sdk-angularet@screeb/sdk-browser(0.7.0) au module admin.ScreebModulechargé avecautoInit: false, shouldLoad: false: aucun script Screeb n'est chargé au bootstrap. LeScreebServicepilote manuellementload()/init()une fois la conf de la plateforme connue.publicConf(screeb-app-id,screeb-allowed-profilesoptionnel) exposée parGET /admin/conf/public, ajoutée danstemplate.j2.proxy-development.conf.js(cléSCREEB_APP_ID_DEVdu.env) : la recette ne servira la clé sur/admin/conf/publicqu'une fois cetemplate.j2déployé.Fixes
IMPULS-5903
Type of change
Please check options that are relevant.
Which packages changed?
Please check the name of the package you changed
Tests
SCREEB_APP_ID_DEVdansadmin/src/main/ts/.env, lancerng serveavec le proxy de développement.screeb-app-idest présent dans la réponse mockée de/admin/conf/public.screeb-allowed-profilesest renseigné, que l'init est bien filtrée selon le profil de session.Reminder
Security flaws
Performance impacts (think bulk !)
Unit tests were replayed
Unit tests were added and/or changed
I have updated the reminder for the version including my modifications
All done ! 😃