Skip to content

Deprecate <rs:compressJs> tag — no longer minifies inline JSP content #310

@bjagg

Description

@bjagg

Context

PR #303 replaced YUI Compressor with esbuild, including a build-time minification step for files under `rs/**`. As part of that change, `JavaScriptMinificationTag` (the Java class backing the `rs:compressJs` JSP tag) was neutered:

```java
// Note: YUI Compressor removed - JSP tag now just passes through content
// Minification is handled by the build process with esbuild
// This maintains backward compatibility for existing JSP pages
```

Problem

The build-time minification only processes files under `rs/**`. It does NOT process inline `<script>` content wrapped in `rs:compressJs...</rs:compressJs>` in JSPs — JSPs are compiled to servlet bytecode separately, and the tag operates on the wrapped body at request time.

Result: every portlet that uses `rs:compressJs` (many do — AnnouncementsPortlet, NewsReaderPortlet, CalendarPortlet, JasigWidgetPortlets, and others) now ships uncompressed inline JS with no warning. Silent regression in the minification contract.

Proposed fix

  1. Mark `rs:compressJs` as `@deprecated` in the TLD with a `since="1.5.1"` attribute
  2. Add a clear Javadoc note on `JavaScriptMinificationTag` explaining it's now a no-op and will be removed in 1.6
  3. Document the behavior change in release notes so portlet maintainers know to remove usages
  4. (Follow-up) Remove the tag in a future major version after adopters have had time to migrate

Priority

Medium — the release can proceed without this, but we should ship the deprecation in 1.5.1 so portlet maintainers are aware. Filing as a follow-up to PR #303.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions