Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
efaf07f
Merge pull request #19 from MarcoPoloResearchLab/improvement/MP-204-i…
tyemirov Jan 8, 2026
c36c39e
Merge pull request #18 from MarcoPoloResearchLab/improvement/MP-203-b…
tyemirov Jan 8, 2026
40b3ce2
Merge pull request #17 from MarcoPoloResearchLab/bugfix/MP-301-footer…
tyemirov Jan 8, 2026
1e75788
Merge pull request #20 from MarcoPoloResearchLab/maintenance/MP-410-s…
tyemirov Jan 8, 2026
df7a787
npm dependencies
tyemirov Jan 8, 2026
e0b7f11
Service files ignored
tyemirov Jan 8, 2026
8cf8570
refactor(schema): move subscribeEnabled into subscribe object
tyemirov Jan 8, 2026
bee77a9
refactor: add explicit subscribe.enabled to all projects
tyemirov Jan 8, 2026
0f4e464
refactor: consolidate launch and docs into configuration objects
tyemirov Jan 8, 2026
04864a5
fix: remove duplicate mpr-band custom element registration
tyemirov Jan 8, 2026
536af31
local development runs with SSL certs
tyemirov Jan 8, 2026
991930d
fix: resolve Safari iframe positioning in flipped cards
tyemirov Jan 9, 2026
20e717b
fix: preserve LoopAware URL parameters and API endpoint in srcdoc iframe
tyemirov Jan 9, 2026
8789794
refactor: replace iframe with direct script embedding for subscribe w…
tyemirov Jan 9, 2026
aa3b465
refactor: use LoopAware target parameter (LA-113) for subscribe forms
tyemirov Jan 11, 2026
5210a41
refactor: use declarative target field in subscribe config
tyemirov Jan 11, 2026
3f3c93d
fix: prevent card flip when interacting with subscribe form
tyemirov Jan 11, 2026
7129a8f
feat: flip card back after successful subscription
tyemirov Jan 11, 2026
c0eab84
refactor: simplify subscribe success UX and remove defensive code
tyemirov Jan 11, 2026
e255229
Future development
tyemirov Jan 16, 2026
1d85f1c
Development watch for the changed filed to reload docker
tyemirov Jan 16, 2026
793e316
Subscription sections
tyemirov Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ docs/TAuth
.env.*
qodana.yaml
bin/
PLAN.md
11 changes: 11 additions & 0 deletions ISSUES.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Each issue is formatted as `- [ ] [<ID>-<number>]`. When resolved it becomes -`
- Rationale for current code: Likely added to prevent focus from jumping into the iframe during card flip animation or while card is not flipped.
- Fix: Conditionally set `tabindex="0"` on the iframe when the card enters the flipped state (`is-flipped` class added) and restore `tabindex="-1"` when unflipped. Update the `toggleFlip` handler in `script.js:207-225` to toggle the iframe's tabindex alongside the flip state.
- Extend Playwright test `subscribe-enabled cards render LoopAware forms after flipping` to assert that the iframe is focusable (`tabindex="0"`) when the card is flipped.
- [ ] [MP-205] Add the four-way color theme switch and style all of the lements accordingly. Use theme-config in the footer to style all elements and choose theme-switcher="square". Read up @tools/mpr-ui/README.md and @tools/mpr-ui/docs/integration-guide.md

## BugFixes (300–399)

Expand All @@ -107,6 +108,16 @@ Each issue is formatted as `- [ ] [<ID>-<number>]`. When resolved it becomes -`
- Root cause: The mpr-ui CDN stylesheet likely sets `position: relative` on the `mpr-footer` custom element, and our local `styles.css:536-541` does not explicitly override it to `static`.
- Fix: Add `position: static;` to the `mpr-footer { ... }` rule block in `styles.css` at line 536 to ensure the host element is not positioned, regardless of CDN defaults.
- Verify fix passes: `npx playwright test --grep "footer respects non-sticky"`.
- [ ] [MP-302] Subscribe iframe positioned off-screen in Safari due to nested 3D transform issues
- Symptom: LoopAware subscribe form renders inside iframe (verified via `contentDocument.body.innerHTML`) but is visually invisible when card is flipped.
- Debug findings:
- Overlay `getBoundingClientRect()`: `y: 61.9` (correct, visible)
- Iframe `getBoundingClientRect()`: `y: -580` (incorrect, ~640px above viewport)
- Iframe dimensions: `436x180` (correct)
- Iframe content: form with `#mp-subscribe-form` renders correctly
- Root cause: Safari miscalculates iframe position within nested 3D-transformed containers. The `.project-card-subscribe-overlay` has `transform: rotateY(180deg)` to counter the card flip, but Safari's compositor places the iframe at pre-transform coordinates.
- Additional issue: Cross-origin script loading from `srcdoc` iframe was blocked by Safari; fixed by fetching script content and inlining it.
- Fix: Flatten 3D context for subscribe widget content using `transform-style: flat` on the overlay, ensuring child elements use 2D positioning within the already-transformed container.

## Maintenance (400–499)

Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,32 @@ Each entry in the project gallery is powered by `data/projects.json`:

Vectorizing images or text to SVG can be done using the tools available in the [svg_tools](https://github.com/tyemirov/svg_tools) repository.

## Adding Subscribe Forms

Projects can display a LoopAware-powered subscribe form on their card back. To enable:

1. **Create a site in LoopAware** – register your project at [loopaware.mprlab.com](https://loopaware.mprlab.com) and note the `site_id`.

2. **Add the subscribe config** to the project entry in `data/projects.json`:

```json
"subscribe": {
"enabled": true,
"script": "https://loopaware.mprlab.com/subscribe.js?site_id=YOUR_SITE_ID&mode=inline&accent=%23ffd369&cta=Subscribe&success=Thanks%20for%20subscribing&name_field=false",
"target": "subscribe-target-YOUR_PROJECT_ID",
"title": "Get PROJECT_NAME updates",
"copy": "Drop your email to hear when PROJECT_NAME ships new features."
}
```

3. **Key fields**:
- `script` – LoopAware widget URL with your `site_id` and customization params
- `target` – unique DOM ID where the form renders (use pattern `subscribe-target-{project-id}`)
- `title` – heading shown above the form
- `copy` – description text below the heading

The card will automatically become flippable and load the subscribe widget when the user flips it.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Loading