Repository navigation
Conversation
… form section into elements Bottom rung of the donation form stack. The data-models, currency-validator and form-section packages from iaux-donation-form land in src/elements/ia-donation-form/ as models/, currency-validator.ts and form-elements/ia-donation-section.ts. The 14 model files fold into six. The enums become as-const objects plus a type, since erasableSyntaxOnly rules out enum. The classes stay classes: offshoot, the monthly giving portal and the petabox banner all construct them. The section is ia-donation-section, sized off a 10px base font size variable like the item navigator so it renders the same under any root font size, with its CSS variables renamed to --ia-donation-section-*. story-template gets an importPath property so an element nested inside another component's directory shows the right import snippet. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QnX6VHo3EJRzcKfhzBChCf
The edit-donation package from iaux-donation-form lands as ia-donation-edit-donation under src/elements/ia-donation-form/form-elements/, rendering ia-donation-section for its two steps. The petabox banner uses it on its own, so it gets its own story. Enums become as-const objects plus a type. CSS variables move to --ia-donation-edit-*, sized off a 10px base font size that is passed through to the sections. The strings go through msg(), the custom amount field gets an accessible name, and currency.js becomes a dependency. One inherited bug fixed: with the custom amount hidden, the "is the donor typing in the custom field" check compared null to null and came out true, so a preset set programmatically could end up with nothing selected. Guarded on the field existing, with a test. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QnX6VHo3EJRzcKfhzBChCf
The Braintree manager, payment clients and the five provider handlers (credit card, PayPal, Venmo, Apple Pay, Google Pay) land under src/elements/ia-donation-form/braintree/, with the recaptcha manager, the Venmo session restoration handler and DonationFormError alongside. No custom elements in this rung. The flow handlers go with the modals next. The vendored 2020 braintree-web and paypal-checkout-components d.ts files are replaced by the real @types packages, which split the library module (typeof braintree.client) from the instance (braintree.Client), so the clients and handlers are typed that way. The fee_amount_covered custom field is calculated from the fields like the total already was, since donationInfo can arrive as a plain object. The hosted fields retry no longer uses an async promise executor and clears its timer whichever way the race goes. The recaptcha onload callback global is namespaced so it can't collide with the old package's on a page that loads both. Tests move from web-test-runner and sinon to Vitest, with the payment library mocks under test-helpers/. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QnX6VHo3EJRzcKfhzBChCf
…lements The rest of donation-form lands under src/elements/ia-donation-form/: the form, controller, header, summary, total amount, badged input, payment selector and contact form as ia-donation-* elements, the three modal contents under modals/, and the payment flow handlers with the donation flow modal manager under flow-handlers/. The icon-* packages become SVGs, masked for the monochrome ones and plain <img> for the brand logos. The controller gets a story wired to the Braintree sandbox with a demo endpoint manager and buttons for the modals. The story renders in the light DOM, since Braintree and PayPal find their containers with document.querySelector, and only loads the third-party scripts once you press "Connect to the sandbox", so the demo page and its test stay off the network. Beyond the move: the payment selector's PayPal cover is a real button with an aria-label like the other providers, the brand logos have alt text, and the collapse rule only hides the provider buttons so the cover survives being pressed with an invalid amount. The upsell thank-you logs and calls donationSuccessful once instead of twice. The credit card container lost its duplicate class attribute so the hidden class applies. The controller no longer replaces a consumer-supplied paymentClients when environment is set in a later update. The form defaults donationInfo to the standard selection so the header renders without one. The PayPal button render reads the funding constants off window.paypal defensively. TYD is TWD, the confirm modal's currencyType defaults to USD, the hosted field placeholders go through msg(), and a Google Pay billing name is trimmed before the first/last split. The form's theming variables are --ia-donation-form-* and the base font size flows down to the section and edit elements from the form's host. modal-manager and analytics-manager are npm dependencies. Tests move to Vitest, with a mock modal manager element and mock flow handlers under test-helpers/. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QnX6VHo3EJRzcKfhzBChCf
jbuckner
added this pull request to stack #101
September 15, 2026 06:00
|
The modal-manager element paints its backdrop whenever it's in the DOM, so the demo page was covered by a black layer that swallowed every click on every story. The host is expected to hide it, as its README says. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QnX6VHo3EJRzcKfhzBChCf
The demo derives the sidebar entry and the anchor from the story's file name, so ia-donation-form-story.ts showed up as <ia-donation-form> while the card inside said <ia-donation-form-controller>. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QnX6VHo3EJRzcKfhzBChCf
…onation-form-models * origin/main: 1.1.1 (#118) WEBDEV-9132: Fix Safari image-viewer wide-layout breakpoint (#115) 1.1.0 (#116) WEBDEV-9129: Exclude story files from coverage reporting (#113) WEBDEV-9121: Migrate histogram-date-range into elements (#112) WEBDEV-9130: Exclude nested dist and worktree tests from local runs (#114) v1.0.0 (#111) WEBDEV-9025: Add a CLAUDE.md covering the publish flow (#94) WEBDEV-9063: Typecheck in CI (#107) v0.4.1 (#108) WEBDEV-9066: Guard custom element registration against duplicate defines (#106) v0.4.0 (#99) WEBDEV-9022: Migrate the image viewer into elements (#93)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013RS8ThjiMNiq7HBBAGash1
…onation-form-models Main removed src/elements/index.ts (WEBDEV-9214), so the donation form re-exports this branch added to it go with it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ
…te-edit-donation Keeps both currency.js and dayjs in package.json. Main removed src/elements/index.ts (WEBDEV-9214), so the edit-donation re-export goes with it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ
The lint rule that came in from main restricts customElement from lit/decorators.js. Same change #98 made for the section. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ
Ports iaux-donation-form#188 (WEBDEV-8781). Safari private browsing throws a SecurityError from reading the localStorage or sessionStorage global, so the lookup now happens inside the guarded probe. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ
Ports the payment layer part of iaux-donation-form#190. The credit card form focuses the card number field when the donor picks credit card. The vendored braintree hosted-fields type patch isn't needed here since @types/braintree-web already declares HostedFields.focus. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ
…ent-layer Main removed src/elements/index.ts (WEBDEV-9214), so the payment layer re-exports go with it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ
…tion-form-elements Main removed src/elements/index.ts (WEBDEV-9214), so the re-exports go with it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ
…tomElement The lint rule that came in from main restricts customElement from lit/decorators.js. Same change #98 made for the section. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ
Ports iaux-donation-form#190 (Credit Card Form Update). The card fields move into a new ia-donation-credit-card-fields element that renders under the payment selector, and the card number gets focus when Credit Card is picked. The contact form gets visible labels, drops Address Line 2, puts first and last name side by side and moves country above state and zip. An empty hosted field is no longer marked red on blur. The demo's font variable panel is covered by new Font settings in the controller story. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ
…dit-donation Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ * origin/main: WEBDEV-9051: Migrate the donation form models, currency validator and form section into elements (#98) # Conflicts: # src/elements/ia-donation-form/element-names.test.ts
…ent-layer Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ * WEBDEV-9052-migrate-edit-donation: WEBDEV-9051: Migrate the donation form models, currency validator and form section into elements (#98)
…tion-form-elements Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8FoDPcJXekJd1rL9b9oJJ * WEBDEV-9053-migrate-payment-layer: WEBDEV-9051: Migrate the donation form models, currency validator and form section into elements (#98)
Use the stable promised-singleton 0.2.1. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012rHVriHUtoMwtEUwFdyZdS
…tion-form-elements Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012rHVriHUtoMwtEUwFdyZdS
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012rHVriHUtoMwtEUwFdyZdS
…d blocks The icons are drawn as CSS masks, which only use alpha, so the white shapes inside them painted as black. Make those shapes real holes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0157trZFYVoSW5pgbgkE6aiG
This branch has not been deployed
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.
WEBDEV-9054. Stacked on #103. Last of the five in WEBDEV-8602.
Everything left in
donation-form: the form, controller, header, summary, total amount, badged input, payment selector and contact form asia-donation-*elements, the three modal contents, and the payment flow handlers with the donation flow modal manager. It all lands undersrc/elements/ia-donation-form/. Theicon-*packages become SVGs (masked for the monochrome ones, plain<img>for the brand logos). The controller gets a story against the Braintree sandbox, with a demo endpoint manager, an analytics readout and buttons to pop the upsell and confirmation modals. The story renders in the light DOM (Braintree and PayPal find their containers withdocument.querySelector) and only loads the third-party scripts after you press "Connect to the sandbox", so the all-elements demo page andapp-root.test.tsdon't reach out to Braintree, PayPal, Google or reCAPTCHA on their own.What changed beyond the move:
<button>. It was a<div>with a click handler, so it had no keyboard access or accessible name. It has anaria-labellike the other provider buttons now, and the brand logos carryalttext.paymentClientsyou hand it. It built its own on everyenvironmentchange, replacing yours ifenvironmentlanded in a later update. It only rebuilds the set it created itself now.donationInfo. Without one the header's edit-donation element threw on render. It uses the same default selection as the controller.<button>, the "collapse the other providers" rule caught it too, so one press with a bad amount hid the cover and the next click reached PayPal's real button. The rule only collapses the provider buttons now, with a test.showThankYouModalloggedDonated-X-upselland calleddonationSuccessfultwice on the upsell path. Once now.classattributes, so thehiddenone was dropped by the parser.TYDisTWDin the currency symbols, the confirm modal'scurrencyTypedefaults toUSDrather than$, and a Google Pay billing name is trimmed before the first/last split so the surname doesn't keep a leading space.ia-donation-credit-card-fieldselement and sit under the payment selector, with the card number focused when you pick Credit Card. The contact form has visible labels and no placeholders, no Address Line 2, first and last name on one row, and country above state and zip. An empty card field isn't marked red on blur. The contact section is titled "Enter contact information". The unused email, user and locale pin icons are gone.window.paypal.FUNDINGdefensively. Only the Venmo exclusion needs it, and the script isn't there in tests.--ia-donation-form-*(text, background, badge, payment option and selected option colors, donate button, base font size). The base font size flows down from the form's host to the section and edit elements.AnalyticsManagerInterfacefrom@internetarchive/analytics-manager, and the modals through@internetarchive/modal-manager. Both are regular dependencies, as decided for the stack.Tests moved from web-test-runner to Vitest, 131 of them, with a
test-mock-modal-managerelement and mock flow handlers undertest-helpers/. Two contact form tests now assert what the browser actually does onreportValidity(): it focuses the first invalid field, and focusing a field clears its error mark.Verified locally: build, full suite 1248 passing, eslint and prettier clean, no circular dependencies.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QnX6VHo3EJRzcKfhzBChCf