Skip to content

Comments

Widget load improvements#479

Open
Sam Beveridge (00salmon) wants to merge 19 commits intomasterfrom
widget-load
Open

Widget load improvements#479
Sam Beveridge (00salmon) wants to merge 19 commits intomasterfrom
widget-load

Conversation

@00salmon
Copy link
Contributor

Description of the change

Description here

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation or Development tools (readme, specs, tests, code formatting)

Links

  • Jira issue number: (PUT IT HERE)
  • Process.st launch checklist: (PUT IT HERE)

Checklists

Development

  • Prettier was run (if applicable)
  • The behaviour changes in the pull request are covered by specs
  • All tests related to the changed code pass in development

Paperwork

  • This pull request has a descriptive title and information useful to a reviewer
  • This pull request has a Jira number
  • This pull request has a Process.st launch checklist

Code review

  • Changes have been reviewed by at least one other engineer
  • Security impacts of this change have been considered

Copilot AI review requested due to automatic review settings February 20, 2026 21:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements widget load improvements through the introduction of a custom skeleton component and updates to the tax and cash dashboard to support additional payout hold states.

Changes:

  • Introduced a new customizable sqm-skeleton component to replace sl-skeleton throughout the codebase
  • Added support for additional payout hold states (payment on hold, beneficiary name issues, withdrawal settings invalid, payment returned)
  • Enhanced sqm-header-logo component to support text-based logos as a fallback to images

Reviewed changes

Copilot reviewed 73 out of 75 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/mint-components/src/components/sqm-skeleton/sqm-skeleton.tsx New skeleton component with customizable width, height, and theming support
packages/mint-components/src/global/styles.ts Added CSS variables for skeleton background and animation colors
packages/mint-components/src/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.ts Added new payout status types and logic for handling additional hold reasons
packages/mint-components/src/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.tsx Updated button labels for consistency and added new alert message properties
packages/mint-components/src/components/sqm-form-message/sqm-form-message.tsx Added loading state support using the new skeleton component
packages/mint-components/src/components/sqm-header-logo/sqm-header-logo.tsx Added text-based logo support with customizable size and color
packages/mint-components/CHANGELOG.md Documents changes to payout alert copy and header logo functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings February 20, 2026 21:12
c["_" + a].ready.push(b);
}),
(e = document.createElement("script")),
(e.async = 1),

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded using unencrypted connection.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 81 out of 83 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

*/
@Prop() width?: string = "100%";

disconnectedCallback() {}
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The disconnectedCallback method is empty and serves no purpose. Remove this method to improve code clarity.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,51 @@
import { h, Component, State, Prop, Host } from "@stencil/core";
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Host import is added but not used in the component. The render method returns a div instead of using Host. Either use Host as the root element or remove the unused import.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +45
<html>
<head>
<script>
!(function (a, b) {
a("squatch", "http://localhost:3333/squatch.min.js", b);
})(function (a, b, c) {
var d, e, f;
(c["_" + a] = {}),
(c[a] = {}),
(c[a].ready = function (b) {
c["_" + a].ready = c["_" + a].ready || [];
c["_" + a].ready.push(b);
}),
(e = document.createElement("script")),
(e.async = 1),
(e.src = b),
(f = document.getElementsByTagName("script")[0]),
f.parentNode.insertBefore(e, f);
}, this);
</script>
<script>
window.squatchTenant = "ac52kfybp1tkr";
window.squatchConfig = {
domain: "https://staging.referralsaasquatch.com",
};
window.squatchToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoidGVzdHVzZXIiLCJhY2NvdW50SWQiOiJ0ZXN0dXNlciIsImVtYWlsIjoidGVzdHVzZXJAZXhhbXBsZS5jb20ifX0.tegzTaLms4g47rwcWoyhk1WW4hqB16PulQV9zouJNfU";
window.widgetIdent = {
programId: "41863",
userId: "testuser",
accountId: "testuser",
token:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IklSTVhzWXk2WVlxcTQ2OTQzN21HOEVSUXQ4UW9LRkJhRzEifQ.eyJ1c2VyIjp7ImlkIjoidGVzdHVzZXIiLCJhY2NvdW50SWQiOiJ0ZXN0dXNlciIsImVtYWlsIjoidGVzdHVzZXJAZXhhbXBsZS5jb20ifX0.tegzTaLms4g47rwcWoyhk1WW4hqB16PulQV9zouJNfU",
tenantAlias: "ac52kfybp1tkr",
engagementMedium: "EMBED",
appDomain: "https://staging.referralsaasquatch.com",
};
</script>
</head>
<body>
<impact-embed widget="p/41863/w/referrerWidget"
><div>Loading...</div></impact-embed
>
</body>
</html>
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The index.html file has been completely replaced with test/demo content that includes hardcoded credentials and tokens. This appears to be intended for development/testing purposes only and should not be committed to the repository. This file should either be reverted to its original stencilbook content or added to .gitignore if it's meant to be a local test file.

Copilot uses AI. Check for mistakes.
},
"devDependencies": {
"@formatjs/intl": "1.8.4",
"@formatjs/intl": "^3.1.8",
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @formatjs/intl dependency is being upgraded from version 1.8.4 to ^3.1.8, which is a major version jump (from v1 to v3). This is a potentially breaking change that could introduce compatibility issues. Ensure that this upgrade has been tested thoroughly and that all formatMessage calls throughout the codebase remain compatible with the new version.

Suggested change
"@formatjs/intl": "^3.1.8",
"@formatjs/intl": "1.8.4",

Copilot uses AI. Check for mistakes.
namespace: "bedrock-components",
buildEs5: true,
globalScript: 'src/global/global.ts',
globalScript: "src/global/global.ts",
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting hydratedFlag: null in bedrock-components explicitly disables the hydration flag feature. For consistency across the monorepo and to ensure similar widget load behavior, consider whether bedrock-components should also use the same hydratedFlag configuration as mint-components, or document why they differ.

Suggested change
globalScript: "src/global/global.ts",
globalScript: "src/global/global.ts",
// Note: We explicitly disable Stencil's hydration flag for bedrock-components.
// This differs from mint-components and is intentional to preserve existing
// widget load behavior and DOM markup expectations in consumers.

Copilot uses AI. Check for mistakes.
Comment on lines +8 to +9
@State()
ignored = true;
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ignored state variable is declared but never used in the component. This appears to be unnecessary code that should be removed to improve maintainability.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants