-
Notifications
You must be signed in to change notification settings - Fork 28
Refactor out branding-related settings to a separate service #1187
Comments
Agreed. It also contains a lot of hardcoded default values on each call, which should never be part of an Angular component since it breaks component reusability. On a more particular note, since stuff such as favicons, theme colors, default onloading text, and themes have an impact in the wrapper index.html shell file (which is not part of the AppComponent itself), and some of of such information falls outside the scope of what Angular can do (at least for v4.x/5.x), I think that moving all those settings to a global custom settings JSON file and delegating on the Angular CLI/Webpack the responsibility for binding such information might be the way to go IMO. This would make customizing the application easier for non-Angular devs too. |
Yeah, exactly, currently it's set via this json file which for us is set at runtime via the openshift template -> https://github.com/syndesisio/syndesis-ui/blob/master/src/config.json.example#L4-L14 It's probably going to be easier to just replace the favicon by just overriding it when building the docker image I think. Maybe also for the logo, but then I don't think we have any gnarly branding requirements outside of having an upstream vs product build. |
We've this block of code that's kinda gotten out of hand:
https://github.com/syndesisio/syndesis-ui/blob/master/src/app/app.component.ts#L85-L130
I wonder if we should consider creating a separate branding service that components can just inject so it's easier to use these settings in views without all this extra boilerplate code.
The text was updated successfully, but these errors were encountered: