Skip to content

Clip long support emails and reroute README license links - #477

Merged
simonhamp merged 1 commit into
mainfrom
clip-email-license-links
Aug 20, 2026
Merged

Clip long support emails and reroute README license links#477
simonhamp merged 1 commit into
mainfrom
clip-email-license-links

Conversation

@simonhamp

Copy link
Copy Markdown
Member

Support email overflows the plugin details card

A long support address (e.g. nativecodeforge.contented345@passinbox.com) ran past the edge of the Plugin Details sidebar, leaving the envelope icon floating outside the container.

The address now sits in a truncate span inside a max-w-full inline-flex anchor with a shrink-0 icon, so it clips with an ellipsis and the icon stays inside the card. The full address moves to a title tooltip. The same clipping is applied to the plain-text support-channel branch.

README links to license files 404

READMEs commonly link to their license file relatively — LICENSE.md, ./LICENSE, /LICENSE.txt, LICENSE-MIT.md — or by absolute GitHub URL. On the plugin page those resolve against our domain and 404.

Plugin::rendered_readme_html (new App\Support\PluginReadme) rewrites those hrefs at render time, so already-synced plugins are fixed without a re-sync. It matches:

  • relative license names and variants: LICENSE, LICENCE, UNLICENSE, COPYING, suffixed forms like LICENSE-MIT, with ./ or / prefixes and .md / .markdown / .txt / .rst / .html extensions
  • absolute github.com/{owner}/{repo}/blob|raw/{ref}/LICENSE… and raw.githubusercontent.com URLs, but only when the owner/repo match the plugin's own repository

Links go to plugins/{vendor}/{package}/license when we host the license page. Note that route deliberately 404s for free plugins, so sending every plugin there would swap one broken link for another — plugins without a hosted license page get an absolute link to the file in their GitHub repo instead, and plugins with no repository URL are left untouched. Non-license links, nested paths (docs/LICENSE.md), anchors, mailto: and other repositories' URLs are left alone.

Plugin::hasLicensePage() and getRepositoryFileUrl() are extracted so the sidebar and the rewriter agree on when the license page exists.

Tests

New PluginReadmeLicenseLinkTest covers the license-name variants, the GitHub URL forms, the links that must be left alone, the repository fallback and the rendered page. A clipping case is added to PluginShowSupportChannelTest. The related plugin suites (license preview, plugin show, directory, sync, Filament resource) pass.

🤖 Generated with Claude Code

The support channel email overflowed the plugin details sidebar, pushing
the envelope icon outside the card. It's now clipped with an ellipsis and
the full address moved to a title tooltip.

READMEs commonly link to a license file relatively (LICENSE.md, ./LICENSE,
LICENSE-MIT.txt) or by absolute GitHub URL, both of which 404 on our
domain. Those links are now rewritten to our hosted license page, or to
the file in the plugin's repository when we don't host one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@simonhamp
simonhamp marked this pull request as ready for review August 20, 2026 16:04
@simonhamp
simonhamp merged commit 4a3dc86 into main Aug 20, 2026
3 checks passed
@simonhamp
simonhamp deleted the clip-email-license-links branch August 20, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant