chore: migrate to @moonlight/ui@v0.3.1 + standardize deno task check#13
Merged
Conversation
…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.
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.
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 standardizesdeno 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 libtokens.css+base-styles.css+nav.cssfrom raw.githubusercontent.com and concatenates withsrc/app-styles.cssintopublic/styles.css.src/app-styles.css(new, 179 lines): network-unique selectors —.nav-brand:hovervariant, table CSS,.text-mutedutility,.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: addscheck/lint/fmt/fmt:checktasks; adds@moonlight/ui/navimport pinned at v0.3.1.Consumer refactor (
f5600fa):src/components/nav.tsdeleted.src/lib/nav.ts(new):getNav()helper wrappingrenderNavfrom@moonlight/ui/navwith 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 localrenderNavtogetNav. Call shape (el.appendChild(getNav())) preserved.Version (
d923c9c):0.2.8→0.2.9(alone).Test plan
deno task build— exit 0deno task lint— clean (20 files)deno task fmt --check— clean (21 files)deno task test— 30 / 30 passdeno task check— clean (new task)@ts-ignoreoras anyintroducedLib reference
Pinned at
Moonlight-Protocol/ui@v0.3.1.