diff --git a/.gitignore b/.gitignore
index 1bfde59..07a282d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -85,4 +85,6 @@ docs/Brief_Docs/Test Script v1.49.
commit.md
# Pig
-.pig/
\ No newline at end of file
+.pig/
+
+report.md
\ No newline at end of file
diff --git a/README.md b/README.md
index 283925f..0030b30 100644
--- a/README.md
+++ b/README.md
@@ -402,7 +402,29 @@ When running locally, you can access:
- When prompted if you want to set up Edge Functions with Deno, answer "No"
- After initialization is complete, run `supabase start` again
-7. **Docker Architecture Mismatch**
+7. **Magic link authentication callback not working**
+
+ - If magic link emails are not including the `/auth/callback` redirect URL correctly, you may need to update the Supabase CLI
+
+ ```bash
+ # Update Supabase CLI to latest version
+ npm install supabase@latest --save-dev
+
+ # Restart Supabase to apply config changes
+ supabase stop
+ supabase start
+ ```
+
+ - Ensure your `supabase/config.toml` has the correct redirect URLs:
+
+ ```toml
+ site_url = "http://127.0.0.1:5173"
+ additional_redirect_urls = ["http://127.0.0.1:5173/auth/callback","http://localhost:5173/auth/callback"]
+ ```
+
+ - After updating the config or CLI, always restart Supabase for changes to take effect
+
+8. **Docker Architecture Mismatch**
- If you see errors like `exec /usr/bin/sh: exec format error`, it means you're trying to run Docker containers built for a different CPU architecture
diff --git a/docs/LIFT Workwise testing issue log.csv b/docs/LIFT Workwise testing issue log.csv
new file mode 100644
index 0000000..ad9c8bf
--- /dev/null
+++ b/docs/LIFT Workwise testing issue log.csv
@@ -0,0 +1,18 @@
+ID,Issue description,Page/section
+1,The LIFT logo in the header should not have a hover effect and should not appear transluscent. ,Header
+2,"The icons in these three buttons should turn pink when hovered: generate an email summary, get help, font size settings. Otherwise, they will disappear with a white hover background. ",All pages
+3,"When on the dashboard page, 'Dashboard' in breadcrumb should be bold, not underlined, and not clickable, because it is the current page the user is on. ",Dashboard
+4,Each button should have a hover effect. It can be thicker border. ,Dashboard
+5,"The 'back' button should be on the left side of the breadcrumb, on the same line. ",All pages
+6,"It is not intuitive to use 'active' and 'inactive' to describe actions. Using 'to do' and 'done' should be clearer. So the toggle module can be: [Link button] To do [toggle] Done. At the same time, the 'Show Inactive' toggle at the top should change to 'Show done actions'.",Actions
+8,The website should have a proper page title as displayed in the browser tab. ,All pages
+9,The OK button should have text 'Save' instead. ,All forms
+10,"After editing and saving a field, there should be a confirmation message to let users know the changes have been saved. ",All forms
+11,This line of text should be black instead of grey and it misses a full stop: 'Visibility to employer. This answer and actions will be included on the email',All forms
+12,"When switching the 'Visibility to employer' toggle on mobile, 'Saved' message overlaps with section heading. ",All forms
+13,"When sending an email to the manager, in the email preview, actions fields should not have hover effect as they are not editable. ",Email Preview
+14,"On the email preview page, the email button at the top-right corner in the header should not be transluscent. It should be removed on this page. ",Email Preview
+17,Please replace all ampersands with 'and' in full,All pages
+18,Remove all use of italics across the site,All pages
+20,Change the field on manager actions to 'The actions you'd like your manager to take in response to this question.',All forms
+21,"In My workplace adjustments, it says 'What do you need to thrive in your role here at Islington?' Is this right, at Islington suggest the council when this is for wider use and I guess this will be available to the other LIFT boroughs? ",My workplace adjustments
diff --git a/docs/TESTING_ISSUES.md b/docs/TESTING_ISSUES.md
new file mode 100644
index 0000000..07b6f7a
--- /dev/null
+++ b/docs/TESTING_ISSUES.md
@@ -0,0 +1,192 @@
+# LIFT Workwise Testing Issue Log
+
+Track testing issues and their resolution status. Work through these one by one, committing after each fix.
+
+## Issues
+
+### Issue #1 - Logo hover effect
+- [x] **Status**: ✅ Fixed
+- **Description**: The LIFT logo in the header should not have a hover effect and should not appear translucent.
+- **Location**: Header
+- **Files affected**: `src/lib/components/layouts/Header.svelte` (line 116)
+- **Solution**: Removed `hover:opacity-80`, `transition-opacity`, and `cursor-pointer` classes from logo button
+
+---
+
+### Issue #2 - Icon hover effects
+- [x] **Status**: ✅ Fixed
+- **Description**: The icons in these four buttons should have a visible hover effect: generate an email summary, get help, font size settings, profile settings. Previously they had a white background that made icons disappear.
+- **Location**: All pages (header and footer)
+- **Files affected**:
+ - `src/lib/components/layouts/Header.svelte` (email button - line 161, 169)
+ - `src/lib/components/ui/HelpButton.svelte` (help button - line 92)
+ - `src/lib/components/ui/FontSizeControl.svelte` (font size button - line 98, 102)
+ - `src/lib/components/ui/ProfileButton.svelte` (profile button - line 28, 32)
+- **Solution**: Removed white background hover effect and added 25% scale zoom on icon/text only (not border) using `transition-transform hover:scale-125` and `group-hover:scale-125`
+
+---
+
+### Issue #3 - Dashboard breadcrumb styling
+- [x] **Status**: ✅ Fixed
+- **Description**: When on the dashboard page, 'Dashboard' in breadcrumb should be bold, not underlined, and not clickable, because it is the current page the user is on.
+- **Location**: Dashboard
+- **Files affected**: `src/lib/components/ui/Breadcrumb.svelte` (line 105-109)
+- **Solution**: Changed Dashboard breadcrumb item to be non-clickable (`clickable: false`) when current view is dashboard. The existing CSS already styles non-clickable items as bold without underline using `.breadcrumb-current` class.
+
+---
+
+### Issue #4 - Button hover effects
+- [x] **Status**: ✅ Fixed
+- **Description**: Each button should have a hover effect. It can be thicker border.
+- **Location**: Dashboard and question lists
+- **Files affected**: `src/app.css` (lines 89-91, 106, 353)
+- **Solution**: Added inset box-shadow on hover to create a thicker border effect that grows inward (doesn't affect layout). Applied to:
+ - `.dash-tile-rect` (2px inset)
+ - `.dash-tile-square` (2px inset combined with existing shadow)
+ - `.list-item-questions` (2px inset combined with existing shadow)
+
+---
+
+### Issue #5 - Back button position
+- [ ] **Status**: ❌ Not implemented - breaks layout
+- **Description**: The 'back' button should be on the left side of the breadcrumb, on the same line. Remove the icon, only text "back"
+- **Location**: All pages
+- **Files affected**: N/A
+- **Reason not implemented**: Moving the back button to the left side of the breadcrumb breaks all the style logic. The current grid layout has the breadcrumb on the left and back button on the right, which is intentional for the overall design system.
+
+---
+
+### Issue #6 - Action status terminology
+- [x] **Status**: ✅ Fixed
+- **Description**: It is not intuitive to use 'active' and 'inactive' to describe actions. Using 'to do' and 'done' should be clearer. So the toggle module can be: [Link button] To do [toggle] Done. At the same time, the 'Show Inactive' toggle at the top should change to 'Show done actions'.
+- **Location**: Actions
+- **Files affected**:
+ - `src/lib/components/ui/ActionStatusToggle.svelte` (lines 17, 24)
+ - `src/lib/components/ui/ShowArchivedToggle.svelte` (line 14)
+- **Solution**: Added static labels "To do" and "Done" on either side of the toggle switch. Changed "Show Inactive" to "Show done actions" in the filter toggle. Layout: [Link button] To do [toggle] Done
+
+---
+
+### Issue #8 - Page title
+- [x] **Status**: ✅ Fixed
+- **Description**: The website should have a proper page title as displayed in the browser tab.
+- **Location**: All pages
+- **Files affected**: `src/app.html` (line 7)
+- **Solution**: Added `
LIFT Workwise` to the HTML head in app.html
+
+---
+
+### Issue #9 - Save button text
+- [x] **Status**: ✅ Fixed
+- **Description**: The OK button should have text 'Save' instead.
+- **Location**: All forms
+- **Files affected**: `src/lib/components/cards/QuestionCard.svelte` (lines 239, 310)
+- **Solution**: Changed button text from "OK" to "Save" in QuestionCard component. Also updated comment reference to "Save button".
+
+---
+
+### Issue #10 - Save confirmation
+- [x] **Status**: ✅ Fixed
+- **Description**: After editing and saving a field, there should be a confirmation message to let users know the changes have been saved.
+- **Location**: All forms
+- **Files affected**: `src/lib/components/cards/QuestionCard.svelte` (lines 105, 232, 329-331)
+- **Solution**: Added `saveSuccess` state that shows "Saved" message for 2 seconds after successfully saving response text. Message appears inline next to Save/Undo buttons in green text.
+
+---
+
+### Issue #11 - Visibility text styling
+- [x] **Status**: ✅ Fixed
+- **Description**: This line of text should be black instead of grey and it misses a full stop: 'Visibility to employer. This answer and actions will be included on the email'
+- **Location**: All forms
+- **Files affected**: `src/lib/components/ui/ToggleStatus.svelte` (line 16-17)
+- **Solution**: Added `text-base-content` class to make text black instead of grey, and added full stop at end of sentence
+
+---
+
+### Issue #12 - Mobile saved message overlap
+- [x] **Status**: ✅ Fixed
+- **Description**: When switching the 'Visibility to employer' toggle on mobile, 'Saved' message overlaps with section heading.
+- **Location**: All forms
+- **Files affected**: `src/lib/components/ui/SaveStatus.svelte` (lines 9-22), `src/lib/components/cards/QuestionCard.svelte` (line 286, 293)
+- **Solution**: Removed "Saving..." state to eliminate visual flicker. Added `pr-16` padding to heading to reserve space for "Saved" message. Added `z-10` to ensure message appears above heading on mobile.
+
+---
+
+### Issue #13 - Email preview hover effects
+- [x] **Status**: ✅ Fixed
+- **Description**: When sending an email to the manager, in the email preview, actions fields should not have hover effect as they are not editable.
+- **Location**: Email Preview
+- **Files affected**: `src/app.css` (lines 538-542)
+- **Solution**: Added CSS rule to remove hover effects from `.action-item` elements within `#email-content`, setting `hover:shadow-none` and `cursor: default`
+
+---
+
+### Issue #14 - Email button on email preview
+- [x] **Status**: ✅ Fixed
+- **Description**: On the email preview page, the email button at the top-right corner in the header should not be translucent. It should be removed on this page.
+- **Location**: Email Preview
+- **Files affected**: `src/lib/components/layouts/Header.svelte` (line 148)
+- **Solution**: Added `!isInEmailView` condition to the email button's `{#if}` block to completely hide it when viewing email preview, and removed `isInEmailView` from the `isDisabled` logic since button is now hidden
+
+---
+
+### Issue #17 - Replace ampersands
+- [x] **Status**: ✅ Fixed
+- **Description**: Please replace all ampersands with 'and' in full
+- **Location**: All pages
+- **Files affected**: `src/lib/components/cards/QuestionCard.svelte` (lines 267, 342)
+- **Solution**: Replaced "Delete Response & Actions" with "Delete Response and Actions" in both the modal title and button text
+
+---
+
+### Issue #18 - Remove italics
+- [x] **Status**: ✅ Fixed
+- **Description**: Remove all use of italics across the site
+- **Location**: All pages
+- **Files affected**:
+ - `src/app.css` (line 321)
+ - `src/lib/components/ui/FontSizeControl.svelte` (line 107)
+ - `src/lib/components/ui/HelpModal.svelte` (line 85)
+- **Solution**: Removed `italic` class/styling from action question preview text, font size control icon, and help modal screenshot captions
+
+---
+
+### Issue #16 - Sentence case for all titles and buttons
+- [x] **Status**: ✅ Fixed
+- **Description**: Please make all titles sentence case rather than title case. This includes buttons e.g. 'Select Test User' should be 'Select test user'
+- **Location**: All pages
+- **Files affected**:
+ - `src/lib/components/ui/ProfileCompletionModal.svelte` (lines 64, 73, 89, 104, 128)
+ - `src/lib/components/ui/ProfileSettingsModal.svelte` (lines 96, 102, 132, 147, 189)
+ - `src/lib/components/ui/ActionsCRUD.svelte` (lines 195, 307, 333)
+ - `src/lib/components/cards/QuestionCard.svelte` (lines 267, 342)
+ - `src/lib/components/views/Email.svelte` (lines 70, 80, 108)
+ - `src/lib/components/views/Dash.svelte` (lines 52, 61, 68, 74, 77, 130, 139, 143, 148)
+ - `src/lib/components/ui/FontSizeControl.svelte` (lines 25, 29, 125)
+ - `src/lib/components/views/Detail.svelte` (line 30)
+ - `src/lib/components/layouts/Header.svelte` (line 162)
+- **Solution**: Converted all modal titles, button labels, form field labels, loading messages, and navigation labels from Title Case to sentence case throughout the application
+
+---
+
+### Issue #20 - Manager actions field text
+- [x] **Status**: Not started
+- **Description**: Change the field on manager actions to 'The actions you'd like your manager to take in response to this question.'
+- **Location**: All forms
+- **Files affected**: TBD
+
+---
+
+### Issue #21 - "Islington" reference
+- [ ] **Status**: Not started
+- **Description**: In My workplace adjustments, it says 'What do you need to thrive in your role here at Islington?' Is this right, at Islington suggest the council when this is for wider use and I guess this will be available to the other LIFT boroughs?
+- **Location**: My workplace adjustments
+- **Files affected**: TBD
+
+---
+
+## Progress Summary
+
+- **Total Issues**: 17
+- **Completed**: 7
+- **Remaining**: 9 (2 rejected - Issue 5, issue 21)
diff --git a/package-lock.json b/package-lock.json
index fbca370..c61c4ab 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -38,7 +38,7 @@
"prettier-plugin-sql": "^0.19.1",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.12",
- "supabase": "^2.53.6",
+ "supabase": "^2.54.1",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"svelte-hero-icons": "^5.2.0",
@@ -2639,20 +2639,20 @@
}
},
"node_modules/bin-links": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-5.0.0.tgz",
- "integrity": "sha512-sdleLVfCjBtgO5cNjA2HVRvWBJAHs4zwenaCPMNJAJU0yNxpzj80IpjOIimkpkr+mhlA+how5poQtt53PygbHA==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-6.0.0.tgz",
+ "integrity": "sha512-X4CiKlcV2GjnCMwnKAfbVWpHa++65th9TuzAEYtZoATiOE2DQKhSp4CJlyLoTqdhBKlXjpXjCTYPNNFS33Fi6w==",
"dev": true,
"license": "ISC",
"dependencies": {
- "cmd-shim": "^7.0.0",
- "npm-normalize-package-bin": "^4.0.0",
- "proc-log": "^5.0.0",
- "read-cmd-shim": "^5.0.0",
- "write-file-atomic": "^6.0.0"
+ "cmd-shim": "^8.0.0",
+ "npm-normalize-package-bin": "^5.0.0",
+ "proc-log": "^6.0.0",
+ "read-cmd-shim": "^6.0.0",
+ "write-file-atomic": "^7.0.0"
},
"engines": {
- "node": "^18.17.0 || >=20.5.0"
+ "node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/bindings": {
@@ -2840,13 +2840,13 @@
}
},
"node_modules/cmd-shim": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-7.0.0.tgz",
- "integrity": "sha512-rtpaCbr164TPPh+zFdkWpCyZuKkjpAzODfaZCf/SVJZzJN+4bHQb/LP3Jzq5/+84um3XXY8r548XiWKSborwVw==",
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-8.0.0.tgz",
+ "integrity": "sha512-Jk/BK6NCapZ58BKUxlSI+ouKRbjH1NLZCgJkYoab+vEHUY3f6OzpNBN9u7HFSv9J6TRDGs4PLOHezoKGaFRSCA==",
"dev": true,
"license": "ISC",
"engines": {
- "node": "^18.17.0 || >=20.5.0"
+ "node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/color-convert": {
@@ -4930,13 +4930,13 @@
}
},
"node_modules/npm-normalize-package-bin": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-4.0.0.tgz",
- "integrity": "sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-5.0.0.tgz",
+ "integrity": "sha512-CJi3OS4JLsNMmr2u07OJlhcrPxCeOeP/4xq67aWNai6TNWWbTrlNDgl8NcFKVlcBKp18GPj+EzbNIgrBfZhsag==",
"dev": true,
"license": "ISC",
"engines": {
- "node": "^18.17.0 || >=20.5.0"
+ "node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/nwsapi": {
@@ -5426,13 +5426,13 @@
}
},
"node_modules/proc-log": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-5.0.0.tgz",
- "integrity": "sha512-Azwzvl90HaF0aCz1JrDdXQykFakSSNPaPoiZ9fm5qJIMHioDZEi7OAdRwSm6rSoPtY3Qutnm3L7ogmg3dc+wbQ==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-6.0.0.tgz",
+ "integrity": "sha512-KG/XsTDN901PNfPfAMmj6N/Ywg9tM+bHK8pAz+27fS4N4Pcr+4zoYBOcGSBu6ceXYNPxkLpa4ohtfxV1XcLAfA==",
"dev": true,
"license": "ISC",
"engines": {
- "node": "^18.17.0 || >=20.5.0"
+ "node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/punycode": {
@@ -5494,13 +5494,13 @@
"license": "MIT"
},
"node_modules/read-cmd-shim": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-5.0.0.tgz",
- "integrity": "sha512-SEbJV7tohp3DAAILbEMPXavBjAnMN0tVnh4+9G8ihV4Pq3HYF9h8QNez9zkJ1ILkv9G2BjdzwctznGZXgu/HGw==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-6.0.0.tgz",
+ "integrity": "sha512-1zM5HuOfagXCBWMN83fuFI/x+T/UhZ7k+KIzhrHXcQoeX5+7gmaDYjELQHmmzIodumBHeByBJT4QYS7ufAgs7A==",
"dev": true,
"license": "ISC",
"engines": {
- "node": "^18.17.0 || >=20.5.0"
+ "node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/readdirp": {
@@ -5935,13 +5935,14 @@
"license": "MIT"
},
"node_modules/supabase": {
- "version": "2.53.6",
- "resolved": "https://registry.npmjs.org/supabase/-/supabase-2.53.6.tgz",
- "integrity": "sha512-tvMSykcxBaFm2SAKx93h6h4HjfJnWZV0kxO2P3i491Mtnu/95knLjSxr5gu7/tAJtPFuEMG/0m1kNGOHPSE6YA==",
+ "version": "2.54.11",
+ "resolved": "https://registry.npmjs.org/supabase/-/supabase-2.54.11.tgz",
+ "integrity": "sha512-KuDDVi1s2fhfun81LNPaCLpW4/LFsP3G2LKUQimzEoj64sP1DtZ/d97uw6GFYbNMPW9JC2Ruuei53qHInOwJLA==",
"dev": true,
"hasInstallScript": true,
+ "license": "MIT",
"dependencies": {
- "bin-links": "^5.0.0",
+ "bin-links": "^6.0.0",
"https-proxy-agent": "^7.0.2",
"node-fetch": "^3.3.2",
"tar": "7.5.1"
@@ -6762,9 +6763,9 @@
}
},
"node_modules/write-file-atomic": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-6.0.0.tgz",
- "integrity": "sha512-GmqrO8WJ1NuzJ2DrziEI2o57jKAVIQNf8a18W3nCYU3H7PNWqCCVTeH6/NQE93CIllIgQS98rrmVkYgTX9fFJQ==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-7.0.0.tgz",
+ "integrity": "sha512-YnlPC6JqnZl6aO4uRc+dx5PHguiR9S6WeoLtpxNT9wIG+BDya7ZNE1q7KOjVgaA73hKhKLpVPgJ5QA9THQ5BRg==",
"dev": true,
"license": "ISC",
"dependencies": {
@@ -6772,7 +6773,7 @@
"signal-exit": "^4.0.1"
},
"engines": {
- "node": "^18.17.0 || >=20.5.0"
+ "node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/ws": {
diff --git a/package.json b/package.json
index 841d29c..8372721 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
"prettier-plugin-sql": "^0.19.1",
"prettier-plugin-svelte": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.12",
- "supabase": "^2.53.6",
+ "supabase": "^2.54.1",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"svelte-hero-icons": "^5.2.0",
diff --git a/src/app.css b/src/app.css
index b3aa431..6f0e75d 100644
--- a/src/app.css
+++ b/src/app.css
@@ -86,6 +86,10 @@ h3 {
@apply cursor-pointer;
}
+.dash-tile-rect:hover:not(:disabled) {
+ box-shadow: inset 0 0 0 2px var(--color-primary);
+}
+
.dash-tile-rect:disabled {
@apply cursor-not-allowed opacity-60;
}
@@ -99,6 +103,10 @@ h3 {
.dash-tile-square:hover:not(:disabled) {
@apply border-secondary shadow-md;
transform: translateY(-1px);
+ box-shadow:
+ inset 0 0 0 2px var(--color-primary),
+ 0 4px 6px -1px rgb(0 0 0 / 0.1),
+ 0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.dash-tile-square:active:not(:disabled) {
@@ -261,6 +269,14 @@ h3 {
@apply card bg-base-100 max-w-full p-2 shadow;
}
+.visibility-panel {
+ @apply card bg-base-100 relative flex max-w-full flex-row flex-wrap items-start justify-between p-4 shadow;
+}
+
+.visibility-toggle-container {
+ @apply border-primary inline-flex rounded-xl border-2 p-2;
+}
+
.form-textarea {
@apply textarea border-primary focus:border-accent w-full rounded-lg border-2 p-3 outline-none;
}
@@ -302,7 +318,7 @@ h3 {
}
.action-question-preview {
- @apply text-sm whitespace-nowrap text-gray-500 italic;
+ @apply text-sm whitespace-nowrap text-gray-500;
}
.action-separator {
@@ -345,6 +361,10 @@ h3 {
.list-item-questions:hover {
@apply border-secondary shadow-md;
+ box-shadow:
+ inset 0 0 0 2px var(--color-primary),
+ 0 4px 6px -1px rgb(0 0 0 / 0.1),
+ 0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.list-item-actions {
@@ -515,6 +535,12 @@ h3 {
@apply card border-primary bg-base-100 mb-3 rounded-lg border-2 p-3 transition-shadow hover:shadow-md;
}
+/* Remove hover effects from action items in email preview (not editable) */
+#email-content .action-item {
+ @apply hover:shadow-none;
+ cursor: default;
+}
+
.action-view {
@apply flex flex-col gap-2;
}
@@ -648,7 +674,7 @@ h3 {
}
.modal-box-help {
- @apply m-4 max-w-4xl mx-auto;
+ @apply m-4 mx-auto max-w-4xl;
max-height: calc(100vh - 2rem);
height: auto;
}
diff --git a/src/app.html b/src/app.html
index 06fe453..37c663a 100644
--- a/src/app.html
+++ b/src/app.html
@@ -2,8 +2,9 @@
-
+
+ LIFT Workwise
%sveltekit.head%
diff --git a/src/lib/components/cards/QuestionCard.svelte b/src/lib/components/cards/QuestionCard.svelte
index 2723a3b..13e8d05 100644
--- a/src/lib/components/cards/QuestionCard.svelte
+++ b/src/lib/components/cards/QuestionCard.svelte
@@ -2,7 +2,6 @@
import { getQuestionById, upsertResponse, updateResponse } from '$lib/services/database';
import { supabase } from '$lib/services/supabaseClient';
import ToggleStatus from '../ui/ToggleStatus.svelte';
- import SaveStatus from '../ui/SaveStatus.svelte';
import UndoButton from '../ui/UndoButton.svelte';
import Tooltip from '../ui/Tooltip.svelte';
import type { QuestionConnections, RowId, ViewName } from '$lib/types/appState';
@@ -29,6 +28,7 @@
const setQuestionId = getContext<(newDetail: RowId | null) => void>('setDetailItemId');
const setViewName = getContext<(view: ViewName) => void>('setViewName');
+ const triggerResponsesChanged = getContext<() => void>('triggerResponsesChanged');
const clearDetail = () => {
setViewName('list');
@@ -40,7 +40,6 @@
throw new Error('Cannot delete response without a profile ID and response ID.');
}
-
try {
// Delete response - CASCADE will automatically delete associated actions
const { error } = await supabase
@@ -51,7 +50,6 @@
if (error) {
throw error;
}
-
} catch (error) {
console.error('❌ Failed to delete response:', error);
throw error;
@@ -101,6 +99,7 @@
let hasChanges = $state(false);
let isSaving = $state(false);
let saveError = $state(null);
+ let saveSuccess = $state(false);
// Helper function to save or update response using upsert pattern
const saveOrUpdateResponse = async (responseData: any) => {
@@ -127,6 +126,9 @@
privacySaveStatus = 'saved';
+ // Trigger re-check of email button enablement
+ triggerResponsesChanged();
+
// Reset to idle after 2 seconds
setTimeout(() => {
if (privacySaveStatus === 'saved') {
@@ -224,6 +226,15 @@
// Update saved state
lastSavedText = currentText;
hasChanges = false;
+ saveSuccess = true;
+
+ // Trigger re-check of email button enablement
+ triggerResponsesChanged();
+
+ // Clear success message after 2 seconds
+ setTimeout(() => {
+ saveSuccess = false;
+ }, 2000);
} catch (error) {
console.error('Failed to save response:', error);
saveError = 'Failed to save response. Please try again.';
@@ -236,7 +247,7 @@
if (canUndo) {
connectionDetails.responseInput = previousText;
canUndo = false;
- checkForChanges(); // Check if we need to enable OK button after undo
+ checkForChanges(); // Check if we need to enable Save button after undo
}
};
@@ -249,12 +260,11 @@
handleUndo();
}
};
-
{:then data}
{#if data.question && data.question.data}
-
diff --git a/src/lib/components/layouts/Header.svelte b/src/lib/components/layouts/Header.svelte
index 7881f48..3f5fb8c 100644
--- a/src/lib/components/layouts/Header.svelte
+++ b/src/lib/components/layouts/Header.svelte
@@ -17,16 +17,17 @@
// Check if user has any answered questions
let hasAnsweredQuestions = $state(false);
- // Re-check responses whenever view changes or profile loads
+ // Re-check responses whenever view changes, profile loads, or responses change
$effect(() => {
- // Track view name and profile id to trigger re-check
+ // Track view name, profile id, and responses trigger to re-check
const viewName = app.view.name;
const profileId = app.profile.id;
+ const trigger = app.responsesChangedTrigger; // Watch for response changes
if (profileId) {
getUserResponses(profileId).then((result) => {
if (result.data) {
- hasAnsweredQuestions = result.data.some(r => r.status === 'answered');
+ hasAnsweredQuestions = result.data.some(r => r.status === 'answered' && r.visibility === 'public');
}
});
} else {
@@ -113,7 +114,7 @@
-
- {#if app.profile.id}
- {@const isDisabled = isInEmailView || !hasAnsweredQuestions}
+
+ {#if app.profile.id && !isInEmailView}
+ {@const isDisabled = !hasAnsweredQuestions}
{@const tooltipText = !hasAnsweredQuestions
- ? 'Answer at least one question to generate an email'
- : isInEmailView
- ? 'Currently viewing email preview'
- : 'Generate an email summary of your responses and actions to share with your line manager'}
+ ? 'Answer at least one public question to generate an email'
+ : 'Generate an email summary of your responses and actions to share with your line manager'}
diff --git a/src/lib/components/layouts/ViewHeader.svelte b/src/lib/components/layouts/ViewHeader.svelte
index 163b1e1..8314179 100644
--- a/src/lib/components/layouts/ViewHeader.svelte
+++ b/src/lib/components/layouts/ViewHeader.svelte
@@ -12,7 +12,8 @@