Skip to content

Commit

Permalink
edits and typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShashiSubramanya committed Feb 4, 2025
1 parent ac3617c commit 114516f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions modules/ROOT/pages/customize-icons.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ You can customize the icons on a ThoughtSpot page using an icon sprite SVG file
.. On your ThoughtSpot instance, right-click on the icon and select *Inspect*.
.. Inspect the `<svg>` element.
.. Note the icon ID.
* Add the SVG hosting domain is added to the following allowlists on the *Develop* > *Security Settings* page:
* Add the SVG hosting domain to the following allowlists on the *Develop* > *Security Settings* page:
** xref:security-settings.adoc#csp-connect-src[CSP connect-src domains allowlist]
** xref:security-settings.adoc#csp-trusted-domain[CSP img-src domains allowlist]
+
* xref:customize-icons.adoc#_try_it_out_in_the_embed_playground[Try out] the icon override code in the embed Playground. For ease of testing, the domain `cdn.jsdeliver.net` is already whitelisted on ThoughtSpot Embedded link:https://try-everywhere.thoughtspot.cloud/v2/#/everywhere/playground/search[public playground] and trial sites.
* xref:customize-icons.adoc#_try_it_out_in_the_embed_playground[Try out] the icon override code in the embed Playground. For ease of testing, the domain `cdn.jsdeliver.net` is already whitelisted on the ThoughtSpot link:https://try-everywhere.thoughtspot.cloud/v2/#/everywhere/playground/search[public Playground] and trial sites.

== Create an icon override
The basic structure of an icon override file is shown in the following snippet:
Expand Down Expand Up @@ -60,7 +60,7 @@ You can add the `fill` property to the `<symbol>` tag to define a different fill
== Override an icon
To override an icon:

. Create an icon sprite file with the SVG element, properties, and the icon ID.
. Create an icon sprite file with the SVG element, define the properties, and specify the icon ID.
+
The following code snippet shows how to override the chart icon (`rd-icon-chart`) on the *Answers* page.
+
Expand Down Expand Up @@ -98,9 +98,13 @@ For example, the following code snippets use the link:https://github.com/thought
+
[source,JavaScript]
----
customizations: {
iconSpriteUrl: "https://cdn.jsdelivr.net/gh/thoughtspot/custom-css-demo/icon-override1.svg"
}
init({
//...
customizations: {
// rd-icon-chart
iconSpriteUrl: "https://cdn.jsdelivr.net/gh/thoughtspot/custom-css-demo/icon-override1.svg"
}
});
----

+
Expand All @@ -109,6 +113,7 @@ For example, the following code snippets use the link:https://github.com/thought
init({
//...
customizations: {
// rd-icon-spotter
iconSpriteUrl: "https://cdn.jsdelivr.net/gh/thoughtspot/custom-css-demo/alternate-spotter-icon.svg"
}
});
Expand Down Expand Up @@ -138,13 +143,13 @@ image::./images/spotter-icon-customization.png[Spotter icon customization]

|======

== Try it out in the embed Playground
== Try it out in the Playground
The +++<a href="{{previewPrefix}}/playground/search" target="_blank">Visual Embed SDK Playground </a>+++ allows you to try out the icon customization framework.

To view the code for customization:

. Select the *Apply custom styles* checkbox in the Playground. +
The `customizations` code appears for CSS modifications appears in the code panel.
The `customizations` code for CSS modifications appears in the code panel.
. Replace the `customization` section with the following code and click *Run* to view the results:
+
[source,JavaScript]
Expand Down

0 comments on commit 114516f

Please sign in to comment.