-
Notifications
You must be signed in to change notification settings - Fork 135
feat: migrate to Vite vanilla TypeScript, drop jQuery and legacy scripts #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b4d7358
Initial plan
Copilot 9579d94
feat: migrate to Vite vanilla TypeScript, replace jQuery with vanilla TS
Copilot c07e3fd
refactor: pwafire APIs, modern content, remove console logs
mayeedwin 6026305
perf: reduce bundle size, modernize layout
mayeedwin 8a0c178
design: modern dark theme redesign
mayeedwin 81242b6
refactor: single-page layout with brief intros
mayeedwin d8db8fb
chore: use favicon.ico
mayeedwin 349008f
chore: add favicon.ico
mayeedwin 7d9d9ab
chore: remove Previously work history from Work section
mayeedwin 7fabf4c
chore : docs
mayeedwin 8bef421
fix: address review feedback — types, SW correctness, manifest icons,…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Agent Guidance — mayeedwin/profile | ||
|
|
||
| ## Project Overview | ||
| Personal PWA profile page for Maye Edwin — a **Vite + vanilla TypeScript** single-page app deployed to **Firebase Hosting**. No UI frameworks. Uses the [`pwafire`](https://pwafire.org/developer) library for Web Share and PWA install prompts. | ||
|
|
||
| ## Architecture | ||
| ``` | ||
| index.html ← Vite HTML entry (root) — single-page layout, no panel routing | ||
| src/ | ||
| main.ts ← Service worker registration + initWebShare() + install prompt | ||
| web-share.ts ← pwafire-based share logic; triggers on [data-share] buttons | ||
| vite-env.d.ts ← Vite client type reference (required for CSS imports in TS) | ||
| style.css ← All styles; Google Fonts (Syne, Plus Jakarta Sans) via CDN @import | ||
| public/ | ||
| manifest.json ← PWA web manifest (icons reference per-size files) | ||
| service-worker.js ← Network-first caching SW with waitUntil-safe cache writes | ||
| icons/ ← pwafire128white.png, pwafire144white.png, pwafire192white.png, pwafire512.png | ||
| images/ ← mayeedwingdg.jpg and other profile images | ||
| dist/ ← Vite build output (gitignored) — Firebase Hosting serves this | ||
| ``` | ||
|
|
||
| ## Critical Developer Workflows | ||
| ```bash | ||
| npm install # install deps (vite, typescript, pwafire) | ||
| npm run dev # local dev server at http://localhost:5173 | ||
| npm run build # tsc type-check + vite build → dist/ | ||
| npm run preview # serve dist/ locally for smoke-testing | ||
| ``` | ||
| Firebase deploy: `firebase deploy` — reads `"public": "dist"` from `firebase.json`. | ||
|
|
||
| ## Key Patterns & Conventions | ||
|
|
||
| ### Layout | ||
| Single-page — all content visible in one scroll, no JS-driven panel transitions. | ||
| `#wrapper` > `.hero` + `.intro` sections + `footer` — all static HTML. | ||
|
|
||
| ### Web Share (src/web-share.ts) | ||
| Any element with `[data-share="<context>"]` triggers sharing via `pwafire.webShare`. | ||
| Context must be one of `"home" | "work" | "about" | "contact"` — validated against `VALID_CONTEXTS` before use; falls back to `"home"` for unknown values. | ||
| Falls back to `pwafire.copyText(url)` if sharing fails. | ||
| Share trigger in HTML: `<button type="button" class="btn" data-share="home">Share</button>`. | ||
|
|
||
| ### PWA / Service Worker | ||
| Service worker registered in `src/main.ts` on `window load` (errors logged with `console.warn`). | ||
| `public/service-worker.js` uses a **network-first** strategy: serves from network, writes to cache using `e.waitUntil(...)` so the write isn't terminated early, falls back to cache on failure. | ||
| Offline fallback returns `Response.error()` when neither network nor cache is available. | ||
|
|
||
| ### CSS | ||
| `src/style.css` — dark theme (`--bg: #0a0a0a`). No CSS framework. | ||
| Google Fonts `Syne` + `Plus Jakarta Sans` imported via CDN `@import` at top of file. | ||
| No Font Awesome — social icons are inline SVG in `index.html`. | ||
|
|
||
| ### Firebase | ||
| Project: `pwafire-codelab` (see `.firebaserc`). | ||
| `firebase.json` sets `"public": "dist"` — run `npm run build` before deploying. | ||
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This architecture block claims
src/main.tscontains panel navigation logic andstyle.cssimports Google Fonts + Font Awesome, but the currentsrc/main.tsonly registers the service worker / init code andsrc/style.cssimports different fonts and no Font Awesome. Please update this doc to match the current structure/behaviour.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in
8bef421— the architecture section now correctly shows the single-page layout,Syne/Plus Jakarta Sansfonts (no Font Awesome), andmain.tsas SW registration + share/install init.