voelin-ui: design system, shells and view models for the new design

The single 1700-line app.slint becomes a design system and screens that
later waves can compose:

- theme.slint: colour, radius, spacing and type tokens (dark and light,
  a runtime font scale); icons.slint: Lucide icons as tintable images.
- components/: Button, IconButton, TextField, SearchBox, Select, Toggle,
  Slider, SegmentedTabs, Avatar, badges, Card, Meter, NavItem, ListItem,
  PopupMenu, Tooltip, Modal, Toast, ResizeHandle, Spinner, RichText and
  the EmojiPicker.
- shells/: the desktop frame (server rail, top bar, sidebar with the user
  card) and the phone frame with a bottom navigation, switched at a
  breakpoint from the settings.
- screens/: today's screens re-skinned (channels, chat, streams panel and
  viewer, settings page, home, dialogs, phone pages); all callbacks and
  properties keep their behaviour. Navigation state is the Nav global.

On the Rust side app.rs keeps setup and event glue; servers.rs, chat.rs,
settings_page.rs and appearance.rs hold the logic, vm/ the pure view
models, bind/ the callbacks, dev.rs the development switches. Models are
created once and updated row by row (vm::list::sync); each chat tab owns
its lines model, so a message appends one row. Emoji come from the
bundled Twemoji archive through a size-bounded image cache, split into
runs that wrap with the text. New settings ui.theme, ui.font_scale,
ui.narrow_breakpoint and ui.image_cache_mb apply live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
Claude committed 2026-09-28 02:22:25 +00:00
1 parent 529211bfc6
commit c854053090
58 files changed
+8849 -2628

No files matched your search

+19 -9
View File
@@ -165,8 +165,15 @@ RANGES = [
((0x1F3FB, 0x1F3FF), "people"),
]
# Emoji newer than Python 3.11's Unicode database (14.0).
# Emoji newer than Python 3.11's Unicode database (14.0), and common
# emoji whose character name differs from the name people search for.
EXTRA_NAMES = {
0x2764: "red heart",
0x2B50: "star",
0x1F44D: "thumbs up",
0x1F44E: "thumbs down",
0x1F525: "fire",
0x1F602: "face with tears of joy laughing",
0x1F6DC: "wireless",
0x1FA75: "light blue heart",
0x1FA76: "grey heart",
@@ -212,16 +219,17 @@ def entry_name(cps):
def category(cps):
"""The category and the position of the matching range (for ordering)."""
if all(0x1F1E6 <= cp <= 0x1F1FF for cp in cps) and len(cps) == 2:
return "flags"
return "flags", 0
first = cps[0]
# Keycaps and other text symbols.
if first < 0x2000 or (0x20E3 in cps):
return "symbols"
for (lo, hi), cat in RANGES:
return "symbols", len(RANGES)
for i, ((lo, hi), cat) in enumerate(RANGES):
if lo <= first <= hi:
return cat
return "symbols"
return cat, i
return "symbols", len(RANGES)
def in_picker(cps):
@@ -248,17 +256,19 @@ def main():
cps = [int(p, 16) for p in key.split("-")]
with open(os.path.join(src, file), "rb") as f:
svg = f.read().strip()
cat = category(cps)
cat, order = category(cps)
items.append({
"key": key,
"cps": cps,
"svg": svg,
"cat": CATEGORIES.index(cat),
"order": order,
"name": entry_name(cps),
"picker": in_picker(cps) and entry_name(cps) != "",
})
# Data in picker order: category, then code points.
items.sort(key=lambda it: (it["cat"], it["cps"]))
# Data in picker order: category, the order of RANGES (smileys start
# with the smiling faces), then code points.
items.sort(key=lambda it: (it["cat"], it["order"], it["cps"]))
blocks = []
raw = bytearray()
for it in items: