swarm-ui: an agent's settings and AGENTS.md show placeholders while they load
BadgeSkeleton is the twin of Badge: the real Badge frame, as tall as an interactive one (the settings values are buttons), with a placeholder for its value. Permissions, resource caps, internet and allowed domains use it in place of their "loading…" text, the details popover shows lines of text, and the AGENTS.md editor a block, in place of theirs. SkeletonLines is a few stacked lines for such blocks.
This commit is contained in:
parent
38505a5864
commit
a9f0d61daa
1 changed files with 106 additions and 27 deletions
|
|
@ -65,3 +65,24 @@
|
|||
.ui-skeleton-region {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
/* Lines of text stacked with a line's own spacing. */
|
||||
.ui-skeleton-lines {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.6em;
|
||||
}
|
||||
|
||||
/* A badge placeholder as tall and wide-set as an interactive Badge
|
||||
(`.ui-badge-interactive` in @hive/shared's Badge.css: the settings values
|
||||
are all buttons), so the pill does not change size when its value lands. */
|
||||
.ui-skeleton-badge {
|
||||
box-sizing: border-box; /* as the button it stands in for */
|
||||
min-height: 2.75em;
|
||||
padding-inline: 0.8em;
|
||||
border-radius: 999px;
|
||||
}
|
||||
.ui-skeleton-badge .ui-skeleton {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue