Rock v18 brings not only new features but also a fresh styling system, including the switch to a new icon library called Tabler. While Font Awesome is still supported for now, we recommend transitioning to Tabler, as Font Awesome support will be phased out within the next year.
We've updated all core references to Tabler, but if you spot any lingering icons, let us know. Many icons are stored in the database, and to avoid disrupting your custom settings, we haven’t changed those automatically.
To help, we’ve created a set of SQL scripts that convert Font Awesome icons in core tables to their Tabler equivalents. A new database table, [__IconTransition], maps the old icons to the new ones. Most have close matches, though a few are approximate.
Use these scripts carefully—test in a sandbox first. We've had great results using them internally. Expect about 95% accuracy, and you’ll be in great shape.
Scripts
The scripts below can be run directly in the Rock SQL Editor.
Updates tables with a column [IconCssClass]
-- Initial Clean-up
UPDATE [GroupType]
SET [IconCssClass] =
CASE
WHEN LEFT([IconCssClass], 8) = 'icon-fw '
THEN RIGHT([IconCssClass], LEN([IconCssClass]) - 8)
ELSE [IconCssClass]
END
UPDATE [WorkflowType]
SET [IconCssClass] =
CASE
WHEN LEFT([IconCssClass], 8) = 'icon-fw '
THEN RIGHT([IconCssClass], LEN([IconCssClass]) - 8)
ELSE [IconCssClass]
END
UPDATE [Category]
SET [IconCssClass] =
CASE
WHEN LEFT([IconCssClass], 8) = 'icon-fw '
THEN RIGHT([IconCssClass], LEN([IconCssClass]) - 8)
ELSE [IconCssClass]
END
DECLARE @sql NVARCHAR(MAX) = N'';
DECLARE @tableName NVARCHAR(256);
DECLARE @schemaName NVARCHAR(256);
-- Cursor to find all user tables with a column named 'IconCssClass'
DECLARE icon_cursor CURSOR FOR
SELECT
t.name AS TableName,
s.name AS SchemaName
FROM
sys.columns c
JOIN
sys.tables t ON c.object_id = t.object_id
JOIN
sys.schemas s ON t.schema_id = s.schema_id
WHERE
c.name = 'IconCssClass';
OPEN icon_cursor;
FETCH NEXT FROM icon_cursor INTO @tableName, @schemaName;
WHILE @@FETCH_STATUS = 0
BEGIN
-- Build the dynamic update SQL
SET @sql += '
UPDATE [' + @schemaName + '].[' + @tableName + ']
SET IconCssClass = t.TablerFull
FROM [' + @schemaName + '].[' + @tableName + '] AS target
JOIN [__IconTransition] AS t
ON target.IconCssClass = t.FontAwesomeFull
WHERE t.TablerFull IS NOT NULL;
';
FETCH NEXT FROM icon_cursor INTO @tableName, @schemaName;
END
CLOSE icon_cursor;
DEALLOCATE icon_cursor;
-- Execute dynamic SQL
EXEC sp_executesql @sql;
Updates Attributes Values
UPDATE av
SET av.Value = t.TablerFull
FROM AttributeValue av
JOIN __IconTransition t
ON av.Value = t.FontAwesomeFull
WHERE t.TablerFull IS NOT NULL;
Update Attribute Default Values
UPDATE a
SET a.DefaultValue = t.TablerFull
FROM Attribute a
JOIN __IconTransition t
ON a.DefaultValue = t.FontAwesomeFull
WHERE t.TablerFull IS NOT NULL;