Clip long support emails and reroute README license links - #477
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
truncatespan inside amax-w-fullinline-flex anchor with ashrink-0icon, so it clips with an ellipsis and the icon stays inside the card. The full address moves to atitletooltip. 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(newApp\Support\PluginReadme) rewrites thosehrefs at render time, so already-synced plugins are fixed without a re-sync. It matches:LICENSE,LICENCE,UNLICENSE,COPYING, suffixed forms likeLICENSE-MIT, with./or/prefixes and.md/.markdown/.txt/.rst/.htmlextensionsgithub.com/{owner}/{repo}/blob|raw/{ref}/LICENSE…andraw.githubusercontent.comURLs, but only when the owner/repo match the plugin's own repositoryLinks go to
plugins/{vendor}/{package}/licensewhen 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()andgetRepositoryFileUrl()are extracted so the sidebar and the rewriter agree on when the license page exists.Tests
New
PluginReadmeLicenseLinkTestcovers 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 toPluginShowSupportChannelTest. The related plugin suites (license preview, plugin show, directory, sync, Filament resource) pass.🤖 Generated with Claude Code