Skip to content

Replace icons, fonts and scripts that can't ship in the 7.0 source release - #266

Open
mraible wants to merge 3 commits into
apache:masterfrom
mraible:replace-unlicensed-assets
Open

mraible wants to merge 3 commits into
apache:masterfrom
mraible:replace-unlicensed-assets

Conversation

@mraible

@mraible mraible commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Follows the dev@ licensing thread (Dave: replace the Category B and unknown-origin assets). ASF policy allows Category B works such as OFL fonts and CC BY icons in binary form only, and some theme files had no recorded license at all.

Font Awesome 3.2.1 (OFL, Gaurav). The five font files and font-awesome.min.css are removed. Gaurav used three icons: search, clock and chevron-right. They're now inline Bootstrap Icons SVGs (MIT, from the bootstrap-icons 1.13.2 webjar Roller already ships).

They're inline, not separate files, for two reasons:

  • A customized theme copies its resources into the media library, which serves SVG as an attachment, so separate SVG files wouldn't render.
  • A versioned webjar path would go stale in customized copies.

Silk icons (CC BY 2.5).

  • All 29 in images/ are removed. The four in use are now Bootstrap Icons classes, which head.jsp already loads: help.tag, Templates.jsp and UserEdit.jsp.
  • The theme icons in themes/{gaurav,fauxcoly}/icons/ (Silk, or from the 2005 import with no recorded source) are now inline SVG or data: URI Bootstrap Icons in similar colours. That covers permalink, tag, comments, PDF, entry and feed icons, and the old social-bookmark logos. asf-logo.png stays.

searchhi.js (no license). The three copies are gone. Each theme has a new js/search-highlight.js, written from scratch:

  • it reads the term from a data-search-term attribute;
  • it walks text nodes and wraps matches with createElement and createTextNode, so the term is never treated as markup;
  • it skips script and style content.

Fauxcoly's old highlighter was served as a text/html template with nosniff, so it probably never ran.

Smileys. images/smileys/ (37 GIFs) is removed. The Emoticons plugin now emits Unicode emoji: <span class="smiley" title=":-)">&#x1F642;</span>. It also matches all emoticons in a single pass, longest first, so :)) is no longer split and one replacement can't match inside another's markup. Titles are HTML-escaped.

Unused files removed: images/editor/*.gif and the theme brand logos referenced only by theme.xml.

Tests:

  • ThemeAssetReferencesTest checks four things:

    • every file a theme lists or loads exists;
    • every loaded file is listed in theme.xml;
    • relative url() targets in theme CSS exist;
    • every /images/ and /scripts/ path in JSP, tag, vm and css files exists.

    It fails if a template still points at a removed file.

  • SmileysPluginTest covers the new output.

  • mvn test: 669 passed. apache-rat:check passes.

CHANGES.md notes that custom templates linking to the removed files will show broken images. Weblogs already on a customized copy keep their own files. #265 (LICENSE/NOTICE) will drop the Font Awesome and Silk entries and the famfamfam credit, and credit Bootstrap Icons for the inline SVG paths.

…elease

The Gaurav theme drops Font Awesome 3.2.1 (SIL OFL, Category B). Its three icons (search, clock, chevron) are now Bootstrap Icons 1.13.2 drawn as inline SVG, the same version Roller already gets from the bootstrap-icons webjar.

Silk icons (CC BY 2.5) are removed from /images and from the Gaurav and Fauxcoly themes. The admin pages use the Bootstrap Icons font they already load, and the themes draw Bootstrap Icons inline or as data URIs in their stylesheets. The themes keep no SVG files because a customized copy of a theme serves its resources from the media library, which sends SVG as an attachment, so separate SVG files would not display there.

The theme brand icons, editor GIFs and smileys from the 2005 import, which have no recorded source, are removed. The Emoticons plugin now emits Unicode emoji instead of images, replacing all emoticons in one pass so that an emoticon in an inserted title is not replaced again.

The kryogenix.org searchhi.js, which has no license, is replaced in both themes by a new search-highlight.js that wraps search words in text nodes without parsing markup. The unused copy in /theme/scripts is removed.

New tests check that the Emoticons plugin output is well formed, and that every file a theme lists or loads and every /images or /scripts path in a template exists.
@mraible
mraible requested a review from snoopdave November 14, 2026 22:11
mraible added a commit to mraible/roller that referenced this pull request Nov 14, 2026
apache#266 replaces Gaurav's Font Awesome 3.2.1 fonts and every Silk icon with Bootstrap Icons outlines drawn inline as SVG, per the dev@ licensing thread. Both LICENSE files now name Bootstrap Icons (MIT) for those themes instead of Font Awesome (OFL) and Silk (CC BY 2.5), and both NOTICE files drop the famfamfam credit.
@mraible mraible added the 7.0.0 label Nov 15, 2026
@snoopdave

Copy link
Copy Markdown
Contributor

PR-Review: General Issues

The following issues were found but cannot be attached to a specific line in the diff:

  • 🐞Claude Issue: Important: 12 files remain in app/src/main/webapp/images/, and nothing records where they came from. Two look like third-party work: feed-icon-12x12.gif looks like the feedicons.com/Mozilla feed icon (as far as I know released under MPL/GPL/LGPL, and MPL is Category B), and openid-logo-small.gif is the OpenID Foundation's logo. The others are atombadge.jpeg, rssbadge.gif, smrssbadge.gif, permalink.gif, tinyfeather.png, launch-link.png, opml.png, rollerbadge.* and roller-logo.png. Please confirm each is project-original, and replace or credit the rest, as this PR does for the theme icons. roller-ui/images/ and roller-ui/theme/{blue,sun,tan}/ (26 files) were not checked either.

Twelve files were left in images/ with nothing recording where they came from, and roller-ui/images and roller-ui/theme had not been checked.

Replaced with Bootstrap Icons (MIT), inline in themes and by class in the admin: the feed icon in the basic themes' feed list (feed-icon-12x12.gif, the Mozilla feed icon), the feed badges in the blogroll macro and on the front page theme (smrssbadge.gif, rssbadge.gif), and the icon beside an entry's permalink in the editor (launch-link.png).

Removed because nothing uses them: openid-logo-small.gif (OpenID sign-in is gone), atombadge.jpeg, opml.png, permalink.gif, three images in roller-ui/images (layout.png, logo-shadow.png, transparent-logo.png), and the old admin colour themes under roller-ui/theme (blue, sun, and tan apart from the two tab backgrounds the front page theme still uses).

Left in place: Roller's own logo and badges, the Apache feather, and the tab corner, dash and spacer images.
@mraible

mraible commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

aef6e4a goes through the 12 files left in images/ and the 26 in roller-ui/images/ and roller-ui/theme/.

Replaced with Bootstrap Icons, the same way as the theme icons:

  • feed-icon-12x12.gif, added in 2006 as "the industry standard feed icon": now an inline rss-fill in the basic and basicmobile themes' feed list.
  • smrssbadge.gif and rssbadge.gif, from the 2005 import: now an inline rss-fill in the blogroll macro and the front page theme.
  • launch-link.png, added in 2007 with no source recorded: now bi-box-arrow-up-right beside the permalink in the entry editor.

Removed because nothing references them:

  • openid-logo-small.gif, atombadge.jpeg, opml.png and permalink.gif.
  • roller-ui/images/layout.png (it looks like a Silk icon), logo-shadow.png and transparent-logo.png.
  • roller-ui/theme/blue/ and sun/ entirely, and tan/ apart from menutab-sel.gif and menutab-unsel.gif, which the front page theme uses. The three colors.css files weren't loaded by anything.

Left in place, and I can't confirm these from the repository alone:

  • roller-logo.png, rollerbadge.jpg and rollerbadge.png: Roller's own logo and "Powered by" badge. Nothing references them, but sites link to the badge. Git shows them arriving in the June 2005 import.
  • tinyfeather.png and roller-ui/images/feather.svg: the Apache feather.
  • roller-ui/images/menutab-tl.gif, menutab-tr.gif, dash.gif, spacer.png and the two tan/menutab-*.gif: tab corners, a dash, a 1x1 spacer and gradients, all from 2005.
  • roller-ui/images/clippy.svg isn't referenced either. I left it because Bring LICENSE and NOTICE in line with what 7.0.0 ships #265 already credits it to Octicons.

Dave, you committed all of the 2005 files, so could you confirm the Roller logo, the badges and the tab images were made for the project? If any weren't, I'll replace those too.

atom.xsl and rss.xsl both point at a two-banner.gif beside them that has never existed there. I left that alone.

mvn test passes (669). CHANGES lists the extra removals. #265 doesn't need new credits for this, since the additions are Bootstrap Icons it already covers.

mraible added a commit to mraible/roller that referenced this pull request Nov 15, 2026
… and Fauxcoly

The assets pull request (apache#266) now also draws Bootstrap Icons inline in the Basic, Basic Mobile and Frontpage themes and in the blogroll macro, so the credit names those files too.
@mraible

mraible commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

A correction to my comment above: #265 did need a change for this. Its Bootstrap Icons credit named only the Gaurav and Fauxcoly themes, and aef6e4a also draws those icons inline in the Basic, Basic Mobile and Frontpage themes and in the blogroll macro. 75bfcce on #265 adds those files to the credit in both LICENSE files. #265 lists none of the images removed here, so nothing has to come out of it.

project.basedir isn't set by Surefire or an IDE, so the test always used the working directory. The module directory now comes from where the test class was compiled to.
@mraible

mraible commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

A small test change: ThemeAssetReferencesTest read project.basedir, which Surefire and IDEs don't set, so it always fell back to the working directory. It now finds the module directory from where the test class was compiled to, the same change as #267. The question above is still open: were the Roller logo, the badges and the tab images from the 2005 import made for the project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants