Files
formipay/node_modules/third-party-web/facades.md
dwindown e8fbfb14c1 fix: prevent asset conflicts between React and Grid.js versions
Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:02:14 +07:00

2.5 KiB

Facade data in third-party-web

In addition to identifying entities, third-party-web also includes data on entities' products, and available alternative libraries for products known as facades. A third-party product is a third-party resource that is included on a page associated with a specific integration/SDK/API, for example: a YouTube embed iframe. A facade is a frontend element which looks similar to the actual product and lazily loads it upon user interaction. It's expected to be significantly more lightweight/faster. For example: lite-youtube-embed.

Lighthouse 7.0 has a new audit that identifies third-party embeds that can be lazy loaded with a facade. The Lighthouse audit is powered by the facade data in third-party-web.

Criteria for adding a new facade

Basic functionality

  • Loads a frontend "component" which looks like the actual third-party embed.
  • After some user interaction (click, mouseover, etc), component replaces itself with the actual third-party embed.

Well Maintained

  • The projects issues and contributions are managed responsibly. Bugs are handled swiftly (e.g within 60 days of filing).
  • Is already used in production, ideally by users other than the creator.

Orthogonal

  • The facade handles a use case not covered by existing facades. For example: a lite-youtube clone isn't differentiated, but a react port of lite-youtube would work.

Small Payload

  • Should be significantly smaller in comparison to the deferred third-party product.
    • The JS/CSS/image/etc payload should be the minimum size necessary to mimic the product. (A rough rule of thumb is a facade should be < 10% of the product it's mimicking)
    • We'd expect the facade to score 99+ in Lighthouse if it's tested on an otherwise-blank page.
    • Any required images should be as small as is reasonable. Using blurred, low-res, or SQIP techniques may be advantageous.

Submission Process

Anyone can propose changes, by making a pull request to this repo. Proposals don't necessarily need to be submitted by the creator.

Read contributing for basics; look in data/entities.js for products to see how the data is structured.