Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign contact links #1511

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Redesign contact links #1511

wants to merge 14 commits into from

Conversation

huntertur
Copy link
Contributor

@huntertur huntertur commented Dec 27, 2024

Implements parts of #1477.

These changes will:

  • Make editor and published link orientation consistent
  • Add support for optional labels on links
  • Show icons for most recognized services
    • No DeviantArt since it wants me to start a partnership with them over email before getting access to a brand kit
    • No Steam due to the following restriction in its brand rules: "The Logo must stand alone and may not be combined with any object, including but not limited to other logos, words, graphics, photos, slogans, numbers, design features, or symbols."
    • No YouTube because it wants me to fill out a whole form, including an employer name, to be allowed to use the logo for any purpose
    • Fur Affinity gets the low-resolution favicon instead of the current logo because I was unable to make the rainbow paw splash recognizable at low resolutions
    • The generic globe icon is a public domain asset sourced from here: https://publicdomainvectors.org/en/free-clipart/Earth-silhouette/54347.html
  • Support one-click removal and undoing of removals when scripting is available, supplementing the existing workflow of leaving the name or value blank on form submission to delete an entry
  • Warn if a URL was likely pasted into the name field instead of the value field
  • Automatically extract identifiers from recognized sites, making newly-published links look nice and tracking-free regardless of if the user typed in a username or pasted the whole profile URL
  • Fix an issue in the admin tool for removing a user's contact links where an admin meaning to remove only one of the possibly-multiple links for a given site for a user ends up removing all of them upon form submission due to the form not being specific enough
  • Use a combobox to show available recognized sites and their icons
    • The current <input> + <datalist> approach remains the no-scripting fallback.
    • This is my first time not only using the Web Components API, but also making a serious effort to programmatically set ARIA attributes, following the W3C guidelines for comboboxes. Because of this, it is more than possible that some of my implementation decisions here are questionable. Please let me know if I did something wrong :)

New editor, scripting-enabled

image

New editor, no scripting

Not pictured: <datalist> is still the user's friend.

image

Published side

Notice the labels on two of the Bluesky links.

image

assets/js/combobox.js Fixed Show fixed Hide fixed
assets/js/combobox.js Fixed Show fixed Hide fixed
@huntertur huntertur added enhancement ui javascript Pull requests that update JavaScript code labels Dec 27, 2024
@huntertur huntertur requested a review from charmander December 27, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement javascript Pull requests that update JavaScript code ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant