Compare commits
No commits in common. "14ba1bcf147956851a4e0284f495c9a516a8f122" and "1f0e9fb59d347065a97bbab025b82a18eb636df0" have entirely different histories.
14ba1bcf14
...
1f0e9fb59d
|
|
@ -189,8 +189,7 @@ textarea { resize: vertical; min-height: 120px; }
|
||||||
.milestone-lane { display:flex; align-items:center; gap:8px; min-width:min(100%,260px); }
|
.milestone-lane { display:flex; align-items:center; gap:8px; min-width:min(100%,260px); }
|
||||||
.work-milestone-filter { min-width:180px; flex:1; padding:8px; border-radius:8px; border:1px solid #1f3a5f; background:#0b1526; color:var(--text); }
|
.work-milestone-filter { min-width:180px; flex:1; padding:8px; border-radius:8px; border:1px solid #1f3a5f; background:#0b1526; color:var(--text); }
|
||||||
.my-work-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:10px; }
|
.my-work-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:10px; }
|
||||||
.draft-card { display:flex; flex-direction:column; gap:8px; min-width:0; scroll-margin-bottom:calc(76px + env(safe-area-inset-bottom)); }
|
.draft-card { display:flex; flex-direction:column; gap:8px; min-width:0; }
|
||||||
.draft-card:focus-visible { outline:3px solid #60a5fa; outline-offset:3px; border-color:#93c5fd; }
|
|
||||||
.draft-preview { color:var(--muted); overflow-wrap:anywhere; }
|
.draft-preview { color:var(--muted); overflow-wrap:anywhere; }
|
||||||
.draft-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; }
|
.draft-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; }
|
||||||
.draft-actions button { min-height:44px; width:100%; }
|
.draft-actions button { min-height:44px; width:100%; }
|
||||||
|
|
|
||||||
|
|
@ -2078,8 +2078,7 @@
|
||||||
(item.ownership ? '<div class="small">' + escapeHtml(item.ownership) + '</div>' : '') : '';
|
(item.ownership ? '<div class="small">' + escapeHtml(item.ownership) + '</div>' : '') : '';
|
||||||
const attempt = item.last_attempt_error ? '<span class="delivery-attempt small">Last attempt ' +
|
const attempt = item.last_attempt_error ? '<span class="delivery-attempt small">Last attempt ' +
|
||||||
escapeHtml(fmt(item.last_attempt_at)) + ' · ' + escapeHtml(item.last_attempt_error) + '</span>' : '';
|
escapeHtml(fmt(item.last_attempt_at)) + ' · ' + escapeHtml(item.last_attempt_error) + '</span>' : '';
|
||||||
const captureTarget = isUnfiled ? ' tabindex="-1" data-capture-id="' + escapeHtml(item.capture_id) + '"' : '';
|
return '<article class="my-work-card draft-card">' +
|
||||||
return '<article class="my-work-card draft-card"' + captureTarget + '>' +
|
|
||||||
'<span class="small">' + escapeHtml(item.label) + (item.repository ? ' · ' + escapeHtml(item.repository) : '') + '</span>' +
|
'<span class="small">' + escapeHtml(item.label) + (item.repository ? ' · ' + escapeHtml(item.repository) : '') + '</span>' +
|
||||||
'<span class="my-work-card-title">' + escapeHtml(item.title) + '</span>' +
|
'<span class="my-work-card-title">' + escapeHtml(item.title) + '</span>' +
|
||||||
'<span class="draft-preview">' + escapeHtml(item.preview || 'Unfinished draft') + '</span>' + state + attempt +
|
'<span class="draft-preview">' + escapeHtml(item.preview || 'Unfinished draft') + '</span>' + state + attempt +
|
||||||
|
|
@ -4070,7 +4069,7 @@
|
||||||
body: qs('#create-issue-body').value.trim(),
|
body: qs('#create-issue-body').value.trim(),
|
||||||
attachment: await createIssueAttachmentController.serialize(),
|
attachment: await createIssueAttachmentController.serialize(),
|
||||||
};
|
};
|
||||||
const savedCapture = await unfiledCaptures.save(captureDraft);
|
await unfiledCaptures.save(captureDraft);
|
||||||
if (resumedUnfiledCaptureId) {
|
if (resumedUnfiledCaptureId) {
|
||||||
await unfiledCaptures.completeResume(resumedUnfiledCaptureId);
|
await unfiledCaptures.completeResume(resumedUnfiledCaptureId);
|
||||||
resumedUnfiledCaptureId = '';
|
resumedUnfiledCaptureId = '';
|
||||||
|
|
@ -4080,15 +4079,8 @@
|
||||||
qs('#create-issue-body').value = '';
|
qs('#create-issue-body').value = '';
|
||||||
createIssueAttachmentController.clear();
|
createIssueAttachmentController.clear();
|
||||||
closeCreateIssueSheet(true, false);
|
closeCreateIssueSheet(true, false);
|
||||||
qs('[data-work-filter="draft"]').click();
|
|
||||||
mobileTaskDock.select('drafts');
|
|
||||||
refreshMyWorkView();
|
refreshMyWorkView();
|
||||||
const savedCard = qs('[data-capture-id="' + CSS.escape(savedCapture.id) + '"]');
|
qs('#my-work-action-status').textContent = 'Saved in Drafts · choose a repository after reconnecting.';
|
||||||
requestAnimationFrame(() => {
|
|
||||||
savedCard?.scrollIntoView({block:'nearest'});
|
|
||||||
savedCard?.focus({preventScroll:true});
|
|
||||||
});
|
|
||||||
qs('#my-work-action-status').textContent = 'Saved to Drafts. Choose a repository when you’re ready to file it.';
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
qs('#create-issue-capture-status').textContent = error.message;
|
qs('#create-issue-capture-status').textContent = error.message;
|
||||||
qs('#create-issue-title').focus();
|
qs('#create-issue-title').focus();
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,10 @@
|
||||||
let wasHidden = false;
|
let wasHidden = false;
|
||||||
|
|
||||||
function select(name) {
|
function select(name) {
|
||||||
if (!buttons[name]) return false;
|
|
||||||
Object.entries(buttons).forEach(([key, button]) => {
|
Object.entries(buttons).forEach(([key, button]) => {
|
||||||
if (key === name) button.setAttribute('aria-current', 'page');
|
if (key === name) button.setAttribute('aria-current', 'page');
|
||||||
else button.removeAttribute('aria-current');
|
else button.removeAttribute('aria-current');
|
||||||
});
|
});
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshVisibility() {
|
function refreshVisibility() {
|
||||||
|
|
@ -70,5 +68,5 @@
|
||||||
else nav.removeAttribute('data-attention');
|
else nav.removeAttribute('data-attention');
|
||||||
}
|
}
|
||||||
|
|
||||||
return {start, select, refreshVisibility, updateAttention, updateWork};
|
return {start, refreshVisibility, updateAttention, updateWork};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -116,40 +116,6 @@ process.stdout.write(JSON.stringify({{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def test_mobile_task_dock_programmatically_selects_destination_without_running_action():
|
|
||||||
script = f"""
|
|
||||||
const createDock = require({json.dumps(str(DOCK))});
|
|
||||||
const calls = [];
|
|
||||||
const makeButton = () => ({{
|
|
||||||
attributes: {{}},
|
|
||||||
setAttribute(name, value) {{ this.attributes[name] = value; }},
|
|
||||||
removeAttribute(name) {{ delete this.attributes[name]; }},
|
|
||||||
}});
|
|
||||||
const buttons = {{work:makeButton(), drafts:makeButton()}};
|
|
||||||
const dock = createDock({{
|
|
||||||
nav:{{}}, buttons,
|
|
||||||
actions:{{work:()=>calls.push('work'), drafts:()=>calls.push('drafts')}},
|
|
||||||
}});
|
|
||||||
const selected = dock.select('drafts');
|
|
||||||
process.stdout.write(JSON.stringify({{
|
|
||||||
selected, calls,
|
|
||||||
work:buttons.work.attributes['aria-current'] || null,
|
|
||||||
drafts:buttons.drafts.attributes['aria-current'] || null,
|
|
||||||
}}));
|
|
||||||
"""
|
|
||||||
result = subprocess.run(
|
|
||||||
["node", "-e", script], capture_output=True, text=True
|
|
||||||
)
|
|
||||||
|
|
||||||
assert result.returncode == 0, result.stderr
|
|
||||||
assert json.loads(result.stdout) == {
|
|
||||||
"selected": True,
|
|
||||||
"calls": [],
|
|
||||||
"work": None,
|
|
||||||
"drafts": "page",
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def test_mobile_task_dock_keeps_today_label_separate_from_attention_count():
|
def test_mobile_task_dock_keeps_today_label_separate_from_attention_count():
|
||||||
script = f"""
|
script = f"""
|
||||||
const createDock = require({json.dumps(str(DOCK))});
|
const createDock = require({json.dumps(str(DOCK))});
|
||||||
|
|
|
||||||
|
|
@ -151,12 +151,6 @@ async def test_mobile_composer_exposes_cold_offline_save_and_account_safe_resume
|
||||||
assert "createUnfiledCaptures({" in html
|
assert "createUnfiledCaptures({" in html
|
||||||
assert "getCaptureLogin: () => String(lastContextSnapshot?.user?.login || '').trim()" in html
|
assert "getCaptureLogin: () => String(lastContextSnapshot?.user?.login || '').trim()" in html
|
||||||
assert "unfiledCaptures.save(captureDraft)" in html
|
assert "unfiledCaptures.save(captureDraft)" in html
|
||||||
assert "const savedCapture = await unfiledCaptures.save(captureDraft)" in html
|
|
||||||
assert "mobileTaskDock.select('drafts')" in html
|
|
||||||
assert "data-capture-id=\"' + escapeHtml(item.capture_id) + '\"" in html
|
|
||||||
assert "requestAnimationFrame(() =>" in html
|
|
||||||
assert "savedCard?.scrollIntoView({block:'nearest'})" in html
|
|
||||||
assert "Saved to Drafts. Choose a repository when you’re ready to file it." in html
|
|
||||||
assert "await unfiledCaptures.resume(item.capture_id, activeFlushLogin)" in html
|
assert "await unfiledCaptures.resume(item.capture_id, activeFlushLogin)" in html
|
||||||
assert "await createIssueAttachmentController.serialize()" in html
|
assert "await createIssueAttachmentController.serialize()" in html
|
||||||
assert "createUnfiledAttachmentStore()" in html
|
assert "createUnfiledAttachmentStore()" in html
|
||||||
|
|
@ -166,8 +160,6 @@ async def test_mobile_composer_exposes_cold_offline_save_and_account_safe_resume
|
||||||
assert "issueCapture.saveDraft(resumed)" in html
|
assert "issueCapture.saveDraft(resumed)" in html
|
||||||
assert "item.kind === 'unfiled-issue'" in html
|
assert "item.kind === 'unfiled-issue'" in html
|
||||||
assert '.create-issue-actions button { min-height:44px;' in html
|
assert '.create-issue-actions button { min-height:44px;' in html
|
||||||
assert '.draft-card:focus-visible' in html
|
|
||||||
assert 'scroll-margin-bottom:calc(76px + env(safe-area-inset-bottom))' in html
|
|
||||||
assert '@media(max-width:320px)' in html
|
assert '@media(max-width:320px)' in html
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user