Repository navigation
Conversation
A workspace's CSS can style the portal by part name rather than by class names that change with the code: [data-qb-part="post-card"]. - Twelve parts are marked: header, logo, nav-item, band, headline, home-block, composer, post-card, post-title, vote-button, status-badge and filter-panel. States are data-state: active for the current menu item, open for a composer being written in, voted for a voted vote box, done for a post whose status is complete or closed. - lib/shared/design/parts.ts lists each part's states, the tokens that style it and the files that draw it, with aliases for renamed parts and rewritePartAliases, which keeps old names working. - A contract test keeps every listed part marked where it is drawn, with its states, fails on a part the manifest does not list, and checks each documented token is one the design declares. Every card now carries its part names, so the portal home's HTML ceilings take their new readings.
mortondev
force-pushed
the
feat/portal-design-v2-phase5-parts
branch
from
October 31, 2026 06:53
d9be5a2 to
9998bef
Compare
Member
Author
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.
The twentieth of the stack that builds a new design engine for the portal, and the first of phase 5. A workspace's own CSS can style the portal by part name,
[data-qb-part="post-card"], rather than by class names that change with the code. Behind theportalDesignV2flag; the attributes are inert on their own.The twelve parts
data-state)headerlogonav-itemactivebandheadlinehome-blockdata-qb-blocknaming its typecomposeropenpost-carddonepost-titlevote-buttonvotedstatus-badgefilter-panelThe manifest
lib/shared/design/parts.tslists each part's description, states, the tokens that style it (the design's existing--qb-*tokens, such as--qb-card-paddingand--qb-vote-active) and the files that draw it.PART_ALIASESkeeps a renamed part's old name working for at least a minor release;rewritePartAliases()applies them.The contract
parts.test.tsfails when a listed part disappears from the files that draw it, when a listed state is no longer set, when a component marks a part the manifest does not list, or when a documented token is not one the design declares.Verification
/,/feedbackand a post, withactiveon the current menu item,openon a composer being written in andvotedwhere the visitor voted.doc:portal-homeanddoc:portal-home+sessiontake their readings (129.4 and 150.7 KB). The other document sweeps hold.