feat: enhance user interaction with contact details and improved UI elements

Updated the signup and management pages to include clickable email and phone links for better user accessibility. Introduced new styles for roster management, including a collapsible move form for shift changes. Enhanced confirmation messages for cancellations and improved print styles to hide unnecessary elements. Added error handling for the Turnstile widget in the signup dialog, ensuring fallback options are visible when needed. Updated tests to verify the new features and ensure robust functionality across the application.
This commit is contained in:
blake committed 2026-11-02 15:17:51 -06:00
1 parent e6f072dcac
commit 38c08cf872
12 files changed
+251 -86

No files matched your search

+105 -40
View File
@@ -862,13 +862,19 @@ main a:hover {
margin: 0.5rem 0 0;
}
.manage-record:has(.manage-tools) {
padding-top: 4.35rem;
}
.manage-tools {
position: absolute;
z-index: 2;
top: 1.05rem;
right: 1.05rem;
left: 1.05rem;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.4rem;
margin: 0;
}
@@ -878,46 +884,11 @@ main a:hover {
}
.manage-x {
width: 2.5rem;
height: 2.5rem;
min-height: 2.5rem;
padding: 0;
border-color: var(--hope-border);
background: #fff;
padding: 0.4rem 0.95rem;
box-shadow: none;
}
.manage-x::before {
background: var(--hope-yellow);
}
.manage-x span {
position: relative;
width: 0.7rem;
height: 0.7rem;
font-size: 0;
}
.manage-x span::before,
.manage-x span::after {
content: "";
position: absolute;
left: 50%;
top: 50%;
width: 0.7rem;
height: 2px;
border-radius: 1px;
background: currentColor;
}
.manage-x span::before {
transform: translate(-50%, -50%) rotate(45deg);
}
.manage-x span::after {
transform: translate(-50%, -50%) rotate(-45deg);
}
.manage-menu {
position: relative;
}
@@ -3057,6 +3028,45 @@ button.btn-quiet::before {
color: var(--hope-ink);
}
.shift-card a[href^="tel:"],
.shift-card a[href^="mailto:"] {
color: inherit;
font-weight: 650;
text-decoration: underline;
text-underline-offset: 0.12em;
}
.roster-move {
margin-top: 0.75rem;
}
.roster-move:not([open]) > .move-form,
.roster-move:not([open])::details-content {
display: none;
}
.roster-move > summary {
display: inline-flex;
align-items: center;
width: fit-content;
min-height: 2rem;
list-style: none;
cursor: pointer;
color: #4d7494;
font-size: 0.92rem;
font-weight: 650;
text-decoration: underline;
text-underline-offset: 0.12em;
}
.roster-move > summary::-webkit-details-marker {
display: none;
}
.roster-move > .move-form {
margin-top: 0.75rem;
}
.event-page .desk-intro .desk-toolbar {
align-items: center;
}
@@ -4341,10 +4351,6 @@ button.btn-quiet::before {
width: 100%;
}
.manage-record:has(.manage-tools) {
padding-top: 4.35rem;
}
.manage-record:has(.manage-tools) .details {
padding-right: 0;
}
@@ -5831,3 +5837,62 @@ main > .crumb,
flex-wrap: wrap;
}
}
@media print {
.skip-link,
.header,
.footer,
.session-bar,
.crumb,
.desk-actions,
.desk-inline,
.pick,
.pick-bar,
.notice,
.event-edit,
.walkin-menu,
.roster-move,
.roster-actions,
.signup-form,
.confirm-dialog,
.event-dialog,
button,
.btn {
display: none !important;
}
body,
main,
.event-page,
.shift-card,
article.shift-card,
.desk-events,
.event-strip,
.manage,
.manage-record {
background: #fff;
box-shadow: none;
color: #000;
}
.shift-list {
display: block;
}
.shift-list > li,
li.shift-card {
break-inside: avoid;
margin-bottom: 0.75rem;
border: 1px solid #bbb;
border-radius: 0;
box-shadow: none;
background: #fff;
}
a,
.shift-card a[href^="tel:"],
.shift-card a[href^="mailto:"] {
color: #000;
text-decoration: none;
}
}
+12
View File
@@ -1,4 +1,16 @@
(function () {
window.addEventListener(
'error',
function (event) {
var target = event.target;
if (!target || !target.src || String(target.src).indexOf('challenges.cloudflare.com/turnstile') === -1) return;
document.querySelectorAll('[data-turnstile-fallback]').forEach(function (node) {
node.hidden = false;
});
},
true,
);
var key = 'hope-place';
var place = null;
try {
+20 -6
View File
@@ -200,14 +200,28 @@
if (!widget || !sitekey) return;
loadTurnstile()
.then(function () {
if (!widget.isConnected || !window.turnstile) return;
if (!widget.isConnected || !window.turnstile) {
showTurnstileFallback(scope);
return;
}
// turnstile.ready() throws when this script is inserted dynamically.
widgetId = window.turnstile.render(widget, {
sitekey: sitekey,
action: widget.getAttribute('data-action') || 'signup',
});
try {
widgetId = window.turnstile.render(widget, {
sitekey: sitekey,
action: widget.getAttribute('data-action') || 'signup',
});
} catch (err) {
showTurnstileFallback(scope);
}
})
.catch(function () {});
.catch(function () {
showTurnstileFallback(scope);
});
}
function showTurnstileFallback(scope) {
var fallback = scope.querySelector('[data-turnstile-fallback]');
if (fallback) fallback.hidden = false;
}
function loadTurnstile() {