Compare commits

...

64 Commits

Author SHA1 Message Date
David Baker
04802c3a0b Merge branch 'develop' into dbkr/upload_visual_diffs 2025-07-17 13:33:40 +01:00
David Baker
43a8ba0117 Merge branch 'develop' into dbkr/upload_visual_diffs 2025-07-14 17:31:58 +01:00
David Baker
a8ca800782 Replace tab 2025-07-09 16:42:28 +01:00
David Baker
7c135c59bd Upload visual diffs from storybook testing 2025-07-09 16:32:28 +01:00
David Baker
c3e53aa389 Add copyright headers 2025-07-09 15:15:28 +01:00
David Baker
c16fd3dca6 Add cache specifier for only shell playwright browsers 2025-07-09 15:06:15 +01:00
David Baker
049a3ae8d2 Change to 'add' rather than 'subs.subscribe' 2025-07-09 14:58:11 +01:00
David Baker
f62177ad4f Change to add / remove subscription callback 2025-07-09 14:57:23 +01:00
David Baker
dc47abb82d Add return type annotation 2025-07-09 14:52:21 +01:00
David Baker
fa300af2ff Add missing playwright step 2025-07-09 14:37:48 +01:00
David Baker
ead893c2ec Merge remote-tracking branch 'origin/develop' into dbkr/textualevent_sharedcomponent 2025-07-09 13:58:04 +01:00
David Baker
553724b567 Unused import 2025-07-09 12:20:18 +01:00
David Baker
8878c7b5c7 Revert useMemo
as this isn't a hook
2025-07-09 12:16:39 +01:00
David Baker
fbd9af69bc Fix more types 2025-07-09 10:54:02 +01:00
David Baker
03ee035a28 Fix types 2025-07-09 10:51:20 +01:00
David Baker
9621f791d1 Merge remote-tracking branch 'origin/develop' into dbkr/textualevent_sharedcomponent 2025-07-09 10:44:11 +01:00
David Baker
3077be3e4f Add implements
Co-authored-by: Florian Duros <florianduros@element.io>
2025-07-09 10:39:26 +01:00
David Baker
b4ea530bd0 Fix listener interface 2025-07-09 10:37:30 +01:00
David Baker
7347d55479 Add implements
Co-authored-by: Florian Duros <florianduros@element.io>
2025-07-09 10:34:41 +01:00
David Baker
e6dbe93877 Memoise vm creation
Co-authored-by: Florian Duros <florianduros@element.io>
2025-07-09 10:33:47 +01:00
David Baker
f424599295 Fix yarn.lock 2025-07-08 17:37:00 +01:00
David Baker
5a2cb98670 Merge remote-tracking branch 'origin/develop' into dbkr/textualevent_sharedcomponent 2025-07-08 17:34:44 +01:00
David Baker
94b7adcb49 Prettier 2025-07-08 16:33:52 +01:00
David Baker
6171d2aedd Add some comments 2025-07-08 16:12:36 +01:00
David Baker
917f85ea60 Remove unnecessary env vars
and better name
2025-07-08 16:03:04 +01:00
David Baker
a56cf55f34 Suffix snapshots with platform instead
like we do for playwright
2025-07-08 15:48:53 +01:00
David Baker
80ed90a975 Include platform in snapshot / received dir
because font rendering differs between platforms
2025-07-08 15:20:21 +01:00
David Baker
b632a61be7 Update snapshot from received 2025-07-08 15:14:02 +01:00
David Baker
d2c632f93d Pass flag to store received screenshots
and upload diffs too
2025-07-08 14:41:13 +01:00
David Baker
2f62c15fec Oh right, we need the headless shell 2025-07-08 14:28:51 +01:00
David Baker
fd9253d958 Try without the if 2025-07-08 14:21:18 +01:00
David Baker
41612d3db6 Install playwright browsers 2025-07-07 17:44:53 +01:00
David Baker
0c3830f0a9 use right port 2025-07-07 17:41:22 +01:00
David Baker
f47673cce9 colons 2025-07-07 17:33:30 +01:00
David Baker
d3c5971dfe Make it an npm script 2025-07-07 17:30:47 +01:00
David Baker
5f3fae2412 quote issues 2025-07-07 16:29:41 +01:00
David Baker
d3300acca3 need newer node 2025-07-07 16:27:31 +01:00
David Baker
7e4ff89597 Hopefully do screenshot testing... 2025-07-07 16:23:38 +01:00
David Baker
c8bd639d4f Merge remote-tracking branch 'origin/develop' into dbkr/textualevent_sharedcomponent 2025-07-07 15:28:51 +01:00
David Baker
fbe6a06774 Remove webpack styling addon
Not necessary now we're using vite
2025-07-07 15:27:24 +01:00
David Baker
703ba8d9fb Workaround for incomatible types in rollup
https://github.com/rollup/rollup/issues/5199
2025-07-03 18:14:09 +01:00
David Baker
4fddd23b60 Change here too 2025-07-03 17:16:21 +01:00
David Baker
3285007224 Use storybook reacvt-vite
There's no reason to use the react-webpack plugin just because our app
is stuck on webpack, it just means we have vite as a dependency too.
2025-07-03 17:09:08 +01:00
David Baker
b1edabe384 Typo 2025-07-03 15:31:57 +01:00
David Baker
82d08df297 Maybe make sonar regognise tests as tests 2025-07-03 15:14:47 +01:00
David Baker
862aaff468 Pass getSnapshot as getServerSnapshot too 2025-07-03 13:46:29 +01:00
David Baker
f2fc88fb7e Merge remote-tracking branch 'origin/develop' into dbkr/textualevent_sharedcomponent 2025-07-03 10:25:57 +01:00
David Baker
073d97e261 Add paxckage patch to @types/mdx
for React 19 compat
2025-07-01 15:41:15 +01:00
David Baker
472de3bd14 Prettier 2025-07-01 15:12:39 +01:00
David Baker
a9364332b3 Change import 2025-07-01 14:58:15 +01:00
David Baker
9318006b21 Change import 2025-07-01 14:55:52 +01:00
David Baker
5638dd7c5f Merge branch 'develop' into dbkr/textualevent_sharedcomponent 2025-07-01 14:48:10 +01:00
David Baker
4709656510 Remove old style stories entry 2025-06-30 16:39:26 +01:00
David Baker
11f9849e51 Add mock view model & snapshot 2025-06-30 16:38:13 +01:00
David Baker
3d724ffa84 Add TextualEvent component to storybook 2025-06-30 16:37:47 +01:00
Florian Duros
a597221d05 chore: setup storybook
cherry pick edc5e87056
from florianduros/storybook
2025-06-30 16:35:38 +01:00
David Baker
2125415654 Fill in stories / test 2025-06-30 15:02:47 +01:00
David Baker
73d78f4be6 Move showHiddenEvents into props fully 2025-06-26 16:22:50 +01:00
David Baker
455ca447ea Add tiny wrapper hook 2025-06-26 16:15:46 +01:00
David Baker
b96da8de83 Move ViewModel interface into the shared components 2025-06-26 16:12:34 +01:00
David Baker
84d34e1332 Factor out common view model stuff 2025-06-26 16:08:39 +01:00
David Baker
017928455e Pass showHiddenEvents
Because we used it anyway, we just cheated by getting it from the context
2025-06-26 13:46:33 +01:00
David Baker
ddbe0989ed Remove old TextualEvent 2025-06-26 11:42:33 +01:00
David Baker
15817cffc5 Very first pass at shared component views
Turn the trivial TextualEvent into a shared component with a separate view
model for element web. Args to view model will probably change to be more
specific and VM typer needs abstracting out into an interface, but should
give the general idea.
2025-06-26 11:36:02 +01:00

View File

@@ -0,0 +1,49 @@
# Triggers after the shared component tests have finished,
# It uploads the received images and diffs to netlify, printing the URLs to the console
name: Upload Shared Component Visual Test Diffs
on:
workflow_run:
workflows: ["Shared Component Visual Tests"]
types:
- completed
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.run_id }}
cancel-in-progress: ${{ github.event.workflow_run.event == 'pull_request' }}
permissions: {}
jobs:
report:
if: github.event.workflow_run.conclusion == 'failure'
name: Upload Diffs
runs-on: ubuntu-24.04
environment: Netlify
permissions:
actions: read
steps:
- name: Install tree
run: "sudo apt-get install -y tree"
- name: Download Diffs
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
name: received-images
path: received-images
- name: Generate Index
run: "tree -L 1 --noreport -H '-.' -o received-images/index.html received-images"
- name: 📤 Deploy to Netlify
uses: matrix-org/netlify-pr-preview@9805cd123fc9a7e421e35340a05e1ebc5dee46b5 # v3
with:
path: received-images
owner: ${{ github.event.workflow_run.head_repository.owner.login }}
branch: ${{ github.event.workflow_run.head_branch }}
revision: ${{ github.event.workflow_run.head_sha }}
token: ${{ secrets.NETLIFY_AUTH_TOKEN }}
site_id: ${{ vars.NETLIFY_SITE_ID }}
desc: Shared Component Visual Diffs
prefix: "diffs-"