Skip to content

Implement proposed StatusPageEmbed changes#68

Merged
da70 merged 148 commits into
masterfrom
implement-proposed-statuspageembed-changes
Jul 9, 2026
Merged

Implement proposed StatusPageEmbed changes#68
da70 merged 148 commits into
masterfrom
implement-proposed-statuspageembed-changes

Conversation

@da70

@da70 da70 commented May 28, 2026

Copy link
Copy Markdown
Contributor

da70 added 30 commits April 27, 2026 12:21
…lve module `@babel/runtime/helpers/interopRequireDefault`" [+]

[Unable to resolve module \`@babel/runtime/helpers/interopRequireDefault\`](https://stackoverflow.com/questions/52486219/unable-to-resolve-module-babel-runtime-helpers-interoprequiredefault)
…eetPath()` [+]

This is in preparation for replacing the `DEPLOY_ENV` based branching in `getBaseUrl()` with `document.currentScript` based branching.  Vitest will be stubbing `document.currentScript` so need to defer reference of that object until after the tests have stubbed it.
…-instead-of-deploy-env

`config.getBaseUrl()`: replace `DEPLOY_ENV` based branching with `document.currentScript` based branching
da70 added 29 commits May 27, 2026 17:20
…ntoGolden()` and replace hostname with [HOSTNAME]
…ost and `dev` (Docker Compose service) tests
…()` better/less confusing for the Docker Compose `e2e-tests` service case [+]

Previously for the localhost and `dev` cases `getSourceFileHostname()` was returning `new URL( document.URL ).hostname`, but when running the `e2e-tests` Docker Compose service this would lead to the `static.spec.js` `STATUSPAGE_SUMMARY_URL` being set to `localhost` hostname because with `document` undefined, `getSourceFileHostname()` returned `localhost`, which didn't match `dev` hostname returned in the Playwright controlled browser which loads `dev` host URL via the bridge network.  It didn't matter much since `getStatuspageSummaryUrl()` was set up to make sure Playwright would still intercept the request for the fake `summary.json`, but it was weird.
Right now `getBaseUrl()` is only used once, in `getStylesheetUrl()`.  Inlining it for now to make things simpler and to keep devs from thinking it's being used in many places.
Renamed because the class does more than just make calls to the Statuspage API, it also encapsulates the data in the targeted statuspage and our business logic regarding alert selection, so it's really a customized view of the statuspage, which includes a `fetchData` call that makes a request against the single API endpoint that we use (summary).  In the future if it's decided we build in some more sophisticated functionality into the widget, we'll be adding more getters to this class.
…ARY_URL` to get Playwright tests working in Docker Compose
…amples and add Docker instructions for updating golden files
@da70 da70 merged commit 440916e into master Jul 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant