-
Notifications
You must be signed in to change notification settings - Fork 893
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
[Branding] implement to reduce validation logic #2044
Comments
Here are some initial design spike result for the first two possible implementation, and still researching on the third one(branding plugin):
|
We can create service(for example, like a branding assignment service that handles all the validation logic and duplicated logic for darkmode etc.) in the public/ folder so it can be exposed and other plugins and the core can call the service when they need custom branding. It is a viable solution since i found previous examples of plugins that communicate with core/server, core/public and other plugins. The con of this approach is that it will take significant more time to build a plugin and it seems like the current relatively simple custom branding functionality does not need a separate plugin to support it. But in the future, if we want to make more branding and theming configuration, then it would be nice to have a separate plugin dedicated for this purpose. |
Since our goal here is to reduce logic, I still think that my suggestion here would simplify branding significantly. |
Users can install the external plugin and when they upload the json translation files, they can customize the application title at the same time. We can have a doc to document or mark all the application title ids so it is easy for users to change. Currently, not all references of application title is registered with i18n. I added a couple more ids for example, such as the overview title, side menu title and the home page title and test them out with two locales. There are more title references throughout the application. We currently only checking if title is less than 36 characters for title validation, need to think of a different way of title validation if using the i18n framework. |
Our current implementation already stores all the default opensearch logos' and marks' svg images in an asset folder (src/core/server/core_app/assets/default_branding). We can move this folder to a root level folder and user can have a second option to configure branding on top of using the yml file. |
Rather than moving them,we might consider copying them to a root level folder instead. That would allow the user to have a safe space to make changes or overwrite the files, with the option to restore or reset if necessary. |
@joshuarrrr Oooh, I like this more |
After our discussion, we decided to use solution 1 (extend rendering service) to reduce the duplicated branding logics for now. In the future, we will shift the branding configuration to solution 4 & 5 using asset folder and i18n plugin with the consideration of community feedback. More details to follow. |
Is your feature request related to a problem? Please describe.
Origin: #2045
Describe the solution you'd like
To be added, once #2045. Once the parent issue is completed then we can break discuss the solution
Requirements
The text was updated successfully, but these errors were encountered: