Skip to content

chore: migrate to @moonlight/ui@v0.3.1 + standardize deno task check#13

Merged
AquiGorka merged 3 commits into
mainfrom
chore/migrate-to-moonlight-ui-v0.3.1
May 12, 2026
Merged

chore: migrate to @moonlight/ui@v0.3.1 + standardize deno task check#13
AquiGorka merged 3 commits into
mainfrom
chore/migrate-to-moonlight-ui-v0.3.1

Conversation

@AquiGorka
Copy link
Copy Markdown
Contributor

Summary

Migrates network-dashboard to consume @moonlight/ui@v0.3.1 (nav only — network has no onboarding flow, no auth-gated views, so no stepper/invite-waitlist/page-wrapper). Also standardizes deno task {check,lint,fmt,fmt:check} to match the other 3 apps.

Changes

Build infrastructure (9d2800e):

  • src/build.ts: UI_LIB_TAG = "v0.3.1" + buildStyles() fetches lib tokens.css + base-styles.css + nav.css from raw.githubusercontent.com and concatenates with src/app-styles.css into public/styles.css.
  • src/app-styles.css (new, 179 lines): network-unique selectors — .nav-brand:hover variant, table CSS, .text-muted utility, .loading, .clickable-row, map (.map-container/.world-map/.council-dot/.council-label), council grid, transaction feed, error banner.
  • public/styles.css: tracked-deletion + added to .gitignore.
  • deno.json: adds check/lint/fmt/fmt:check tasks; adds @moonlight/ui/nav import pinned at v0.3.1.

Consumer refactor (f5600fa):

  • src/components/nav.ts deleted.
  • src/lib/nav.ts (new): getNav() helper wrapping renderNav from @moonlight/ui/nav with the network-dashboard brand + 3 top-level links. Helper exists so the 4 view files don't each duplicate the brand/links arrays.
  • src/views/{transactions,councils,council-detail,map}.ts: switched from importing local renderNav to getNav. Call shape (el.appendChild(getNav())) preserved.

Version (d923c9c): 0.2.80.2.9 (alone).

Test plan

  • deno task build — exit 0
  • deno task lint — clean (20 files)
  • deno task fmt --check — clean (21 files)
  • deno task test — 30 / 30 pass
  • deno task check — clean (new task)
  • No @ts-ignore or as any introduced
  • CI on this PR — pending

Lib reference

Pinned at Moonlight-Protocol/ui@v0.3.1.

AquiGorka added 3 commits May 12, 2026 18:37
…s.css

Adds UI_LIB_TAG = "v0.3.1" pin + buildStyles() step in src/build.ts that
fetches the lib's tokens.css + base-styles.css + nav.css from
raw.githubusercontent.com and concatenates them with src/app-styles.css into
the served public/styles.css. raw.githubusercontent.com serves CSS as
text/plain with nosniff so browser @import would be rejected — fetch happens
at build time and the served file is same-origin text/css.

network-dashboard does not consume the lib's stepper or invite-waitlist
(no onboarding flow, no auth-gated views), so those CSS files aren't
fetched. tokens + base-styles + nav are enough.

public/styles.css is now a build artifact: gitignored, tracked-deletion
committed here. src/app-styles.css (new) holds network-unique selectors only:
.nav-brand:hover variant, table CSS, .text-muted utility, .loading,
.clickable-row, map (.map-container/.world-map/.council-dot/.council-label),
council grid (.council-card and friends), transaction feed (.feed-list/
.feed-item and friends), error banner.

deno.json adds check/lint/fmt/fmt:check tasks to mirror moonlight-pay's
shape (uniform across the 4 apps). Imports add @moonlight/ui/nav pinned at
v0.3.1.
- src/components/nav.ts deleted.
- src/lib/nav.ts new: getNav() helper that calls renderNav from
  @moonlight/ui/nav with the network-dashboard brand ("Moonlight Network")
  and the three top-level links (Map / Councils / Transactions). Helper
  exists so the 4 view files don't each duplicate the brand + links arrays.
- src/views/{transactions,councils,council-detail,map}.ts: switched from
  importing renderNav from the deleted local file to importing getNav from
  the new lib/nav.ts helper. Call site shape (el.appendChild(getNav()))
  preserved.
@AquiGorka AquiGorka added the enhancement New feature or request label May 12, 2026
@AquiGorka AquiGorka merged commit 1c164ca into main May 12, 2026
4 checks passed
@AquiGorka AquiGorka deleted the chore/migrate-to-moonlight-ui-v0.3.1 branch May 12, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant