-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(schema): move subscribeEnabled into subscribe object #21
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
Open
tyemirov
wants to merge
22
commits into
maintenance/MP-410-script-style-cleanup
Choose a base branch
from
improvement/subscribe-schema-refactor
base: maintenance/MP-410-script-style-cleanup
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
refactor(schema): move subscribeEnabled into subscribe object #21
tyemirov
wants to merge
22
commits into
maintenance/MP-410-script-style-cleanup
from
improvement/subscribe-schema-refactor
Conversation
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
…frame-accessibility improvement(a11y): toggle iframe tabindex on card flip (MP-204)
…and-order-alignment improvement(layout): align band order with MP-103 requirements (MP-203)
…-position-static fix(footer): override CDN position for non-sticky footer (MP-301)
…cript-style-cleanup chore(style): remove extra blank line in script.js (MP-410)
- Removed top-level `subscribeEnabled` field from project schema
- Added `enabled` property inside `subscribe` object
- Updated script.js to read from `subscribe.enabled`
- Updated test typedef and filter logic
- Fixed JSON syntax error (curly quotes in Poodle description)
Schema change:
Before: { subscribeEnabled: true, subscribe: { script: "..." } }
After: { subscribe: { enabled: true, script: "..." } }
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added `subscribe: { enabled: false }` to all 13 projects without
active subscriptions
- Updated test logic to check `subscribe.enabled !== false` combined
with `subscribe.script` for determining if subscribe is active
- Maintains backward compatibility while making schema explicit
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replaced `app`/`launchEnabled` with `launch: { enabled, url }`
- Replaced `docs`/`docsEnabled` with `docs: { enabled, url }`
- Normalized schema: all config objects (launch, docs, subscribe) follow
the same `{ enabled: boolean, ...config }` pattern
- Updated script.js typedefs and card rendering logic
- Updated tests to use new schema accessors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The mpr-ui CDN already defines the mpr-band custom element. Loading the local mpr-band.js caused Safari to throw: "NotSupportedError: Cannot define multiple custom elements with the same tag name" Removed the redundant local script and deleted the unused mpr-band.js. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fetch and inline LoopAware script content to bypass cross-origin restrictions in Safari's srcdoc iframe handling - Remove rotateY(180deg) transform from subscribe overlay that caused Safari to miscalculate iframe position (~640px off-screen) - Add CSS overrides for subscribe form to match dark theme - Remove inner border/card styling for cleaner appearance - Document MP-302 bug and fix in ISSUES.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The LoopAware subscribe.js reads configuration from its script tag's src attribute and derives API endpoint from location. In srcdoc iframes: - scriptTag.src is empty (no URL params) - location is "about:srcdoc" (wrong API endpoint) Patch the inlined script to: 1. Use original URL for config parsing (name_field, accent, etc.) 2. Use correct LoopAware host for API calls instead of location 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…idget Remove iframe/srcdoc approach that caused CORS issues in Safari (srcdoc iframes have Origin: null which cannot make cross-origin requests). Instead, load LoopAware subscribe.js directly on the page and move the form into the card container after it renders. This is a workaround until LoopAware implements LA-113 (target parameter support). Changes: - Remove iframe creation and srcdoc document building - Load subscribe.js via script tag, move form after render - Update CSS for direct form styling (no iframe) - Update Playwright tests for non-iframe form assertions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Now that LoopAware supports the target parameter, simplify the code to pass target ID directly instead of moving the form after render. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move target ID from programmatic generation to declarative config in projects.json. Each subscribe-enabled project now specifies its own target element ID. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Exclude form elements (input, button, textarea, select, label) and the subscribe form itself from triggering card flip. This allows users to interact with the subscribe form without the card flipping. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Listen for loopaware:subscribe:success CustomEvent and flip the card back after a 2-second delay to show the success message. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Hide form inputs after successful subscription, show only status message - Reset form state when card flips back (clear email, restore inputs) - Remove redundant null checks and duplicate variables - Document subscribe form configuration in README 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
Restructures the project catalog schema to nest the
enabledflag inside thesubscribeobject rather than at the project root level.Schema Change
Changes
data/projects.json: Removed top-levelsubscribeEnabled, addedenabledinsidesubscribeobjectscript.js: Updated typedef and logic to read fromsubscribe.enabledtests/hero.spec.js: Updated typedef and filter logicTest plan
npx playwright test— all 7 tests passnpx eslint script.js tests/*.js— no violations🤖 Generated with Claude Code