Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

Refactor out branding-related settings to a separate service #1187

Open
gashcrumb opened this issue Nov 7, 2017 · 2 comments
Open

Refactor out branding-related settings to a separate service #1187

gashcrumb opened this issue Nov 7, 2017 · 2 comments

Comments

@gashcrumb
Copy link
Contributor

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.

@deeleman
Copy link
Contributor

deeleman commented Nov 7, 2017

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.

@gashcrumb
Copy link
Contributor Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants