feat: add toolbox text style support #10231
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#10202 Requested a more flexible toolbox label configuring method. This PR fulfills that requirement but the little triangle in the design of https://gitlab.com/gitlab-org/gitlab-ce/issues/57130 is not supported.
Requirement:
![屏幕快照 2019-04-08 18 21 46副本](https://user-images.githubusercontent.com/779050/55717732-8b154a80-5a2c-11e9-96cf-98730c63c4aa.png)
Example of what you can get from this PR:
![屏幕快照 2019-04-08 18 21 46](https://user-images.githubusercontent.com/779050/55717753-95cfdf80-5a2c-11e9-9600-7de6598ebe7c.png)
The text color, background color, border radius, text padding can all be configured.
But the small triangle is currently not supported, because we have to add new option entry for that and thus needs further discussion. @jivanvl Please see if this meets your requirement.
In this PR, I added support for several options for
toolbox.emphasis.iconStyle
, namely:textPosition
,textFill
,textAlign
: these options were supported but have no effect for settings intoolbox.emphasis.iconStyle.xxx
due to a bug and they were fixed in this PR.textBackgroundColor
,textBorderRadius
,textPadding
: these are newly supported options.They can be set in
toolbox.emphasis.iconStyle
for all features, ortoolbox.feature.XXX.emphasis.iconStyle
for a specific feature XXX.