fix: improve modal scroll lock and e2e script workflow (#156)

This commit is contained in:
Daniel Volz
2026-02-12 21:43:28 +01:00
committed by GitHub
parent 6072d8eb2e
commit 4275dca838
5 changed files with 13 additions and 16 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "medassist-ng-backend",
"version": "1.9.0",
"version": "1.10.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "medassist-ng-backend",
"version": "1.9.0",
"version": "1.10.2",
"dependencies": {
"@fastify/cookie": "^10.0.1",
"@fastify/cors": "^10.0.1",
+1 -1
View File
@@ -14,7 +14,7 @@
"test": "vitest",
"test:run": "vitest run",
"test:coverage": "vitest run --coverage",
"test:e2e": "playwright test",
"test:e2e": "rm -rf test-results && playwright test --project=chromium --project=chromium-data --workers=1; find \"$PWD/test-results\" -name video.webm -not -path '*retry*' -print0 | xargs -0 ls -tr | sed \"s/^/file '/\" | sed \"s/$/'/ \" > /tmp/e2e-videos.txt && ffmpeg -y -f concat -safe 0 -i /tmp/e2e-videos.txt -c copy test-results/all-tests.webm && open -a 'Google Chrome' test-results/all-tests.webm",
"test:e2e:ui": "playwright test --ui",
"test:e2e:headed": "playwright test --headed",
"test:e2e:debug": "playwright test --debug",
+3 -8
View File
@@ -322,20 +322,15 @@ function AppContent() {
useEffect(() => {
const isModalOpen = selectedMed || selectedUser || showProfile || showAbout || showShareDialog;
if (isModalOpen) {
const scrollY = window.scrollY;
document.documentElement.classList.add("modal-open");
document.body.classList.add("modal-open");
document.body.style.top = `-${scrollY}px`;
} else {
const scrollY = document.body.style.top;
document.documentElement.classList.remove("modal-open");
document.body.classList.remove("modal-open");
document.body.style.top = "";
if (scrollY) {
window.scrollTo(0, parseInt(scrollY || "0", 10) * -1);
}
}
return () => {
document.documentElement.classList.remove("modal-open");
document.body.classList.remove("modal-open");
document.body.style.top = "";
};
}, [selectedMed, selectedUser, showProfile, showAbout, showShareDialog]);
+1 -1
View File
@@ -21,7 +21,7 @@ function getBlisterStock(totalPills: number, pillsPerBlister: number, _looseTabl
// Helper to format full blisters
function formatFullBlisters(count: number, t: (key: string) => string): string {
return `${count} ${t("common.blisters")}`;
return `${count} ${count === 1 ? t("common.blister") : t("common.blisters")}`;
}
// Helper to format open blister and loose pills
+6 -4
View File
@@ -67,6 +67,7 @@
}
html {
overflow-x: hidden;
background: var(--bg-primary);
}
body {
margin: 0;
@@ -80,11 +81,9 @@ body {
color 200ms ease;
}
html.modal-open,
body.modal-open {
overflow: hidden !important;
position: fixed;
width: 100%;
height: 100%;
}
.page {
@@ -3581,9 +3580,12 @@ textarea.auto-resize {
}
/* User Medications Modal */
.user-meds-modal {
.modal-content.user-meds-modal {
max-width: 500px;
width: 95%;
padding: 0;
border-radius: 16px;
overflow: hidden;
}
.user-meds-header {