mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
# Design System Unification — one visual language, enforced end-to-end
Establishes **one source of truth for every visual decision**, wires the
whole app to it, and **locks it in with CI** so it can't drift back.
### Foundations
- **Design-token system ("one knob per decision").** Every colour, text
size, spacing, corner radius, and shadow is a named token defined in
exactly one place — change the token, every screen updates. Collapsed
hundreds of near-duplicate definitions and removed "fake" duplicates
that pretended to be different but weren't.
- **Shared component library (O2).** Buttons, tables, dialogs, drawers,
form fields, badges, etc. already know the correct colours, spacing, and
dark-mode behaviour; new screens compose them instead of hand-styling.
Added new primitives on this branch (`OContent`, `KpiCard`) and
standardized existing ones.
- **One page structure everywhere** (`PageLayout` / `AppPageHeader` /
`AppPage` / `OContent`) — titles, breadcrumbs, spacing, and content
edges line up identically across every screen.
- **One table implementation** — all tabular data uses the same table
(sorting, density, sticky headers, empty states).
- **Styling consolidated onto Tailwind; old systems removed** —
hand-written CSS driven to the practical minimum, the legacy **Quasar**
framework fully removed, surviving stylesheets required to justify
themselves.
- **Two-tier corner radius** — a tight **4px** for controls and a soft
**12px** for surfaces (dialogs, cards, the app shell), plus a
full-circle option — replacing five radius names that all secretly meant
the same thing.
### Detailed improvements across screens
**Page structure & alignment** — unified page shell rolled across ~40+
screens (IAM, Settings, Alerts, Dashboards, Functions, Pipelines, RUM,
Metrics, Synthetics, Billing, editors, lists); one header height; one
page-edge grid driving headers, tables, rails, and tabs; unified
side-rail widths; inset rail selection/hover pills; every tab strip on
the grid line; tightened title/subtitle spacing.
**Tables (cross-screen)** — action columns consistently centered (incl.
Organizations); unified row-number column with no "#" truncation;
non-standard tables restyled to match; loading skeletons made
geometrically identical to the loaded table; symmetric edge inset; IAM
first-column grid alignment fixed.
**Traces** — flame graph + span-detail correlation panel fixes;
correlated logs/metrics placeholder fit; sticky headers; removed a
double scrollbar + a 1px sliver; aligned table fonts/badges; polished
the service detail drawer; stream-selector + correlation alignment;
aligned loading spinners; floating overlay arrows for the
disabled-services strip.
**Logs** — field-list controls aligned (focus ring no longer clipped);
detail-drawer spacing + metrics-tab overflow fixed; Run Query toolbar
tidied; listing sizing + stray border fixed.
**Metrics** — search added to the "Type" facet rail and aligned with the
other rails; proper empty states for the explorer and facet rail.
**Dashboards** — removed inconsistent card shadows; tightened
borders/resizers/field-list spacing; aligned View Dashboard chrome to
the grid; chart colours via the token helper.
**Home** — redesigned the Usage tab; added reusable KPI stat cards so
summary strips stop drifting.
**Dark mode** — new theme-switch animation; fixed a 1px content shift on
toggle and a white flash on load; fixed AI-chat text and assorted
light/dark mismatches; completed the token-driven dark migration.
**Empty states, controls & small polish** — restored 3 broken
empty-state animations; adopted the standard empty state; added the
sliding indicator to the toggle control; fixed the Quality-page inset +
drawer badge; refreshed Search History / Schedulers; fixed the
alert-history drawer scrollbar + timeline hover; removed a stray
menu-bar border.
### Dead code & cruft removal
- **Deleted the entire legacy `utilities.css`** global stylesheet (well
over a thousand lines) — evacuated in waves, roughly half of it dead
once traced.
- **Removed Quasar entirely**, including dead `.q-*` styles and ~25
phantom `--q-*` variables that were silently breaking bits of the UI.
- Stripped hundreds of **dead CSS classes and tokens that compiled to
nothing** — e.g. 46 uses of a colour class with no backing token, a
no-op shadow class on 51 elements, dead layout/utility classes, a
leftover `card-container` block, a dead table-actions token, and a
mis-registered gradient that rendered nothing.
- Cut **unused keyframe animations (19 → 3)** and removed **unused
components** + a stray build artifact.
- Net effect: a much smaller, leaner styling surface — less to maintain,
fewer dead ends to copy.
## Safety & verification
Large but low-risk: this is overwhelmingly a **styling and structure**
change, not product behaviour or data. Guarded by the
design-token/consistency/type checks above plus the existing test suite,
and reviewed screen-by-screen.
---------
Co-authored-by: Kirtan Thakkar <kirtan@kiara.tech>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: ktx-mihir <mihir.patel@kiara.tech>
70 lines
4.7 KiB
Bash
70 lines
4.7 KiB
Bash
#!/bin/bash
|
|
# Raw-token audit over web/src — categorized counts.
|
|
cd /Users/ktx/Documents/KTX-Projects/openobserve/web || exit 1
|
|
|
|
# Common exclusions: tests, specs, mocks, vendored assets, token definition files
|
|
EXC=(--glob '!**/*.spec.ts' --glob '!**/*.spec.js' --glob '!src/test/**' --glob '!**/__mocks__/**'
|
|
--glob '!src/assets/dashboard/echarts.min.js' --glob '!**/*.json' --glob '!**/*.md')
|
|
# Token definition files are the legitimate home of raw values
|
|
TOKENDEF=(--glob '!src/lib/styles/tokens/**')
|
|
|
|
SRC=(-g '*.vue' -g '*.ts' -g '*.js' -g '*.css' -g '*.scss' -g '*.sass')
|
|
|
|
section() { echo ""; echo "=== $1 ==="; }
|
|
|
|
section "1. HEX COLORS (app code, excl token defs)"
|
|
rg -o -i '#[0-9a-f]{3}(?:[0-9a-f]{3})?(?:[0-9a-f]{2})?\b' src "${SRC[@]}" "${EXC[@]}" "${TOKENDEF[@]}" 2>/dev/null | awk -F: '{print $1}' | sort | uniq -c | sort -rn > /tmp/audit_hex.txt
|
|
echo "total: $(awk '{s+=$1} END {print s}' /tmp/audit_hex.txt) files: $(wc -l < /tmp/audit_hex.txt)"
|
|
head -25 /tmp/audit_hex.txt
|
|
|
|
section "2. RGB/RGBA/HSL (app code, excl token defs)"
|
|
rg -o -i '\b(rgba?|hsla?)\(' src "${SRC[@]}" "${EXC[@]}" "${TOKENDEF[@]}" 2>/dev/null | awk -F: '{print $1}' | sort | uniq -c | sort -rn > /tmp/audit_rgb.txt
|
|
echo "total: $(awk '{s+=$1} END {print s}' /tmp/audit_rgb.txt) files: $(wc -l < /tmp/audit_rgb.txt)"
|
|
head -20 /tmp/audit_rgb.txt
|
|
|
|
section "3. LEGACY --o2-* USAGE (banned)"
|
|
rg -o -- '--o2-[a-z0-9-]+' src "${SRC[@]}" "${EXC[@]}" 2>/dev/null | awk -F: '{print $1}' | sort | uniq -c | sort -rn > /tmp/audit_o2.txt
|
|
echo "total: $(awk '{s+=$1} END {print s}' /tmp/audit_o2.txt) files: $(wc -l < /tmp/audit_o2.txt)"
|
|
head -20 /tmp/audit_o2.txt
|
|
|
|
section "4. PX VALUES excluding 1px (styles: vue/css/scss only)"
|
|
rg -o -i '\b([2-9]|[1-9][0-9]+)(\.[0-9]+)?px\b' src -g '*.vue' -g '*.css' -g '*.scss' -g '*.sass' "${EXC[@]}" "${TOKENDEF[@]}" 2>/dev/null | awk -F: '{print $1}' | sort | uniq -c | sort -rn > /tmp/audit_px.txt
|
|
echo "total: $(awk '{s+=$1} END {print s}' /tmp/audit_px.txt) files: $(wc -l < /tmp/audit_px.txt)"
|
|
head -25 /tmp/audit_px.txt
|
|
|
|
section "5. INLINE style= ATTRIBUTES in templates"
|
|
rg -c ' style="' src -g '*.vue' "${EXC[@]}" 2>/dev/null | sort -t: -k2 -rn > /tmp/audit_inline.txt
|
|
echo "total: $(awk -F: '{s+=$2} END {print s}' /tmp/audit_inline.txt) files: $(wc -l < /tmp/audit_inline.txt)"
|
|
head -20 /tmp/audit_inline.txt
|
|
|
|
section "6. TAILWIND ARBITRARY VALUES [..px] / [#hex]"
|
|
rg -o -i '\-\[(#[0-9a-f]{3,8}|[0-9.]+(px|rem|em|vh|vw|%))\]' src -g '*.vue' "${EXC[@]}" 2>/dev/null | awk -F: '{print $1}' | sort | uniq -c | sort -rn > /tmp/audit_arb.txt
|
|
echo "total: $(awk '{s+=$1} END {print s}' /tmp/audit_arb.txt) files: $(wc -l < /tmp/audit_arb.txt)"
|
|
head -20 /tmp/audit_arb.txt
|
|
|
|
section "7. TYPO UTILITIES (text-weight)"
|
|
rg -o '\b(text-weight-[a-z]+)\b' src -g '*.vue' "${EXC[@]}" 2>/dev/null | awk -F: '{print $1}' | sort | uniq -c | sort -rn > /tmp/audit_typo.txt
|
|
echo "total: $(awk '{s+=$1} END {print s}' /tmp/audit_typo.txt) files: $(wc -l < /tmp/audit_typo.txt)"
|
|
head -20 /tmp/audit_typo.txt
|
|
|
|
section "8. PALETTE color= PROPS (color=\"red\" etc.)"
|
|
rg -o '\b(color|text-color)="(red|blue|green|orange|purple|teal|pink|amber|grey|gray|cyan|indigo|lime|brown|black|white|primary|secondary|positive|negative|warning|info|accent)(-[0-9]+)?"' src -g '*.vue' "${EXC[@]}" 2>/dev/null | awk -F: '{print $1}' | sort | uniq -c | sort -rn > /tmp/audit_qcolor.txt
|
|
echo "total: $(awk '{s+=$1} END {print s}' /tmp/audit_qcolor.txt) files: $(wc -l < /tmp/audit_qcolor.txt)"
|
|
head -20 /tmp/audit_qcolor.txt
|
|
|
|
section "9. HARDCODED font-family"
|
|
rg -o -i 'font-family:\s*[^;"}]+' src "${SRC[@]}" "${EXC[@]}" "${TOKENDEF[@]}" 2>/dev/null | awk -F: '{print $1}' | sort | uniq -c | sort -rn > /tmp/audit_font.txt
|
|
echo "total: $(awk '{s+=$1} END {print s}' /tmp/audit_font.txt) files: $(wc -l < /tmp/audit_font.txt)"
|
|
head -15 /tmp/audit_font.txt
|
|
|
|
section "10. CSS NAMED COLORS in style contexts (white/black as values)"
|
|
rg -o -i '(color|background|background-color|border-color|fill|stroke):\s*(white|black|red|green|blue|orange|yellow|gray|grey|transparent)\b' src -g '*.vue' -g '*.css' -g '*.scss' "${EXC[@]}" "${TOKENDEF[@]}" 2>/dev/null | grep -v -i transparent | awk -F: '{print $1}' | sort | uniq -c | sort -rn > /tmp/audit_named.txt
|
|
echo "total: $(awk '{s+=$1} END {print s}' /tmp/audit_named.txt) files: $(wc -l < /tmp/audit_named.txt)"
|
|
head -15 /tmp/audit_named.txt
|
|
|
|
section "11. SCOPED <style> BLOCKS remaining"
|
|
rg -c '<style' src -g '*.vue' "${EXC[@]}" 2>/dev/null | wc -l | xargs echo "vue files with <style> blocks:"
|
|
|
|
section "SUMMARY BY DIRECTORY (hex+rgb+px+o2 combined)"
|
|
cat /tmp/audit_hex.txt /tmp/audit_rgb.txt /tmp/audit_px.txt /tmp/audit_o2.txt | awk '{n=$1; $1=""; split($2,p,"/"); print n, p[1]"/"p[2]}' | awk '{a[$2]+=$1} END {for (k in a) print a[k], k}' | sort -rn | head -20
|