From 7b294791dd53b6118ed7cb468da1a413bcfeea63 Mon Sep 17 00:00:00 2001 From: Kevin Hahn Date: Thu, 9 Jan 2025 11:22:21 +0700 Subject: [PATCH 1/2] enable linting on github actions (#1352) * enable linting on github actions * run codeql when codeql workflow changes --- .github/workflows/codeql.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c4d4ea566..0abfabbbd 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -10,6 +10,7 @@ on: - "**/*.csproj" - "**/*.ts" - "**/*.js" + - '.github/workflows/codeql.yml' schedule: - cron: '34 21 * * 2' @@ -38,6 +39,8 @@ jobs: build-mode: none - language: javascript-typescript build-mode: none + - language: actions + build-mode: none steps: - name: Checkout repository uses: actions/checkout@v4 From be8253c3ed48fd89a0dd6fed9885e5a3a1b4b63c Mon Sep 17 00:00:00 2001 From: Tim Haasdyk Date: Thu, 9 Jan 2025 08:26:24 +0100 Subject: [PATCH 2/2] Viewer mobile improvements (#1348) * Fix page and header titles * Make editor mobile friendly * Standardize breakpoints a bit better * Use correct expand/collapse icons * Fix standalone viewer svelte app * Make the back button take the user back to the entry list or previously selected entry * Improve popstate handler and fix TS error --- frontend/viewer/src/ProjectView.svelte | 82 +++++++++++-------- frontend/viewer/src/app.postcss | 15 ++++ .../src/lib/activity/ActivityView.svelte | 2 +- .../src/lib/entry-editor/FieldTitle.svelte | 2 +- .../ComplexFormComponents.svelte | 2 +- .../field-editors/ComplexForms.svelte | 2 +- .../viewer/src/lib/entry-editor/field.postcss | 22 ++++- .../lib/entry-editor/inputs/CrdtField.svelte | 2 +- .../object-editors/EntryEditor.svelte | 4 +- .../viewer/src/lib/history/HistoryView.svelte | 2 +- .../viewer/src/lib/layout/EntryList.svelte | 6 +- .../src/lib/search-bar/SearchBar.svelte | 4 +- .../viewer/src/lib/status/SaveStatus.svelte | 2 +- frontend/viewer/tailwind.config.cjs | 11 ++- frontend/viewer/vite.config.ts | 4 +- 15 files changed, 109 insertions(+), 53 deletions(-) diff --git a/frontend/viewer/src/ProjectView.svelte b/frontend/viewer/src/ProjectView.svelte index d3d5cbab4..db4ec645a 100644 --- a/frontend/viewer/src/ProjectView.svelte +++ b/frontend/viewer/src/ProjectView.svelte @@ -1,8 +1,8 @@ -
+
{fieldName({name, id}, $currentView.i18nKey)} diff --git a/frontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.svelte b/frontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.svelte index 5aa439f11..b800ea0bc 100644 --- a/frontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.svelte +++ b/frontend/viewer/src/lib/entry-editor/field-editors/ComplexFormComponents.svelte @@ -61,7 +61,7 @@ dispatch('change', { value })} getEntryId={(e) => e.componentEntryId} getHeadword={(e) => e.componentHeadword}> addComponent(e.detail)} {disableEntry} {disableSense} /> diff --git a/frontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte b/frontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte index 9fbd748c0..bc060fe09 100644 --- a/frontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte +++ b/frontend/viewer/src/lib/entry-editor/field-editors/ComplexForms.svelte @@ -55,7 +55,7 @@ dispatch('change', { value })} getEntryId={(e) => e.complexFormEntryId} getHeadword={(e) => e.complexFormHeadword}> addComplexForm(e.detail)} {disableEntry} /> diff --git a/frontend/viewer/src/lib/entry-editor/field.postcss b/frontend/viewer/src/lib/entry-editor/field.postcss index 91e7dec82..bcd54ae8f 100644 --- a/frontend/viewer/src/lib/entry-editor/field.postcss +++ b/frontend/viewer/src/lib/entry-editor/field.postcss @@ -1,5 +1,5 @@ .field { - @apply grid grid-cols-subgrid col-span-3 items-center mb-4; + @apply grid grid-cols-subgrid items-center mb-4; &.multi-field { @apply items-baseline; @@ -43,4 +43,24 @@ } } } + + .field-title, .fields, .ws-field-wrapper, .ws-field, .item-list-field { + @apply sm-form:!col-span-full; + + & :has(> .field-container) { + @apply sm-form:col-span-2; + } + + &.field-title { + @apply sm-form:mb-2; + } + + &.item-list-field { + @apply sm-form:pl-0; + } + + &.ws-field > .label { + @apply xs-form:text-left; + } + } } diff --git a/frontend/viewer/src/lib/entry-editor/inputs/CrdtField.svelte b/frontend/viewer/src/lib/entry-editor/inputs/CrdtField.svelte index 8a57c5dea..623a29ab0 100644 --- a/frontend/viewer/src/lib/entry-editor/inputs/CrdtField.svelte +++ b/frontend/viewer/src/lib/entry-editor/inputs/CrdtField.svelte @@ -85,7 +85,7 @@ {#if unsavedChanges} {/if} diff --git a/frontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.svelte b/frontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.svelte index 07bfe2d0b..00837a772 100644 --- a/frontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.svelte +++ b/frontend/viewer/src/lib/entry-editor/object-editors/EntryEditor.svelte @@ -222,12 +222,12 @@