feat: open Following alerts in changed review (Closes #1317)
This commit is contained in:
1 parent
2b6730288a
commit
a2501e47c3
6 files changed
+88
-6
No files matched your search
@@ -8233,6 +8233,7 @@
|
||||
return true;
|
||||
}
|
||||
async function openWorkQueueRoute(filter, action = null) {
|
||||
if (filter === 'following') return followingQueue.route();
|
||||
if (!selectWorkQueue(filter, { preserveRoute:true })) return;
|
||||
qs('#my-work').scrollIntoView({block:'start'});
|
||||
qs('#my-work').focus();
|
||||
|
||||
@@ -137,6 +137,7 @@
|
||||
return payload;
|
||||
};
|
||||
let feature;
|
||||
const show = () => query('#following-sheet').open || query('#following-sheet').showModal();
|
||||
function render(state) {
|
||||
hooks.onStatus?.(state.status);
|
||||
const list = query('#following-list');
|
||||
@@ -191,16 +192,18 @@
|
||||
query('#review-following').addEventListener('click', () => {
|
||||
query('#following-sheet').close();
|
||||
feature.startReview().catch(() => {
|
||||
if (!query('#following-sheet').open) query('#following-sheet').showModal();
|
||||
show();
|
||||
});
|
||||
});
|
||||
query('#retry-following').addEventListener('click', () => feature.load().catch(() => {}));
|
||||
return {
|
||||
load:feature.load,
|
||||
review:feature.startReview,
|
||||
async route() {
|
||||
await feature.load().then(feature.startReview).catch(() => false) || show();
|
||||
},
|
||||
open() {
|
||||
const sheet = query('#following-sheet');
|
||||
if (!sheet.open) sheet.showModal();
|
||||
show();
|
||||
feature.load().catch(() => {});
|
||||
return 'opened-following';
|
||||
},
|
||||
@@ -210,8 +213,7 @@
|
||||
returnToFollowing() {
|
||||
const completed = feature.finishReview();
|
||||
if (completed) return 'completed-following';
|
||||
const sheet = query('#following-sheet');
|
||||
if (!sheet.open) sheet.showModal();
|
||||
show();
|
||||
globalThis.requestAnimationFrame?.(() => {
|
||||
const target = query('#review-following:not([hidden])') || query('.following-card') || query('#close-following');
|
||||
target?.focus();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
'use strict';
|
||||
|
||||
const repositoryPart = /^[A-Za-z0-9_.-]+$/;
|
||||
const queueFilters = ['today', 'agenda', 'attention', 'filed', 'update', 'later', 'draft'];
|
||||
const queueFilters = ['today', 'agenda', 'attention', 'filed', 'update', 'later', 'draft', 'following'];
|
||||
const sections = {
|
||||
issue: ['overview', 'conversation', 'reply', 'actions'],
|
||||
filed: ['overview', 'conversation', 'reply', 'actions'],
|
||||
|
||||
Reference in new issue
Block a user