Repository navigation
feat: show tagged GitHub accounts in bios as avatar pills - #720
Merged
Merged
Conversation
A bio synced from GitHub can tag users and organizations with @name. Those tags now show as a small pill with the account's GitHub avatar and link to it on GitHub, on the profile page, the hover card and the sidebar. The mention rule moves to resources/js/lib/mentions.ts so the bio and linkified text can share it without importing each other.
GitHub links an @org in the company field too. The profile page now shows those tags with the same pill as the bio.
Member
|
looks awesome! |
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.
TL;DR:
@nametags in a synced GitHub bio or company now show as a small pill with that account's GitHub avatar. Clicking one opens the account on GitHub in a new tab.Before / after
Hovering a pill turns it blue. Only the colors change, so the pill keeps its width and the bio text doesn't jump:
The screenshots render the real
BioTextcomponent with the app's compiled CSS, using Nuno's current GitHub bio.What changed
resources/js/components/bio-text.tsx. Each@namebecomes a pill with a round avatar fromgithub.com/<name>.pngand the handle next to it.@orgthere as well. A plain company name like "Laravel" stays plain text.linkified-text.tsxtoresources/js/lib/mentions.ts, with its comment unchanged. Without the move,linkified-textimportsuser-preview, which importsbio-text, which would importlinkified-textagain. The sync note inapp/Services/Mentions.phpnow points to the new file.Details
@scope/packageand@vue.jsstay plain text.@. It stays in the text at zero font size, the same trick shortened URLs use.Checks
bunx vp test run tests/Unit/BioText.test.tsx tests/Unit/LinkifiedText.test.tsx: 51 passed, 4 of them newbun run test:unit: 86 passedbun run test:lintandbun run test:types: passvendor/bin/pint --test app/Services/Mentions.php: passvp build: builds