Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Remove the avatars and read people by name again

28b19c7433fa6f6fe1ce826c443870385d856eb8 · Keenan Nemetz · 7d ago · parent 0fbeca85

Remove the avatars and read people by name again

The marks were harder to read than the names they replaced, so they are
gone: the account menu is back to the user icon, and the issue and
change tables, the profile, the directory and the contributor list all
say the account name.

This takes out everything that existed to draw a mark: the DiceBear
bundle and its licence file, the entry source that built it, the
Landscape style, avatar.go and its tests, the avatar template and its
three helper functions, the avatar palette in everforest.css and the
illustration rules in vole.css, and the app.js block that rendered and
re-rendered them on a theme change.

The tables keep the layout from the previous change — an author column
and an assignee column — because that part reads better with names too.
The assignee cells are the @name chips that already linked to the
filtered list.

`vole workflow run verify` passes, and the licence inventory is back to
one entry fewer.

server/web/static/app.js −26

@@ -775,29 +775,3 @@ const copyText = (value, done) => {
775 775 document.body.addEventListener('htmx:oobAfterSwap', read);
776 776 })();
777 777
778 // Avatars are drawn in the browser by DiceBear (static/dicebear-avatars.min.js).
779 // The server renders each account's initial on its ground colour, and this swaps
780 // the mark in once the page has the script: no script, no missing avatar, just
781 // the letter the page has always shown. HTMX swaps bring new names with them, so
782 // a replaced fragment is drawn too. The seed is the name in the attribute; the
783 // ground is read from the element, which keeps vole.css the only palette.
784 (() => {
785 const draw = (root) => {
786 if (window.VoleAvatars) window.VoleAvatars.renderAll(root);
787 };
788 draw(document);
789 document.body.addEventListener('htmx:afterSwap', (event) => draw(event.target));
790
791 // The disc in the sky is the moon on a dark theme and the sun on a light one,
792 // so a theme switch redraws the avatars in place. theme.js writes data-theme on
793 // <html>; watching it covers the account page's picker and the system following
794 // the operating system.
795 let theme = document.documentElement.getAttribute('data-theme');
796 new MutationObserver(() => {
797 const next = document.documentElement.getAttribute('data-theme');
798 if (next === theme) return;
799 theme = next;
800 document.querySelectorAll('[data-avatar]').forEach((el) => { el.innerHTML = ''; });
801 draw(document);
802 }).observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme'] });
803 })();