Skip to content

Feat/text holders and badges - #567

Open
ryangtanaka-org wants to merge 5 commits into
teia-community:mainfrom
ryangtanaka-org:feat/text-holders-and-badges
Open

ryangtanaka-org wants to merge 5 commits into
teia-community:mainfrom
ryangtanaka-org:feat/text-holders-and-badges

Conversation

@ryangtanaka-org

Copy link
Copy Markdown
Contributor

Some UI/badges updates to the blog/text feature, and a few bug fixes as well

Also added a feed for TEIA members as its own feed (now general/TEIA members/mods and multisig for bulletin)

ryangtanaka-org and others added 5 commits September 12, 2026 13:33
The Teia Text queries and their hooks lived in src/data/swr.js, a 1.4k-line
file of unrelated hooks. They landed there with the blog in March, before
the repo settled on per-feature data modules; poll comments, wiki and
curations all since got a src/data/<feature>/ folder of their own.

Text now follows that layout: queries.ts holds the GraphQL documents,
hooks.ts the SWR hooks, and index.ts re-exports both so pages import from
'@data/text'. The hooks keep their SWR keys and options exactly, so caching
and what each feed returns are unchanged.

useMultisigAddresses stays in swr.js since New Post uses it too, and roles.ts
already marks it for consolidation with the role hooks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Text had Community (anyone) and Bulletin (multisig and moderators), but no
way to read what the people holding a stake in Teia are writing.

TEIA Members lists posts whose author currently holds TEIA, using the same
holder set that drives the profile's TEIA HOLDER badge. It filters on the
indexer with `artist_address: { _in: holders }` rather than filtering
Community's posts in the browser: against the live indexer that returns the
latest 100 holder posts (back to Oct 2025) in under a second, where
filtering Community's latest 100 would find only 34.

The SWR key uses the holder set's size instead of its ~2.6k addresses, and
isLoading is derived from data/error because SWR v1 has no isLoading.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Nothing on a Text post said whether its author was a core member, a
moderator, or a TEIA holder, even though those roles already decide who can
post to Bulletin and are shown as badges on profiles.

Every post card now puts one emoji in front of the author: 📃 multisig core
member, 🛠️ moderator, or 🪙 TEIA token holder. Rights grow in that order,
so only the highest applies. It reads the shared role sets through
useAccountRoles, so it adds no per-post requests, and it carries a title and
aria-label with the role name.

Community, TEIA Members and Bulletin explain the emoji in their description.
The legend is built from the same list as the emoji, so the two can't drift.

Checked against the live multisig, moderator and holder lists: 0 wrong
badges across Community (100 posts), TEIA Members (100) and Bulletin (6).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The editor toolbar's token embed was an image icon with its name only in a
hover tooltip, so it read as a generic "insert image" button and people
couldn't tell it embeds a Teia OBJKT.

It now shows "Embed Token" next to the icon. The button stays the same
height as the rest of the toolbar, the label isn't clipped, and clicking it
still opens the token search.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every other profile tab keeps its content inside the responsive side
padding that feeds get from .feed_container (15px, 40px on tablet, 60px on
desktop). The Text tab's post list had none, so at 1440px its cards ran the
full 1436px, edge to edge, while Collection sat at 60 to 1376.

The list now uses the same padding and 1800px max width, and its cards line
up exactly with Collection's content at 375, 768 and 1440px.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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