Custom HTML snippet via Admin UI
Problem to solve
Sometimes we want to make small adjustments to the look and feel of GitLab self hosted versions.
Intended users
Depending of the kind of problem to solve with this approach mostly every persona is affected by this.
But adjustments to the custom HTML itself or mostly done by, people of the following personas who are admins of the GitLab instance:
Further details
Examples for this could be...
- Adding another entry to the headline.
- Changing some colors or formats of rendered Markdown, ...
- Adding some widget for intercommunication with other tools (like for example with Zendesk), ...
Proposal
Admin Area
-
Adding to the Admin Area, in best case to "Admin Area > Appearance" (
/admin/appearance
) a new section named "Custom HTML". -
This section should have the following fields:
- "HTML": Which should be a
<textarea ..>
big enough to fill in the desired HTML snippets, in best case max width (like the "Message" field of Broadcast Messages). - "Location": Will define where this HTML snipped will be included into the created HTML of the page.
- "Header top" - Directly behind
<head>
- "Header bottom" - Directly in-front of
</head>
- "Body top" - Directly behind
<body>
- "Body bottom" - Directly in-front of
</body>
- "Header top" - Directly behind
- "Target Path": Path where this snipped should be included into the resulting page. The rule should be able to contain either (like like the "Target Path" field of Broadcast Messages wildcards (like
/foo/*/bar
) or in best case regexp.
- "HTML": Which should be a
-
As for Broadcast Messages it should be possible to add more than one of these snippets (and obviously also to remove them).
Rendering
The rules which are defined in the Admin Area should be evaluated based on the defined rules and be respected.
It is ok to have a latency up-to 5 minutes before changes here are fully reflected for every user.
Permissions and Security
- Permissions are based on the rules of the "Admin Area" for making changes and see the rules.
- The rules should be executed for everyone if the "Target Path" rule matches.
Documentation
As described above in Admin Area this needs to be added as a new section to Admin Area > Appearance of documentation.
Availability & Testing
What does success look like, and how can we measure that?
What is the type of buyer?
This should be at least features for:
- Premium/Silver
- Ultimate/Gold
This features mostly required by companies who are trying to work in a more integrated environments.
Optional for the following, too:
- Starter/Bronze
- Core/Free