Skip to content

Commit c561994

Browse files
chore: merge main into feat/tzaware
2 parents 0391383 + 354b3ef commit c561994

79 files changed

Lines changed: 1363 additions & 3193 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
pkg_version: ${{ steps.buildvars.outputs.pkg_version }}
4848

4949
steps:
50-
- uses: actions/checkout@v2
50+
- uses: actions/checkout@v3
5151
with:
5252
fetch-depth: 0
5353

@@ -70,7 +70,7 @@ jobs:
7070
echo "NEXT_VERSION=$nextStrict" >> $GITHUB_ENV
7171
7272
- name: Create Draft Release
73-
uses: ncipollo/release-action@v1
73+
uses: ncipollo/release-action@v1.11.1
7474
if: ${{ github.event.inputs.publish == 'true' && github.event.inputs.dryrun == 'false' }}
7575
with:
7676
prerelease: true
@@ -167,7 +167,7 @@ jobs:
167167
mv latest-coverage.json coverage.json
168168
169169
- name: Upload Coverage Results as Build Artifact
170-
uses: actions/upload-artifact@v3.0.0
170+
uses: actions/upload-artifact@v3
171171
if: ${{ always() }}
172172
with:
173173
name: coverage
@@ -186,7 +186,7 @@ jobs:
186186
steps:
187187
- uses: actions/checkout@v3
188188

189-
- uses: actions/setup-node@v2
189+
- uses: actions/setup-node@v3
190190
with:
191191
node-version: '18'
192192

@@ -203,7 +203,7 @@ jobs:
203203
npx playwright test --project=${{ matrix.project }}
204204
205205
- name: Upload Report
206-
uses: actions/upload-artifact@v3.0.0
206+
uses: actions/upload-artifact@v3
207207
if: ${{ always() }}
208208
continue-on-error: true
209209
with:
@@ -256,7 +256,7 @@ jobs:
256256
yarn cypress:legacy
257257
258258
- name: Upload Video Recordings
259-
uses: actions/upload-artifact@v3.0.0
259+
uses: actions/upload-artifact@v3
260260
if: ${{ always() }}
261261
continue-on-error: true
262262
with:
@@ -265,7 +265,7 @@ jobs:
265265
if-no-files-found: ignore
266266

267267
- name: Upload Screenshots
268-
uses: actions/upload-artifact@v3.0.0
268+
uses: actions/upload-artifact@v3
269269
if: ${{ always() }}
270270
continue-on-error: true
271271
with:
@@ -286,17 +286,17 @@ jobs:
286286
PKG_VERSION: ${{needs.prepare.outputs.pkg_version}}
287287

288288
steps:
289-
- uses: actions/checkout@v2
289+
- uses: actions/checkout@v3
290290
with:
291291
fetch-depth: 0
292292

293293
- name: Setup Node.js
294-
uses: actions/setup-node@v3.0.0
294+
uses: actions/setup-node@v3
295295
with:
296-
node-version: 16.x
296+
node-version: '16'
297297

298298
- name: Setup Python
299-
uses: actions/setup-python@v2
299+
uses: actions/setup-python@v4
300300
with:
301301
python-version: '3.x'
302302

@@ -364,7 +364,7 @@ jobs:
364364
histCoveragePath: historical-coverage.json
365365

366366
- name: Create Release
367-
uses: ncipollo/release-action@v1
367+
uses: ncipollo/release-action@v1.11.1
368368
if: ${{ env.SHOULD_DEPLOY == 'true' && github.event.inputs.dryrun == 'false' }}
369369
with:
370370
allowUpdates: true
@@ -376,7 +376,7 @@ jobs:
376376
token: ${{ secrets.GITHUB_TOKEN }}
377377

378378
- name: Update Baseline Coverage
379-
uses: ncipollo/release-action@v1
379+
uses: ncipollo/release-action@v1.11.1
380380
if: ${{ github.event.inputs.updateCoverage == 'true' && github.event.inputs.dryrun == 'false' }}
381381
with:
382382
allowUpdates: true
@@ -389,8 +389,19 @@ jobs:
389389
token: ${{ secrets.GITHUB_TOKEN }}
390390

391391
- name: Upload Build Artifacts
392-
uses: actions/upload-artifact@v2.3.1
392+
uses: actions/upload-artifact@v3
393393
if: ${{ env.SHOULD_DEPLOY == 'false' || github.event.inputs.dryrun == 'true' }}
394394
with:
395395
name: release-${{ env.PKG_VERSION }}
396396
path: /home/runner/work/release/release.tar.gz
397+
398+
- name: Notify on Slack
399+
uses: slackapi/slack-github-action@v1.23.0
400+
with:
401+
channel-id: ${{ secrets.SLACK_GH_BUILDS_CHANNEL_ID }}
402+
payload: |
403+
{
404+
"text": "Datatracker - Build <https://github.com/ietf-tools/datatracker/actions/runs/${{ github.run_id }}|${{ env.PKG_VERSION }}> by ${{ github.triggering_actor }} completed - <@${{ secrets.SLACK_UID_RJSPARKS }}>"
405+
}
406+
env:
407+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_GH_BOT }}

.github/workflows/ci-run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
steps:
8282
- uses: actions/checkout@v3
8383

84-
- uses: actions/setup-node@v2
84+
- uses: actions/setup-node@v3
8585
with:
8686
node-version: '18'
8787

README.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,34 @@ Frontend tests are done via Cypress. There're 2 different type of tests:
218218
219219
#### Run Vue Tests
220220

221-
To run the tests headlessly (command line mode):
222-
```sh
223-
yarn cypress
224-
```
225-
To run the tests visually **(CANNOT run in docker)**:
226-
```sh
227-
yarn cypress:open
228-
```
229-
> It can take a few seconds before the tests start or the GUI opens.
221+
> :warning: All commands below **MUST** be run from the `./playwright` directory, unless noted otherwise.
222+
223+
1. Run **once** to install dependencies on your system:
224+
```sh
225+
npm install
226+
npx playwright install --with-deps
227+
```
228+
229+
2. Run in a **separate process**, from the **project root directory**:
230+
```sh
231+
yarn preview
232+
```
233+
234+
3. Run the tests, in of these 3 modes, from the `./playwright` directory:
235+
236+
3.1 To run the tests headlessly (command line mode):
237+
```sh
238+
npm test
239+
```
240+
3.2 To run the tests visually **(CANNOT run in docker)**:
241+
```sh
242+
npm run test:visual
243+
```
244+
245+
3.3 To run the tests in debug mode **(CANNOT run in docker)**:
246+
```sh
247+
npm run test:debug
248+
```
230249

231250
#### Run Legacy Views Tests
232251

client/App.vue

Lines changed: 6 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<template lang="pug">
22
n-theme
33
n-message-provider
4-
.app-error(v-if='agendaStore.criticalError')
4+
.app-error(v-if='siteStore.criticalError')
55
i.bi.bi-x-octagon-fill.me-2
6-
span {{agendaStore.criticalError}}
6+
span {{siteStore.criticalError}}
77
.app-container(ref='appContainer')
88
router-view.meeting
99
</template>
@@ -12,13 +12,13 @@ n-theme
1212
import { onBeforeUnmount ,onMounted, ref } from 'vue'
1313
import { NMessageProvider } from 'naive-ui'
1414
15-
import { useAgendaStore } from './agenda/store'
15+
import { useSiteStore } from './shared/store'
1616
1717
import NTheme from './components/n-theme.vue'
1818
1919
// STORES
2020
21-
const agendaStore = useAgendaStore()
21+
const siteStore = useSiteStore()
2222
2323
// STATE
2424
@@ -29,14 +29,14 @@ const appContainer = ref(null)
2929
// --------------------------------------------------------------------
3030
3131
const resizeObserver = new ResizeObserver(entries => {
32-
agendaStore.$patch({ viewport: Math.round(window.innerWidth) })
32+
siteStore.$patch({ viewport: Math.round(window.innerWidth) })
3333
// for (const entry of entries) {
3434
// const newWidth = entry.contentBoxSize ? entry.contentBoxSize[0].inlineSize : entry.contentRect.width
3535
// }
3636
})
3737
3838
onMounted(() => {
39-
resizeObserver.observe(appContainer.value, { box: 'device-pixel-content-box' })
39+
resizeObserver.observe(appContainer.value)
4040
})
4141
4242
onBeforeUnmount(() => {
@@ -47,7 +47,6 @@ onBeforeUnmount(() => {
4747
<style lang="scss">
4848
@import "bootstrap/scss/functions";
4949
@import "bootstrap/scss/variables";
50-
@import "./shared/breakpoints";
5150
5251
.app-error {
5352
background-color: $red-500;
@@ -57,69 +56,4 @@ onBeforeUnmount(() => {
5756
padding: 1rem;
5857
text-align: center;
5958
}
60-
61-
.meeting {
62-
> h1 {
63-
font-weight: 500;
64-
color: $gray-700;
65-
display: flex;
66-
justify-content: space-between;
67-
align-items: center;
68-
69-
@media screen and (max-width: $bs5-break-sm) {
70-
justify-content: center;
71-
72-
> span {
73-
font-size: .95em;
74-
}
75-
}
76-
77-
strong {
78-
font-weight: 700;
79-
background: linear-gradient(220deg, $blue-500 20%, $purple-500 70%);
80-
background-clip: text;
81-
-webkit-background-clip: text;
82-
-webkit-text-fill-color: transparent;
83-
box-decoration-break: clone;
84-
}
85-
}
86-
87-
&-h1-badges {
88-
display: flex;
89-
justify-content: end;
90-
align-items: center;
91-
92-
> span {
93-
font-size: 13px;
94-
font-weight: 700;
95-
background-color: $pink-500;
96-
box-shadow: 0 0 5px 0 rgba($pink-500, .5);
97-
color: #FFF;
98-
padding: 5px 8px;
99-
border-radius: 6px;
100-
101-
& + span {
102-
margin-left: 10px;
103-
}
104-
}
105-
}
106-
107-
&-warning {
108-
background-color: $red-500 !important;
109-
box-shadow: 0 0 5px 0 rgba($red-500, .5) !important;
110-
color: #FFF;
111-
animation: warningBorderFlash 1s ease infinite;
112-
}
113-
114-
> h4 {
115-
@media screen and (max-width: $bs5-break-sm) {
116-
text-align: center;
117-
118-
> span {
119-
font-size: .8em;
120-
text-align: center;
121-
}
122-
}
123-
}
124-
}
12559
</style>

client/Embedded.vue

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<template lang="pug">
2+
n-theme
3+
n-message-provider
4+
component(:is='currentComponent', :component-id='props.componentId')
5+
</template>
6+
7+
<script setup>
8+
import { defineAsyncComponent, markRaw, onMounted, ref } from 'vue'
9+
import { NMessageProvider } from 'naive-ui'
10+
11+
import NTheme from './components/n-theme.vue'
12+
13+
// COMPONENTS
14+
15+
const availableComponents = {
16+
ChatLog: defineAsyncComponent(() => import('./components/ChatLog.vue')),
17+
Polls: defineAsyncComponent(() => import('./components/Polls.vue')),
18+
}
19+
20+
// PROPS
21+
22+
const props = defineProps({
23+
componentName: {
24+
type: String,
25+
default: null
26+
},
27+
componentId: {
28+
type: String,
29+
default: null
30+
}
31+
})
32+
33+
// STATE
34+
35+
const currentComponent = ref(null)
36+
37+
// MOUNTED
38+
39+
onMounted(() => {
40+
currentComponent.value = markRaw(availableComponents[props.componentName] || null)
41+
})
42+
</script>

0 commit comments

Comments
 (0)