diff --git a/functions/_middleware.js b/functions/_middleware.js
index a01ebf8cb8f..1ecc5ac441e 100644
--- a/functions/_middleware.js
+++ b/functions/_middleware.js
@@ -22,7 +22,8 @@ const MOVED_APP_PAGES = new Set(['/player', '/fullscreen', '/addons', '/credits'
const PROJECT_PAGE = /^\/\d+(?:\/(editor|fullscreen))?$/;
const PROJECT_PAGE_ASSETS = {editor: '/editor', fullscreen: '/fullscreen'};
const FILE_PATH = /\/[^/]+\.(?!html$)[A-Za-z0-9]+$/;
-const PROJECT_CODE_PATH = /^\/code(?:\/(?:commits|branches|pulls|releases)|\/(?:tree|blob)(?:\/[^/]+)+)?$/;
+const PROJECT_CODE_PATH =
+ /^\/code(?:\/(?:commits|branches|pulls|releases|issues)|\/issues\/\d+|\/(?:tree|blob)(?:\/[^/]+)+)?$/;
// The app pages live at the root, but people guess /editor/fullscreen and the like from the editor's URL.
const EDITOR_PREFIXED_APP_PAGE = /^\/editor(\/[^/]+)$/;
// Standalone HTML entries with their own tags; the community SPA is index.html.
diff --git a/package.json b/package.json
index 0a9d43c2add..2bcb49aa2e0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "scratch-gui",
- "version": "3.10.0",
+ "version": "3.11.0",
"private": true,
"description": "MistWarp editor, player, and community site",
"author": "MistWarp contributors",
diff --git a/src/community/api/comments.js b/src/community/api/comments.js
index c07d211ad66..97c6041b428 100644
--- a/src/community/api/comments.js
+++ b/src/community/api/comments.js
@@ -21,6 +21,8 @@ export default {
request(`/projects/${id}/comments/${commentId}/react`, {method: 'POST', body: {type}}),
pinComment: (id, commentId, pinned) =>
request(`/projects/${id}/comments/${commentId}/pin`, {method: 'POST', body: {pinned}}),
+ setCommentIssue: (id, commentId, state) =>
+ request(`/projects/${id}/comments/${commentId}/issue`, {method: 'PUT', body: {state}}),
reactProfileComment: (name, commentId, type) =>
request(`/users/${encodeURIComponent(name)}/comments/${commentId}/react`, {method: 'POST', body: {type}}),
pinProfileComment: (name, commentId, pinned) =>
diff --git a/src/community/api/query.js b/src/community/api/query.js
index 04eb5bf99cd..aed3262ed4f 100644
--- a/src/community/api/query.js
+++ b/src/community/api/query.js
@@ -1,4 +1,6 @@
-export const commentQuery = ({offset = 0, limit = 20, anchor = '', all = false, sort = 'newest'} = {}) => {
+export const commentQuery = ({
+ offset = 0, limit = 20, anchor = '', all = false, sort = 'newest', issue = '', number = 0
+} = {}) => {
const params = new URLSearchParams();
if (all) {
params.set('all', '1');
@@ -8,6 +10,10 @@ export const commentQuery = ({offset = 0, limit = 20, anchor = '', all = false,
}
if (anchor) params.set('anchor', anchor);
if (sort === 'donations') params.set('sort', 'donations');
+ if (['open', 'done', 'any'].includes(issue)) {
+ params.set('issue', issue);
+ if (Number(number) > 0) params.set('number', String(Math.floor(Number(number))));
+ }
return params.toString();
};
diff --git a/src/community/comment-issues.js b/src/community/comment-issues.js
new file mode 100644
index 00000000000..544d69d1c41
--- /dev/null
+++ b/src/community/comment-issues.js
@@ -0,0 +1,44 @@
+import {sameUser} from './format';
+
+export const ISSUE_FILTERS = ['open', 'done'];
+
+export const commentIssueState = comment => {
+ const state = comment && comment.issue && comment.issue.state;
+ return state === 'open' || state === 'done' ? state : '';
+};
+
+export const commentIssueNumber = comment => {
+ if (!commentIssueState(comment)) return 0;
+ const number = Number(comment.issue.number);
+ return Number.isFinite(number) && number > 0 ? number : 0;
+};
+
+export const issueTitle = (content, limit = 120) => {
+ const line = String(content || '').split('\n')
+ .map(part => part.trim())
+ .find(Boolean) || '';
+ return line.length > limit ? `${line.slice(0, limit - 1).trimEnd()}…` : line;
+};
+
+export const canChangeIssue = (comment, user, canTriage) => Boolean(user && comment && !comment.parent) &&
+ (Boolean(canTriage) || sameUser(comment.author, user.username));
+
+export const mergeCommentUpdate = (comment, update) => {
+ const next = {...comment, ...update};
+ if (!update || !update.issue) delete next.issue;
+ return next;
+};
+
+export const issueThreads = comments => {
+ const replies = new Map();
+ for (const comment of comments || []) {
+ if (!comment.parent) continue;
+ if (!replies.has(comment.parent)) replies.set(comment.parent, []);
+ replies.get(comment.parent).push(comment);
+ }
+ for (const list of replies.values()) list.sort((a, b) => (a.created || 0) - (b.created || 0));
+ return (comments || [])
+ .filter(comment => !comment.parent && commentIssueState(comment))
+ .sort((a, b) => commentIssueNumber(b) - commentIssueNumber(a))
+ .map(root => ({root, replies: replies.get(root.id) || []}));
+};
diff --git a/src/community/components/CommentThread.jsx b/src/community/components/CommentThread.jsx
index 56ae67f09d6..a0bc70675e3 100644
--- a/src/community/components/CommentThread.jsx
+++ b/src/community/components/CommentThread.jsx
@@ -2,7 +2,10 @@ import {getCommunityLocale} from '../locale.js';
import {useCommunityIntl as useCommunityText} from '../i18n.jsx';
import React, {useEffect, useState, useCallback, useMemo, useRef} from 'react';
import {Link} from 'react-router-dom';
-import {Reply, Search, MoreHorizontal, MessageSquare, Pencil, Flag, Trash2, Coins, Pin, Trophy} from 'lucide-react';
+import {
+ Reply, Search, MoreHorizontal, MessageSquare, Pencil, Flag, Trash2, Coins, Pin, Trophy, CircleDot, CircleCheck,
+ CircleSlash, RotateCcw
+} from 'lucide-react';
import {useUser} from '../UserContext.jsx';
import useAfterLogin from '../use-after-login.js';
import Avatar from './Avatar.jsx';
@@ -21,6 +24,7 @@ import {timeAgo, sameUser, formatPlaytime} from '../format';
import {payWithRotur} from '../../lib/rotur/payment-window.js';
import useLatest from '../use-latest.js';
import {readSessionDraft, writeSessionDraft} from '../session-draft.js';
+import {commentIssueNumber, commentIssueState, mergeCommentUpdate} from '../comment-issues.js';
import styles from './CommentThread.module.css';
const commentKindOptions = text => [
@@ -87,10 +91,25 @@ const kindLabel = (kind, text) => commentKindOptions(text).find(item => item.val
const CommentRow = ({
comment, onReply, onDelete, onEdit, onSaveEdit, onCancelEdit, onReact, onPin, onReport, canReply, canDelete,
canEdit, canPin, canReport, deleting, editing, editText, editBusy, onEditTextChange, reacting, pinning,
- isReply, id, authorBadge
+ isReply, id, authorBadge, canIssue, canTrackIssue, onIssue, issueBusy, issueHref
}) => {
const {text: communityText} = useCommunityText();
- const hasMenu = canEdit || canPin || canReport || canDelete;
+ const issueState = commentIssueState(comment);
+ const issueNumber = commentIssueNumber(comment);
+ const showIssueActions = Boolean(canIssue && (issueState || canTrackIssue));
+ const hasMenu = canEdit || canPin || canReport || canDelete || showIssueActions;
+ const issueLabel = issueState === 'done' ?
+ communityText('Done #{value1}', {value1: issueNumber}) :
+ communityText('Issue #{value1}', {value1: issueNumber});
+ const issueBadge = issueState ? (
+
+ {issueState === 'done' ?
+ :
+ }
+ {issueLabel}
+
+ ) : null;
+ const issueClass = `${styles.issue} ${issueState === 'done' ? styles.issueDone : ''}`;
const donationTier = commentDonationTier(donationAmount(comment));
return (
{status}
diff --git a/src/community/pages/Project.jsx b/src/community/pages/Project.jsx
index 071e08d6fde..a5a221cbf3c 100644
--- a/src/community/pages/Project.jsx
+++ b/src/community/pages/Project.jsx
@@ -587,6 +587,7 @@ const Project = () => {
edit: (commentId, content) => api.editComment(id, commentId, content),
react: (commentId, type) => api.reactComment(id, commentId, type),
pin: (commentId, pinned) => api.pinComment(id, commentId, pinned),
+ issue: (commentId, state) => api.setCommentIssue(id, commentId, state),
subscribe: listener => projectRealtime.subscribe(
id,
listener,
diff --git a/src/community/pages/ProjectCode.jsx b/src/community/pages/ProjectCode.jsx
index 3f2203c8fb6..e31d97888cc 100644
--- a/src/community/pages/ProjectCode.jsx
+++ b/src/community/pages/ProjectCode.jsx
@@ -25,6 +25,8 @@ import SelectMenu from '../components/ui/SelectMenu.jsx';
import StatusMessage from '../components/ui/StatusMessage.jsx';
import CodeBrowser from './project/CodeBrowser.jsx';
import HistoryList from './project/HistoryList.jsx';
+import IssueList from './project/IssueList.jsx';
+import IssueThread from './project/IssueThread.jsx';
import ProjectPreview from './project/ProjectPreview.jsx';
import PullList from './project/PullList.jsx';
import ReleaseList from './project/ReleaseList.jsx';
@@ -32,10 +34,11 @@ import useProjectData from './project/use-project-data.js';
import styles from './ProjectCode.module.css';
const TAB_ID_PREFIX = 'project-code';
-export const CODE_TABS = ['code', 'commits', 'branches', 'pulls', 'releases'];
+export const CODE_TABS = ['code', 'issues', 'commits', 'branches', 'pulls', 'releases'];
export const codeLocation = splat => {
const parts = String(splat || '').split('/').filter(Boolean);
if (parts[0] === 'tree' || parts[0] === 'blob') return {tab: 'code', kind: parts[0], path: parts.slice(1).join('/')};
+ if (parts[0] === 'issues' && /^\d+$/.test(parts[1] || '')) return {tab: 'issues', kind: 'issue', path: '', number: Number(parts[1])};
return {tab: CODE_TABS.includes(parts[0]) ? parts[0] : 'code', kind: 'tree', path: ''};
};
export const codeTabPath = (baseUrl, tab) => (tab === 'code' ? `${baseUrl}/code` : `${baseUrl}/code/${tab}`);
@@ -82,6 +85,7 @@ const AboutPanel = ({project, baseUrl, counts, fileCount, contributors}) => {
const rows = [
{key: 'commits', tab: 'commits', value: counts.commits, one: communityText('1 commit'), many: communityText('{value1} commits', {value1: counts.commits})},
{key: 'branches', tab: 'branches', value: counts.branches, one: communityText('1 branch'), many: communityText('{value1} branches', {value1: counts.branches})},
+ {key: 'issues', tab: 'issues', value: counts.issues, one: communityText('1 open issue'), many: communityText('{value1} open issues', {value1: counts.issues})},
{key: 'pulls', tab: 'pulls', value: counts.pulls, one: communityText('1 open pull request'), many: communityText('{value1} open pull requests', {value1: counts.pulls})},
{key: 'releases', tab: 'releases', value: counts.releases, one: communityText('1 release'), many: communityText('{value1} releases', {value1: counts.releases})}
].filter(row => typeof row.value === 'number');
@@ -136,6 +140,7 @@ const ProjectCodePage = ({id, vanitySlug}) => {
const [branches, setBranches] = useState(null);
const [openPulls, setOpenPulls] = useState(null);
const [releaseCount, setReleaseCount] = useState(null);
+ const [issueCounts, setIssueCounts] = useState(null);
const [fileCount, setFileCount] = useState(null);
const beginExtras = useLatest();
const place = codeLocation(params['*']);
@@ -156,11 +161,16 @@ const ProjectCodePage = ({id, vanitySlug}) => {
api.branches(id).then(fresh(data => setBranches(data.branches || []))).catch(fresh(() => setBranches([])));
api.pulls(id).then(fresh(data => setOpenPulls((data.pulls || []).filter(pull => pull.state === 'open').length))).catch(() => {});
api.releases(id).then(fresh(data => setReleaseCount((data.releases || []).length))).catch(() => {});
+ api.getComments(id, {limit: 1, issue: 'open'}).then(fresh(data => setIssueCounts(data.issueCounts || null))).catch(() => {});
}, [beginExtras, canView, id]);
+ const refreshIssueCounts = useCallback(() => {
+ api.getComments(id, {limit: 1, issue: 'open'}).then(data => setIssueCounts(data.issueCounts || null)).catch(() => {});
+ }, [id]);
useEffect(() => {
setBranches(null);
setOpenPulls(null);
setReleaseCount(null);
+ setIssueCounts(null);
setFileCount(null);
loadBranches();
}, [loadBranches]);
@@ -186,8 +196,12 @@ const ProjectCodePage = ({id, vanitySlug}) => {
commits: project ? Number(project.commitCount) || (versionHistory?.commits?.length ?? null) : null,
branches: branches ? branches.length : null,
pulls: openPulls,
- releases: releaseCount
+ releases: releaseCount,
+ issues: issueCounts ? issueCounts.open : null
};
+ const hasIssues = Boolean(issueCounts && (issueCounts.open || issueCounts.done));
+ const visibleTabs = CODE_TABS.filter(key => key !== 'issues' || !project || !project.issuesOff ||
+ hasIssues || issueCounts === null || tab === 'issues');
const pickBranch = name => {
const next = new URLSearchParams(searchParams);
@@ -205,6 +219,7 @@ const ProjectCodePage = ({id, vanitySlug}) => {
const tabLabels = {
code: communityText('Code'),
+ issues:
{communityText('Issues')} ,
commits:
{communityText('Commits')} ,
branches:
{communityText('Branches')} ,
pulls:
{communityText('Pull requests')} ,
@@ -252,7 +267,7 @@ const ProjectCodePage = ({id, vanitySlug}) => {
idPrefix={TAB_ID_PREFIX}
value={tab}
onChange={showTab}
- items={CODE_TABS.map(key => ({key, label: tabLabels[key]}))}
+ items={visibleTabs.map(key => ({key, label: tabLabels[key]}))}
/>
{tab === 'code' ? (
@@ -301,6 +316,12 @@ const ProjectCodePage = ({id, vanitySlug}) => {
) : null}
) : null}
+ {tab === 'issues' && place.kind === 'issue' ? (
+
+ ) : null}
+ {tab === 'issues' && place.kind !== 'issue' ? (
+
+ ) : null}
{tab === 'commits' ? (
) : null}
diff --git a/src/community/pages/ProjectCode.module.css b/src/community/pages/ProjectCode.module.css
index 8ebbf081f86..f9c7cb592b5 100644
--- a/src/community/pages/ProjectCode.module.css
+++ b/src/community/pages/ProjectCode.module.css
@@ -515,6 +515,171 @@ a.rowMessage:hover {
outline-offset: -2px;
}
+.issueRow div > .issueLatest {
+ display: flex;
+ gap: var(--space-2);
+ min-width: 0;
+ margin-top: var(--space-1);
+ padding: var(--space-2) var(--space-3);
+ border-radius: var(--radius-xs);
+ background: var(--bg-raised);
+ color: var(--text-dim);
+ font-size: var(--fs-sm);
+ font-weight: 400;
+}
+
+.issueLatest b {
+ flex: none;
+ color: var(--mw-text);
+ font-weight: 600;
+}
+
+.issueLatest span {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.issueRow div > .issueLatest:hover {
+ color: var(--mw-text);
+}
+
+.issueComposer {
+ display: grid;
+ gap: var(--space-3);
+ padding: var(--space-4);
+ border-radius: var(--radius-sm);
+ background: var(--bg-card);
+}
+
+.issueComposer textarea {
+ width: 100%;
+ min-height: 88px;
+ padding: var(--space-3);
+ border: 0;
+ border-radius: var(--radius-xs);
+ background: var(--bg-field);
+ color: var(--mw-text);
+ font: inherit;
+ font-size: var(--fs-md);
+ resize: vertical;
+}
+
+.issueComposerActions {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: flex-end;
+ gap: var(--space-2);
+}
+
+.issueThread {
+ display: grid;
+ gap: var(--space-4);
+ max-width: var(--maxw-mid);
+}
+
+.issueBack {
+ display: inline-flex;
+ align-items: center;
+ justify-self: start;
+ gap: var(--space-1);
+ color: var(--text-dim);
+ font-size: var(--fs-sm);
+ font-weight: 600;
+}
+
+.issueBack:hover {
+ color: var(--accent-strong);
+}
+
+.issueHead h2 {
+ margin: 0 0 var(--space-2);
+ font-size: var(--fs-xl);
+ font-weight: 600;
+ overflow-wrap: anywhere;
+}
+
+.issueHead h2 span {
+ color: var(--text-dim);
+ font-weight: 400;
+}
+
+.issueMeta {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: var(--space-3);
+ color: var(--text-dim);
+ font-size: var(--fs-sm);
+}
+
+.issueMeta > span {
+ display: inline-flex;
+ align-items: center;
+ gap: var(--space-1);
+}
+
+.issueMeta > .issueState {
+ padding: var(--space-1) var(--space-3);
+ border-radius: var(--radius);
+ background: var(--mw-success);
+ color: #ffffff;
+ font-size: var(--fs-md);
+ font-weight: 600;
+}
+
+.issueState.issueStateDone {
+ background: var(--accent);
+ color: var(--accent-contrast);
+ font-size: var(--fs-md);
+ font-weight: 600;
+}
+
+.issueComments {
+ display: grid;
+ gap: var(--space-3);
+}
+
+.issueComment {
+ display: grid;
+ grid-template-columns: auto minmax(0, 1fr);
+ gap: var(--space-3);
+ padding: var(--space-4);
+ border-radius: var(--radius-sm);
+ background: var(--bg-card);
+}
+
+.issueReply {
+ margin-left: var(--space-6);
+ background: var(--bg-raised);
+}
+
+.issueComment header {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: baseline;
+ gap: var(--space-2);
+ margin-bottom: var(--space-1);
+ font-size: var(--fs-sm);
+}
+
+.issueComment header a {
+ color: var(--mw-text);
+ font-weight: 600;
+}
+
+.issueComment header span {
+ color: var(--text-dim);
+}
+
+.issueComment p {
+ margin: 0;
+ font-size: var(--fs-md);
+ line-height: 1.55;
+ white-space: pre-wrap;
+ overflow-wrap: anywhere;
+}
+
@media (max-width: 1000px) {
.codeLayout {
grid-template-columns: minmax(0, 1fr);
@@ -528,6 +693,10 @@ a.rowMessage:hover {
}
@media (max-width: 620px) {
+ .issueReply {
+ margin-left: var(--space-4);
+ }
+
.header {
align-items: flex-start;
flex-direction: column;
diff --git a/src/community/pages/project/IssueList.jsx b/src/community/pages/project/IssueList.jsx
new file mode 100644
index 00000000000..e73aee8c40b
--- /dev/null
+++ b/src/community/pages/project/IssueList.jsx
@@ -0,0 +1,244 @@
+/* eslint-disable max-len */
+import PropTypes from 'prop-types';
+import React, {useCallback, useEffect, useState} from 'react';
+import {Link} from 'react-router-dom';
+import {CircleCheck, CircleDot, MessageSquare, Plus, Search} from 'lucide-react';
+import {useCommunityIntl as useCommunityText} from '../../i18n.jsx';
+import api from '../../api';
+import {timeAgo} from '../../format';
+import useLatest from '../../use-latest.js';
+import {useUser} from '../../UserContext.jsx';
+import {commentIssueNumber, issueThreads, issueTitle} from '../../comment-issues.js';
+import Avatar from '../../components/Avatar.jsx';
+import UserLink from '../../components/UserLink.jsx';
+import Button from '../../components/ui/Button.jsx';
+import EmptyState from '../../components/ui/EmptyState.jsx';
+import StatusMessage from '../../components/ui/StatusMessage.jsx';
+import projectStyles from '../Project.module.css';
+import styles from '../ProjectCode.module.css';
+
+const NewIssue = ({id, onCreated, onCancel}) => {
+ const {text: communityText} = useCommunityText();
+ const [text, setText] = useState('');
+ const [busy, setBusy] = useState(false);
+ const [error, setError] = useState('');
+ const [posted, setPosted] = useState(null);
+ const submit = async event => {
+ event.preventDefault();
+ const content = text.trim();
+ if ((!content && !posted) || busy) return;
+ setBusy(true);
+ setError('');
+ let comment = posted;
+ try {
+ if (!comment) {
+ const created = await api.addComment(id, content, '');
+ comment = created && created.comment ? created.comment : null;
+ if (!comment || !comment.id) throw new Error(communityText('Could not open the issue.'));
+ setPosted(comment);
+ }
+ const tracked = await api.setCommentIssue(id, comment.id, 'open');
+ onCreated(tracked && tracked.comment ? tracked.comment : comment);
+ } catch (e) {
+ setError(comment ?
+ communityText('Your comment was posted but could not be tracked as an issue. Try again to track it.') :
+ (e.message || communityText('Could not open the issue.')));
+ setBusy(false);
+ }
+ };
+ return (
+
+ );
+};
+
+NewIssue.propTypes = {
+ id: PropTypes.string.isRequired,
+ onCancel: PropTypes.func.isRequired,
+ onCreated: PropTypes.func.isRequired
+};
+
+const IssueList = ({id, baseUrl, project, onCounts}) => {
+ const {text: communityText, rich: communityRich} = useCommunityText();
+ const {user} = useUser();
+ const [state, setState] = useState('open');
+ const [query, setQuery] = useState('');
+ const [data, setData] = useState(null);
+ const [loadError, setLoadError] = useState(false);
+ const [composing, setComposing] = useState(false);
+ const beginLoad = useLatest();
+
+ const reload = useCallback(() => {
+ const fresh = beginLoad();
+ setData(null);
+ setLoadError(false);
+ api.getComments(id, {all: true, issue: state})
+ .then(fresh(result => {
+ setData({threads: issueThreads(result.comments), counts: result.issueCounts || null});
+ if (onCounts && result.issueCounts) onCounts(result.issueCounts);
+ }))
+ .catch(fresh(() => setLoadError(true)));
+ }, [beginLoad, id, onCounts, state]);
+
+ useEffect(() => {
+ reload();
+ }, [reload]);
+
+ const canOpen = Boolean(user) && !project.issuesOff && !project.commentsOff;
+ const counts = (data && data.counts) || {open: 0, done: 0};
+ const needle = query.trim().toLowerCase();
+ const threads = data ? data.threads.filter(({root}) => !needle ||
+ `${root.content} ${root.author} ${commentIssueNumber(root)}`.toLowerCase().includes(needle)) : [];
+ const issueUrl = number => `${baseUrl}/code/issues/${number}`;
+
+ return (
+
+
+
+
+ setQuery(event.target.value)}
+ />
+
+ {canOpen && !composing ? (
+
setComposing(true)}
+ > {communityText('New issue')}
+ ) : null}
+
+ {composing ? (
+ setComposing(false)}
+ onCreated={() => {
+ setComposing(false);
+ if (state === 'open') reload();
+ else setState('open');
+ }}
+ />
+ ) : null}
+
+
+ setState('open')}
+ > {counts.open === 1 ? communityText('1 open issue') : communityText('{value1} open issues', {value1: counts.open})}
+ setState('done')}
+ > {counts.done === 1 ? communityText('1 finished issue') : communityText('{value1} finished issues', {value1: counts.done})}
+
+ {loadError ? (
+
{communityText('Could not load issues.')}
+ ) : !data ? (
+
{communityText('Loading issues…')}
+ ) : threads.length ? threads.map(({root, replies}) => {
+ const number = commentIssueNumber(root);
+ const latest = replies[replies.length - 1];
+ return (
+
+ {state === 'open' ?
+ :
+ }
+
+
{issueTitle(root.content) || communityText('Issue #{value1}', {value1: number})}
+
+
+ {communityRich('#{value1} opened {value2} by {value3}', {
+ value1: number,
+ value2: timeAgo(root.created),
+ value3: {root.author}
+ })}
+
+ {latest ? (
+
+
{latest.author}
+
{issueTitle(latest.content, 160)}
+
+ ) : null}
+
+ {replies.length}
+
+ );
+ }) : (
+
+ {project.issuesOff ?
+ communityText('The creator has turned off issues for this project.') :
+ communityText('Any comment can become an issue. Its author or the project team can track it from the comment menu.')}
+
+ )}
+
+
+ );
+};
+
+IssueList.propTypes = {
+ baseUrl: PropTypes.string.isRequired,
+ id: PropTypes.string.isRequired,
+ onCounts: PropTypes.func,
+ project: PropTypes.shape({
+ commentsOff: PropTypes.bool,
+ issuesOff: PropTypes.bool
+ }).isRequired
+};
+
+export default IssueList;
diff --git a/src/community/pages/project/IssueThread.jsx b/src/community/pages/project/IssueThread.jsx
new file mode 100644
index 00000000000..d604e9b59f8
--- /dev/null
+++ b/src/community/pages/project/IssueThread.jsx
@@ -0,0 +1,301 @@
+/* eslint-disable max-len */
+import PropTypes from 'prop-types';
+import React, {useCallback, useEffect, useState} from 'react';
+import {Link} from 'react-router-dom';
+import {ArrowLeft, CircleCheck, CircleDot, MessageSquare, RotateCcw, SearchX} from 'lucide-react';
+import {useCommunityIntl as useCommunityText} from '../../i18n.jsx';
+import api from '../../api';
+import {timeAgo} from '../../format';
+import useLatest from '../../use-latest.js';
+import {useUser} from '../../UserContext.jsx';
+import projectRealtime from '../../project-realtime.js';
+import {
+ canChangeIssue, commentIssueNumber, commentIssueState, issueThreads, issueTitle, mergeCommentUpdate
+} from '../../comment-issues.js';
+import Avatar from '../../components/Avatar.jsx';
+import RichText from '../../components/RichText.jsx';
+import UserLink from '../../components/UserLink.jsx';
+import Button from '../../components/ui/Button.jsx';
+import EmptyState from '../../components/ui/EmptyState.jsx';
+import StatusMessage from '../../components/ui/StatusMessage.jsx';
+import styles from '../ProjectCode.module.css';
+
+const ThreadComment = ({comment, first}) => (
+
+);
+
+ThreadComment.propTypes = {
+ comment: PropTypes.shape({
+ author: PropTypes.string,
+ content: PropTypes.string,
+ created: PropTypes.number,
+ id: PropTypes.string
+ }).isRequired,
+ first: PropTypes.bool
+};
+
+const IssueThread = ({id, baseUrl, number, project, onChange}) => {
+ const {text: communityText} = useCommunityText();
+ const {user} = useUser();
+ const [thread, setThread] = useState(null);
+ const [missing, setMissing] = useState(false);
+ const [loadError, setLoadError] = useState(false);
+ const [reply, setReply] = useState('');
+ const [busy, setBusy] = useState('');
+ const [actionError, setActionError] = useState('');
+ const beginLoad = useLatest();
+
+ const load = useCallback(() => {
+ const fresh = beginLoad();
+ setLoadError(false);
+ setMissing(false);
+ api.getComments(id, {all: true, issue: 'any', number})
+ .then(fresh(result => {
+ const found = issueThreads(result.comments).find(item => commentIssueNumber(item.root) === number);
+ setThread(found || null);
+ setMissing(!found);
+ }))
+ .catch(fresh(() => setLoadError(true)));
+ }, [beginLoad, id, number]);
+
+ useEffect(() => {
+ setThread(null);
+ load();
+ }, [load]);
+
+ useEffect(() => {
+ if (thread && !commentIssueState(thread.root)) {
+ setThread(null);
+ setMissing(true);
+ }
+ }, [thread]);
+
+ const rootId = thread ? thread.root.id : '';
+ useEffect(() => {
+ if (!rootId) return;
+ const key = new URLSearchParams(window.location.search).get('k') || '';
+ return projectRealtime.subscribe(id, event => {
+ if (event.type === 'comment_created' && event.comment && event.comment.parent === rootId) {
+ setThread(current => (current && !current.replies.some(item => item.id === event.comment.id) ?
+ {...current, replies: [...current.replies, event.comment]} : current));
+ return;
+ }
+ if (event.type === 'comment_edited' && event.comment) {
+ setThread(current => {
+ if (!current) return current;
+ if (current.root.id === event.comment.id) {
+ return {...current, root: mergeCommentUpdate(current.root, event.comment)};
+ }
+ return {
+ ...current,
+ replies: current.replies.map(item => (item.id === event.comment.id ?
+ mergeCommentUpdate(item, event.comment) : item))
+ };
+ });
+ return;
+ }
+ if (event.type === 'comment_deleted' && event.commentId) {
+ if (event.commentId === rootId) {
+ setThread(null);
+ setMissing(true);
+ return;
+ }
+ setThread(current => (current ?
+ {...current, replies: current.replies.filter(item => item.id !== event.commentId)} : current));
+ }
+ }, key);
+ }, [id, rootId]);
+
+ const changeState = async state => {
+ if (!thread || busy) return;
+ setBusy(state);
+ setActionError('');
+ try {
+ const result = await api.setCommentIssue(id, thread.root.id, state);
+ if (result && result.comment) {
+ setThread(current => (current ? {...current, root: mergeCommentUpdate(current.root, result.comment)} : current));
+ }
+ if (onChange) onChange();
+ } catch (e) {
+ setActionError(e.message || communityText('Could not update the issue.'));
+ } finally {
+ setBusy('');
+ }
+ };
+
+ const sendReply = async event => {
+ event.preventDefault();
+ const content = reply.trim();
+ if (!thread || !content || busy) return;
+ setBusy('reply');
+ setActionError('');
+ try {
+ const created = await api.addComment(id, content, thread.root.id);
+ const comment = created && created.comment;
+ if (comment) {
+ setThread(current => (current && !current.replies.some(item => item.id === comment.id) ?
+ {...current, replies: [...current.replies, comment]} : current));
+ }
+ setReply('');
+ } catch (e) {
+ setActionError(e.message || communityText('Could not post reply.'));
+ } finally {
+ setBusy('');
+ }
+ };
+
+ const backLink = (
+
{communityText('All issues')}
+ );
+
+ if (loadError) {
+ return (
+
+ {backLink}
+ {communityText('Could not load this issue.')}
+
+ );
+ }
+ if (missing) {
+ return (
+
+ {backLink}
+ {communityText('It may have been deleted or turned back into a plain comment.')}
+
+ );
+ }
+ if (!thread) return
{communityText('Loading issue…')} ;
+
+ const {root, replies} = thread;
+ const state = commentIssueState(root);
+ const canChange = canChangeIssue(root, user, project.isOwner) && !project.issuesOff;
+ const canReply = Boolean(user) && !project.commentsOff;
+ const title = issueTitle(root.content) || communityText('Issue #{value1}', {value1: number});
+
+ return (
+
+ {backLink}
+
+ {title} {`#${number}`}
+
+
+ {state === 'done' ? : }
+ {state === 'done' ? communityText('Done') : communityText('Open')}
+
+
+ {state === 'done' && root.issue.closedBy ?
+ communityText('{value1} marked this done {value2}', {
+ value1: root.issue.closedBy,
+ value2: timeAgo(root.issue.closedAt)
+ }) :
+ communityText('{value1} opened this {value2}', {value1: root.author, value2: timeAgo(root.created)})}
+
+ {replies.length === 1 ?
+ communityText('1 reply') : communityText('{value1} replies', {value1: replies.length})}
+
+
+
+
+ {replies.map(item => (
+
+ ))}
+
+ {actionError ? {actionError} : null}
+ {canReply || canChange ? (
+
+ {canReply ? (
+ setReply(event.target.value)}
+ />
+ ) : null}
+
+ {canChange && state === 'open' ? (
+ changeState('done')}
+ > {communityText('Mark as done')}
+ ) : null}
+ {canChange && state === 'done' ? (
+ changeState('open')}
+ > {communityText('Reopen issue')}
+ ) : null}
+ {canReply ? (
+ {communityText('Reply')}
+ ) : null}
+
+
+ ) : null}
+ {communityText('See it with the other comments')}
+
+ );
+};
+
+IssueThread.propTypes = {
+ baseUrl: PropTypes.string.isRequired,
+ id: PropTypes.string.isRequired,
+ number: PropTypes.number.isRequired,
+ onChange: PropTypes.func,
+ project: PropTypes.shape({
+ commentsOff: PropTypes.bool,
+ isOwner: PropTypes.bool,
+ issuesOff: PropTypes.bool
+ }).isRequired
+};
+
+export default IssueThread;
diff --git a/src/community/pages/project/ProjectActivity.jsx b/src/community/pages/project/ProjectActivity.jsx
index cc5c9d4fec9..c41a70c8a72 100644
--- a/src/community/pages/project/ProjectActivity.jsx
+++ b/src/community/pages/project/ProjectActivity.jsx
@@ -73,6 +73,11 @@ const ProjectActivity = ({
donationRecipient={project.owner}
canModerate={project.isOwner}
canPin={project.isOwner}
+ issues={{
+ canTriage: Boolean(project.isOwner),
+ enabled: !project.issuesOff,
+ href: canViewProjectSource(project) ? number => `${baseProjectUrl}/code/issues/${number}` : null
+ }}
disabled={Boolean(project.commentsOff)}
disabledReason={communityText('Comments are turned off.')}
reportContext={`project ${id}`}
diff --git a/src/community/translations/_sources.json b/src/community/translations/_sources.json
index 52648691925..a1888a4b41e 100644
--- a/src/community/translations/_sources.json
+++ b/src/community/translations/_sources.json
@@ -310,8 +310,8 @@
"src/community/pages/Admin.jsx:33",
"src/community/pages/ClassroomSchool.jsx:230",
"src/community/pages/ManageProject.jsx:72",
- "src/community/pages/ManageProject.jsx:778",
- "src/community/pages/ManageProject.jsx:813",
+ "src/community/pages/ManageProject.jsx:781",
+ "src/community/pages/ManageProject.jsx:816",
"src/community/pages/Profile.jsx:906",
"src/community/pages/Wallet.jsx:232",
"src/community/pages/admin/StatsOverview.jsx:155",
@@ -399,8 +399,8 @@
],
"Comment": [
"src/community/components/ChangesView.jsx:34",
- "src/community/components/CommentThread.jsx:27",
- "src/community/components/CommentThread.jsx:85",
+ "src/community/components/CommentThread.jsx:31",
+ "src/community/components/CommentThread.jsx:89",
"src/community/pages/Bounty.jsx:168",
"src/community/pages/PullRequest.jsx:624",
"src/community/pages/admin/labels.js:11"
@@ -740,7 +740,7 @@
],
"Save": [
"src/community/components/CollectionSaveModal.jsx:166",
- "src/community/components/CommentThread.jsx:228",
+ "src/community/components/CommentThread.jsx:277",
"src/community/components/ProjectInfoPanel.jsx:430",
"src/community/components/SocialPost.jsx:452",
"src/community/components/SocialPost.jsx:536",
@@ -752,8 +752,8 @@
],
"Saving…": [
"src/community/components/CollectionSaveModal.jsx:167",
- "src/community/components/CommentThread.jsx:224",
- "src/community/components/CommentThread.jsx:240",
+ "src/community/components/CommentThread.jsx:273",
+ "src/community/components/CommentThread.jsx:289",
"src/community/components/NewsItem.jsx:281",
"src/community/components/ProfileBadges.jsx:204",
"src/community/components/ProjectInfoPanel.jsx:428",
@@ -763,17 +763,19 @@
"src/community/pages/Classroom.jsx:228",
"src/community/pages/ClassroomAssignment.jsx:63",
"src/community/pages/Commit.jsx:525",
- "src/community/pages/ManageProject.jsx:610",
- "src/community/pages/ManageProject.jsx:666",
- "src/community/pages/ManageProject.jsx:741",
- "src/community/pages/ManageProject.jsx:762",
- "src/community/pages/ManageProject.jsx:960",
+ "src/community/pages/ManageProject.jsx:612",
+ "src/community/pages/ManageProject.jsx:669",
+ "src/community/pages/ManageProject.jsx:744",
+ "src/community/pages/ManageProject.jsx:765",
+ "src/community/pages/ManageProject.jsx:963",
"src/community/pages/ManageSpace.jsx:656",
"src/community/pages/ManageSpace.jsx:669",
"src/community/pages/ManageSpace.jsx:718",
"src/community/pages/News.jsx:299",
"src/community/pages/Theme.jsx:225",
"src/community/pages/Theme.jsx:258",
+ "src/community/pages/project/IssueThread.jsx:256",
+ "src/community/pages/project/IssueThread.jsx:265",
"src/community/pages/project/ProjectStage.jsx:95",
"src/community/pages/project/ReviewPanel.jsx:172"
],
@@ -803,7 +805,7 @@
"src/community/components/ProjectBranches.jsx:255",
"src/community/components/classroom/ClassGroups.jsx:96",
"src/community/pages/Classroom.jsx:349",
- "src/community/pages/ManageProject.jsx:674",
+ "src/community/pages/ManageProject.jsx:677",
"src/community/pages/Spaces.jsx:300"
],
"Create and save": [
@@ -816,73 +818,97 @@
"src/community/components/CollectionSaveModal.jsx:239"
],
"Bug report": [
- "src/community/components/CommentThread.jsx:28",
+ "src/community/components/CommentThread.jsx:32",
"src/community/pages/Roadmap.jsx:493"
],
"Suggestion": [
- "src/community/components/CommentThread.jsx:29"
+ "src/community/components/CommentThread.jsx:33"
],
"Question": [
- "src/community/components/CommentThread.jsx:30"
+ "src/community/components/CommentThread.jsx:34"
+ ],
+ "Done #{value1}": [
+ "src/community/components/CommentThread.jsx:102"
+ ],
+ "Issue #{value1}": [
+ "src/community/components/CommentThread.jsx:103",
+ "src/community/pages/project/IssueList.jsx:188",
+ "src/community/pages/project/IssueThread.jsx:197"
],
"Donation attached to this comment": [
- "src/community/components/CommentThread.jsx:130"
+ "src/community/components/CommentThread.jsx:149"
],
"{value1} credits": [
- "src/community/components/CommentThread.jsx:132",
+ "src/community/components/CommentThread.jsx:151",
"src/community/components/ProjectDonationAnalytics.jsx:34",
"src/community/components/ProjectDonationAnalytics.jsx:49",
"src/community/components/ProjectDonationAnalytics.jsx:70",
- "src/community/pages/ManageProject.jsx:716",
+ "src/community/pages/ManageProject.jsx:719",
"src/community/pages/project/ProjectBounties.jsx:66"
],
"Edited": [
- "src/community/components/CommentThread.jsx:141",
- "src/community/components/CommentThread.jsx:143"
+ "src/community/components/CommentThread.jsx:160",
+ "src/community/components/CommentThread.jsx:162"
],
"Pinned comment": [
- "src/community/components/CommentThread.jsx:147"
+ "src/community/components/CommentThread.jsx:169"
],
"Pinned": [
- "src/community/components/CommentThread.jsx:149",
+ "src/community/components/CommentThread.jsx:171",
"src/community/components/SocialPost.jsx:314"
],
"Reply": [
- "src/community/components/CommentThread.jsx:157",
- "src/community/components/CommentThread.jsx:158",
- "src/community/components/CommentThread.jsx:256",
+ "src/community/components/CommentThread.jsx:179",
+ "src/community/components/CommentThread.jsx:180",
+ "src/community/components/CommentThread.jsx:305",
"src/community/components/PostThread.jsx:160",
"src/community/components/SocialPost.jsx:491",
- "src/community/components/SocialPost.jsx:561"
+ "src/community/components/SocialPost.jsx:561",
+ "src/community/pages/project/IssueThread.jsx:276"
],
"Comment actions": [
- "src/community/components/CommentThread.jsx:170",
- "src/community/components/CommentThread.jsx:171"
+ "src/community/components/CommentThread.jsx:192",
+ "src/community/components/CommentThread.jsx:193"
],
"Edit comment": [
- "src/community/components/CommentThread.jsx:184",
- "src/community/components/CommentThread.jsx:216"
+ "src/community/components/CommentThread.jsx:206",
+ "src/community/components/CommentThread.jsx:265"
],
"Unpin": [
- "src/community/components/CommentThread.jsx:192",
+ "src/community/components/CommentThread.jsx:214",
"src/community/components/SocialPost.jsx:382"
],
"Pin to top": [
- "src/community/components/CommentThread.jsx:192"
+ "src/community/components/CommentThread.jsx:214"
+ ],
+ "Track as issue": [
+ "src/community/components/CommentThread.jsx:221",
+ "src/community/pages/project/IssueList.jsx:74"
+ ],
+ "Mark as done": [
+ "src/community/components/CommentThread.jsx:227",
+ "src/community/pages/project/IssueThread.jsx:258"
+ ],
+ "Reopen issue": [
+ "src/community/components/CommentThread.jsx:233",
+ "src/community/pages/project/IssueThread.jsx:267"
+ ],
+ "Stop tracking as issue": [
+ "src/community/components/CommentThread.jsx:241"
],
"Report comment": [
- "src/community/components/CommentThread.jsx:198",
+ "src/community/components/CommentThread.jsx:247",
"src/community/pages/Bounty.jsx:162"
],
"Delete comment": [
- "src/community/components/CommentThread.jsx:203",
- "src/community/components/CommentThread.jsx:1090",
+ "src/community/components/CommentThread.jsx:252",
+ "src/community/components/CommentThread.jsx:1173",
"src/community/pages/Bounty.jsx:162",
"src/community/pages/PullRequest.jsx:597"
],
"Cancel": [
- "src/community/components/CommentThread.jsx:220",
- "src/community/components/CommentThread.jsx:316",
+ "src/community/components/CommentThread.jsx:269",
+ "src/community/components/CommentThread.jsx:365",
"src/community/components/GameMarketplaceModal.jsx:227",
"src/community/components/ProjectInfoPanel.jsx:422",
"src/community/components/ReportModal.jsx:108",
@@ -897,110 +923,115 @@
"src/community/components/ui/ConfirmModal.jsx:22",
"src/community/pages/Classroom.jsx:93",
"src/community/pages/Classroom.jsx:348",
- "src/community/pages/ManageProject.jsx:1040",
+ "src/community/pages/ManageProject.jsx:1043",
"src/community/pages/ManageSpace.jsx:762",
"src/community/pages/MyStuff.jsx:1298",
"src/community/pages/News.jsx:293",
"src/community/pages/Roadmap.jsx:501",
"src/community/pages/Spaces.jsx:301",
"src/community/pages/Theme.jsx:257",
- "src/community/pages/project/ForkSetupModal.jsx:68"
+ "src/community/pages/project/ForkSetupModal.jsx:68",
+ "src/community/pages/project/IssueList.jsx:67"
],
"Post": [
- "src/community/components/CommentThread.jsx:256",
+ "src/community/components/CommentThread.jsx:305",
"src/community/components/PostComposer.jsx:308",
"src/community/pages/News.jsx:325",
"src/community/pages/Post.jsx:73"
],
"Sign in to post": [
- "src/community/components/CommentThread.jsx:257"
+ "src/community/components/CommentThread.jsx:306"
],
"Comment type": [
- "src/community/components/CommentThread.jsx:288"
+ "src/community/components/CommentThread.jsx:337"
],
"Donate credits to {value1}": [
- "src/community/components/CommentThread.jsx:296"
+ "src/community/components/CommentThread.jsx:345"
],
"Donation": [
- "src/community/components/CommentThread.jsx:306"
+ "src/community/components/CommentThread.jsx:355"
],
"Donation to {value1} in credits": [
- "src/community/components/CommentThread.jsx:307"
+ "src/community/components/CommentThread.jsx:356"
],
"Enter a donation between 0.01 and 100000 credits.": [
- "src/community/components/CommentThread.jsx:626"
+ "src/community/components/CommentThread.jsx:676"
],
"Payment cancelled.": [
- "src/community/components/CommentThread.jsx:657",
+ "src/community/components/CommentThread.jsx:707",
"src/community/components/GameMarketplaceModal.jsx:157"
],
"Could not post comment.": [
- "src/community/components/CommentThread.jsx:658"
+ "src/community/components/CommentThread.jsx:708"
],
"Could not delete comment.": [
- "src/community/components/CommentThread.jsx:683"
+ "src/community/components/CommentThread.jsx:733"
],
"Could not edit comment.": [
- "src/community/components/CommentThread.jsx:711"
+ "src/community/components/CommentThread.jsx:761"
],
"Could not react.": [
- "src/community/components/CommentThread.jsx:741",
+ "src/community/components/CommentThread.jsx:791",
"src/community/components/NewsItem.jsx:51"
],
"Could not pin comment.": [
- "src/community/components/CommentThread.jsx:766"
+ "src/community/components/CommentThread.jsx:816"
+ ],
+ "Could not update the issue.": [
+ "src/community/components/CommentThread.jsx:842",
+ "src/community/pages/project/IssueThread.jsx:135"
],
"Comments are turned off.": [
- "src/community/components/CommentThread.jsx:833",
- "src/community/pages/project/ProjectActivity.jsx:77"
+ "src/community/components/CommentThread.jsx:911",
+ "src/community/pages/project/ProjectActivity.jsx:82"
],
"Add a comment": [
- "src/community/components/CommentThread.jsx:844",
- "src/community/components/CommentThread.jsx:845"
+ "src/community/components/CommentThread.jsx:922",
+ "src/community/components/CommentThread.jsx:923"
],
"Search comments": [
- "src/community/components/CommentThread.jsx:865",
- "src/community/components/CommentThread.jsx:866"
+ "src/community/components/CommentThread.jsx:943",
+ "src/community/components/CommentThread.jsx:944"
],
"All types": [
- "src/community/components/CommentThread.jsx:876",
+ "src/community/components/CommentThread.jsx:954",
"src/community/pages/Roadmap.jsx:509"
],
"Filter comments by type": [
- "src/community/components/CommentThread.jsx:881"
+ "src/community/components/CommentThread.jsx:959"
],
"Newest": [
- "src/community/components/CommentThread.jsx:891",
+ "src/community/components/CommentThread.jsx:969",
"src/community/pages/Themes.jsx:23",
"src/community/pages/admin/UserManager.jsx:113"
],
"Highest donations": [
- "src/community/components/CommentThread.jsx:892"
+ "src/community/components/CommentThread.jsx:970"
],
"Sort comments": [
- "src/community/components/CommentThread.jsx:896"
+ "src/community/components/CommentThread.jsx:974"
],
"Show 1 more reply": [
- "src/community/components/CommentThread.jsx:995"
+ "src/community/components/CommentThread.jsx:1078"
],
"Show {value1} more replies": [
- "src/community/components/CommentThread.jsx:996"
+ "src/community/components/CommentThread.jsx:1079"
],
"Hide replies": [
- "src/community/components/CommentThread.jsx:1003"
+ "src/community/components/CommentThread.jsx:1086"
],
"Reply to {value1}": [
- "src/community/components/CommentThread.jsx:1016"
+ "src/community/components/CommentThread.jsx:1099"
],
"Write a reply": [
- "src/community/components/CommentThread.jsx:1017"
+ "src/community/components/CommentThread.jsx:1100"
],
"Show {value1} more comments": [
- "src/community/components/CommentThread.jsx:1031",
- "src/community/components/CommentThread.jsx:1043"
+ "src/community/components/CommentThread.jsx:1114",
+ "src/community/components/CommentThread.jsx:1126"
],
"Loading…": [
- "src/community/components/CommentThread.jsx:1042",
+ "src/community/components/CommentThread.jsx:1125",
"src/community/components/ListSkeleton.jsx:18",
"src/community/components/MyStuffLibrary.jsx:104",
"src/community/components/MyStuffProjects.jsx:390",
@@ -1012,7 +1043,7 @@
"src/community/pages/Following.jsx:67",
"src/community/pages/Profile.jsx:446",
"src/community/pages/Profile.jsx:623",
- "src/community/pages/Project.jsx:625",
+ "src/community/pages/Project.jsx:627",
"src/community/pages/RemixTree.jsx:248",
"src/community/pages/Search.jsx:213",
"src/community/pages/Spaces.jsx:344",
@@ -1020,51 +1051,51 @@
"src/community/pages/admin/ExtensionManager.jsx:146"
],
"Could not load more comments. Try again.": [
- "src/community/components/CommentThread.jsx:1050"
+ "src/community/components/CommentThread.jsx:1133"
],
"Loading comments…": [
- "src/community/components/CommentThread.jsx:1057"
+ "src/community/components/CommentThread.jsx:1140"
],
"Comments could not be loaded right now.": [
- "src/community/components/CommentThread.jsx:1061"
+ "src/community/components/CommentThread.jsx:1144"
],
"No matching comments": [
- "src/community/components/CommentThread.jsx:1065"
+ "src/community/components/CommentThread.jsx:1148"
],
"No comments match those filters.": [
- "src/community/components/CommentThread.jsx:1066"
+ "src/community/components/CommentThread.jsx:1149"
],
"No comments yet": [
- "src/community/components/CommentThread.jsx:1070",
+ "src/community/components/CommentThread.jsx:1153",
"src/community/pages/Bounty.jsx:165"
],
"Be the first to leave a comment.": [
- "src/community/components/CommentThread.jsx:1071"
+ "src/community/components/CommentThread.jsx:1154"
],
"Delete comment?": [
- "src/community/components/CommentThread.jsx:1089"
+ "src/community/components/CommentThread.jsx:1172"
],
"Deleting…": [
- "src/community/components/CommentThread.jsx:1092",
+ "src/community/components/CommentThread.jsx:1175",
"src/community/components/NewsItem.jsx:132",
"src/community/pages/ManageSpace.jsx:786",
"src/community/pages/MyStuff.jsx:1325",
"src/community/pages/MyStuff.jsx:1341",
- "src/community/pages/Project.jsx:730",
+ "src/community/pages/Project.jsx:738",
"src/community/pages/Settings.jsx:1003",
"src/community/pages/Settings.jsx:1018",
"src/community/pages/Theme.jsx:239",
"src/community/pages/project/ReviewPanel.jsx:221"
],
"This comment will be deleted permanently.": [
- "src/community/components/CommentThread.jsx:1099"
+ "src/community/components/CommentThread.jsx:1182"
],
"This comment and its replies will be deleted permanently.": [
- "src/community/components/CommentThread.jsx:1100"
+ "src/community/components/CommentThread.jsx:1183"
],
"Code": [
"src/community/components/DiffView.jsx:19",
- "src/community/pages/ProjectCode.jsx:207"
+ "src/community/pages/ProjectCode.jsx:221"
],
"Costumes": [
"src/community/components/DiffView.jsx:19"
@@ -1227,8 +1258,8 @@
],
"Bounties": [
"src/community/components/ExploreNav.jsx:22",
- "src/community/pages/ManageProject.jsx:858",
- "src/community/pages/ManageProject.jsx:972",
+ "src/community/pages/ManageProject.jsx:861",
+ "src/community/pages/ManageProject.jsx:975",
"src/community/pages/project/ProjectActivity.jsx:39",
"src/community/pages/project/ProjectBounties.jsx:47"
],
@@ -1246,7 +1277,7 @@
"src/community/components/MyStuffProjects.jsx:99",
"src/community/pages/ClassroomStudent.jsx:125",
"src/community/pages/ManageProject.jsx:68",
- "src/community/pages/ManageProject.jsx:587"
+ "src/community/pages/ManageProject.jsx:589"
],
"Play {value1}": [
"src/community/components/FeaturedProject.jsx:89",
@@ -1255,7 +1286,7 @@
"Loading project…": [
"src/community/components/FeaturedProject.jsx:102",
"src/community/pages/Bounties.jsx:116",
- "src/community/pages/ProjectCode.jsx:204",
+ "src/community/pages/ProjectCode.jsx:218",
"src/community/pages/project/ProjectStage.jsx:54"
],
"Play project": [
@@ -1319,7 +1350,7 @@
"Editor": [
"src/community/components/Footer.jsx:65",
"src/community/components/SharedProjects.jsx:18",
- "src/community/pages/ManageProject.jsx:909",
+ "src/community/pages/ManageProject.jsx:912",
"src/community/pages/Roadmap.jsx:497"
],
"My stuff": [
@@ -1329,7 +1360,7 @@
"src/community/components/NavBar.jsx:647",
"src/community/components/NavBar.jsx:741",
"src/community/components/NavBar.jsx:743",
- "src/community/pages/ManageProject.jsx:476",
+ "src/community/pages/ManageProject.jsx:478",
"src/community/pages/MyStuff.jsx:1262"
],
"Community": [
@@ -1776,21 +1807,21 @@
"src/community/components/MembershipPreviews.jsx:24",
"src/community/components/MyStuffOverview.jsx:105",
"src/community/pages/Leaderboard.jsx:34",
- "src/community/pages/ManageProject.jsx:516",
+ "src/community/pages/ManageProject.jsx:518",
"src/community/pages/admin/StatsOverview.jsx:309"
],
"Hearts": [
"src/community/components/MembershipPreviews.jsx:25",
"src/community/components/MyStuffOverview.jsx:55",
- "src/community/pages/ManageProject.jsx:521"
+ "src/community/pages/ManageProject.jsx:523"
],
"Library saves": [
"src/community/components/MembershipPreviews.jsx:26",
- "src/community/pages/ManageProject.jsx:526"
+ "src/community/pages/ManageProject.jsx:528"
],
"Total playtime": [
"src/community/components/MembershipPreviews.jsx:27",
- "src/community/pages/ManageProject.jsx:531"
+ "src/community/pages/ManageProject.jsx:533"
],
"Example project analytics showing views, hearts, saves, playtime, and CSV export": [
"src/community/components/MembershipPreviews.jsx:31"
@@ -1800,7 +1831,7 @@
],
"Export CSV": [
"src/community/components/MembershipPreviews.jsx:45",
- "src/community/pages/ManageProject.jsx:547"
+ "src/community/pages/ManageProject.jsx:549"
],
"Project branding settings with an accent colour, a tagline, and a custom URL": [
"src/community/components/MembershipPreviews.jsx:61"
@@ -1815,11 +1846,11 @@
],
"Brand colour": [
"src/community/components/MembershipPreviews.jsx:72",
- "src/community/pages/ManageProject.jsx:621"
+ "src/community/pages/ManageProject.jsx:623"
],
"Tagline": [
"src/community/components/MembershipPreviews.jsx:86",
- "src/community/pages/ManageProject.jsx:625"
+ "src/community/pages/ManageProject.jsx:627"
],
"Custom URL": [
"src/community/components/MembershipPreviews.jsx:90"
@@ -1963,7 +1994,7 @@
],
"Views over the last 2 weeks": [
"src/community/components/MyStuffOverview.jsx:69",
- "src/community/pages/ManageProject.jsx:560"
+ "src/community/pages/ManageProject.jsx:562"
],
"Could not load your views.": [
"src/community/components/MyStuffOverview.jsx:108"
@@ -2131,8 +2162,9 @@
"src/community/components/MyStuffProjects.jsx:230",
"src/community/components/ReportModal.jsx:105",
"src/community/components/classroom/CredentialsResult.jsx:48",
- "src/community/pages/ManageProject.jsx:843",
- "src/community/pages/Roadmap.jsx:34"
+ "src/community/pages/ManageProject.jsx:846",
+ "src/community/pages/Roadmap.jsx:34",
+ "src/community/pages/project/IssueThread.jsx:207"
],
"Search your projects": [
"src/community/components/MyStuffProjects.jsx:235"
@@ -2359,7 +2391,7 @@
"src/community/components/classroom/ClassSettings.jsx:266",
"src/community/pages/ClassroomSchool.jsx:96",
"src/community/pages/Commit.jsx:504",
- "src/community/pages/ManageProject.jsx:939",
+ "src/community/pages/ManageProject.jsx:942",
"src/community/pages/ManageSpace.jsx:707"
],
"Create a theme": [
@@ -2645,8 +2677,8 @@
"Updated {value1}": [
"src/community/components/NewsItem.jsx:205",
"src/community/pages/NewsPost.jsx:136",
- "src/community/pages/Project.jsx:830",
- "src/community/pages/ProjectCode.jsx:105"
+ "src/community/pages/Project.jsx:838",
+ "src/community/pages/ProjectCode.jsx:109"
],
"Post analytics": [
"src/community/components/NewsItem.jsx:214"
@@ -3081,7 +3113,7 @@
],
"Branches": [
"src/community/components/ProjectBranches.jsx:232",
- "src/community/pages/ProjectCode.jsx:209",
+ "src/community/pages/ProjectCode.jsx:224",
"src/community/pages/project/VersionControlPanel.jsx:23"
],
"Each branch points to its latest saved project version.": [
@@ -3167,7 +3199,7 @@
"Open {value1}": [
"src/community/components/ProjectCard.jsx:22",
"src/community/pages/Challenge.jsx:430",
- "src/community/pages/ManageProject.jsx:603",
+ "src/community/pages/ManageProject.jsx:605",
"src/community/pages/Profile.jsx:569"
],
"Views in the last seven days": [
@@ -3195,7 +3227,7 @@
],
"Remix": [
"src/community/components/ProjectCard.jsx:97",
- "src/community/pages/ProjectCode.jsx:235",
+ "src/community/pages/ProjectCode.jsx:254",
"src/community/pages/project/ProjectBounties.jsx:54",
"src/community/pages/project/ProjectHeader.jsx:127",
"src/community/pages/project/ProjectHeader.jsx:254"
@@ -3287,7 +3319,7 @@
],
"Loading project files…": [
"src/community/components/ProjectFiles.jsx:466",
- "src/community/pages/ProjectCode.jsx:286",
+ "src/community/pages/ProjectCode.jsx:305",
"src/community/pages/project/CodeBrowser.jsx:173"
],
"No files yet": [
@@ -3308,7 +3340,7 @@
"Details": [
"src/community/components/ProjectInfoPanel.jsx:138",
"src/community/pages/ManageSpace.jsx:33",
- "src/community/pages/ProjectCode.jsx:93"
+ "src/community/pages/ProjectCode.jsx:97"
],
"Project information": [
"src/community/components/ProjectInfoPanel.jsx:143"
@@ -3330,7 +3362,7 @@
"Instructions": [
"src/community/components/ProjectInfoPanel.jsx:172",
"src/community/components/classroom/AssignmentModal.jsx:95",
- "src/community/pages/ProjectCode.jsx:66"
+ "src/community/pages/ProjectCode.jsx:69"
],
"How do you play or use this project?": [
"src/community/components/ProjectInfoPanel.jsx:179"
@@ -3343,7 +3375,7 @@
],
"Creator notes": [
"src/community/components/ProjectInfoPanel.jsx:192",
- "src/community/pages/ProjectCode.jsx:72"
+ "src/community/pages/ProjectCode.jsx:75"
],
"Development notes, known issues, or anything else worth sharing": [
"src/community/components/ProjectInfoPanel.jsx:199"
@@ -3360,8 +3392,8 @@
],
"Team": [
"src/community/components/ProjectInfoPanel.jsx:217",
- "src/community/pages/ManageProject.jsx:858",
- "src/community/pages/ManageProject.jsx:972"
+ "src/community/pages/ManageProject.jsx:861",
+ "src/community/pages/ManageProject.jsx:975"
],
"person": [
"src/community/components/ProjectInfoPanel.jsx:222"
@@ -3379,7 +3411,7 @@
"Contributor": [
"src/community/components/ProjectInfoPanel.jsx:230",
"src/community/components/SharedProjects.jsx:20",
- "src/community/pages/ManageProject.jsx:911"
+ "src/community/pages/ManageProject.jsx:914"
],
"name or MistWarp username": [
"src/community/components/ProjectInfoPanel.jsx:262"
@@ -3634,7 +3666,7 @@
],
"Maintainer": [
"src/community/components/SharedProjects.jsx:19",
- "src/community/pages/ManageProject.jsx:910"
+ "src/community/pages/ManageProject.jsx:913"
],
"Edit, publish, and manage changes.": [
"src/community/components/SharedProjects.jsx:19"
@@ -3644,7 +3676,7 @@
],
"Tester": [
"src/community/components/SharedProjects.jsx:21",
- "src/community/pages/ManageProject.jsx:912"
+ "src/community/pages/ManageProject.jsx:915"
],
"Open and test private drafts.": [
"src/community/components/SharedProjects.jsx:21"
@@ -4031,7 +4063,7 @@
],
"Title": [
"src/community/components/classroom/AssignmentModal.jsx:91",
- "src/community/pages/ManageProject.jsx:592",
+ "src/community/pages/ManageProject.jsx:594",
"src/community/pages/Roadmap.jsx:494"
],
"Due date (optional)": [
@@ -4058,7 +4090,7 @@
],
"Save changes": [
"src/community/components/classroom/AssignmentModal.jsx:131",
- "src/community/pages/ManageProject.jsx:613",
+ "src/community/pages/ManageProject.jsx:615",
"src/community/pages/ManageSpace.jsx:656",
"src/community/pages/News.jsx:300",
"src/community/pages/Theme.jsx:258"
@@ -4244,8 +4276,8 @@
"src/community/pages/ClassroomSchool.jsx:110",
"src/community/pages/Commit.jsx:516",
"src/community/pages/Commit.jsx:517",
- "src/community/pages/ManageProject.jsx:769",
- "src/community/pages/ManageProject.jsx:892",
+ "src/community/pages/ManageProject.jsx:772",
+ "src/community/pages/ManageProject.jsx:895",
"src/community/pages/ManageSpace.jsx:643",
"src/community/pages/Support.jsx:137"
],
@@ -4264,7 +4296,7 @@
"Transfer": [
"src/community/components/classroom/ClassSettings.jsx:293",
"src/community/components/classroom/ClassSettings.jsx:370",
- "src/community/pages/ManageProject.jsx:770",
+ "src/community/pages/ManageProject.jsx:773",
"src/community/pages/ManageSpace.jsx:643"
],
"Keep me as a co-teacher": [
@@ -4391,7 +4423,7 @@
"src/community/components/classroom/ClassStudents.jsx:223",
"src/community/pages/Admin.jsx:161",
"src/community/pages/Admin.jsx:177",
- "src/community/pages/ManageProject.jsx:888",
+ "src/community/pages/ManageProject.jsx:891",
"src/community/pages/admin/AdminsSection.jsx:18"
],
"Last sign-in": [
@@ -4532,10 +4564,11 @@
"src/community/components/classroom/PresentControls.jsx:147",
"src/community/components/classroom/StudentHome.jsx:64",
"src/community/components/classroom/StudentHome.jsx:221",
- "src/community/pages/ManageProject.jsx:841",
+ "src/community/pages/ManageProject.jsx:844",
"src/community/pages/PullRequest.jsx:555",
"src/community/pages/admin/ErrorManager.jsx:212",
- "src/community/pages/admin/UserDetailCard.jsx:66"
+ "src/community/pages/admin/UserDetailCard.jsx:66",
+ "src/community/pages/project/IssueThread.jsx:207"
],
"Stopping…": [
"src/community/components/classroom/PresentControls.jsx:149"
@@ -4638,7 +4671,8 @@
],
"Opening…": [
"src/community/components/classroom/StudentHome.jsx:102",
- "src/community/pages/Classroom.jsx:268"
+ "src/community/pages/Classroom.jsx:268",
+ "src/community/pages/project/IssueList.jsx:72"
],
"Start": [
"src/community/components/classroom/StudentHome.jsx:104"
@@ -5147,7 +5181,7 @@
],
"Errors": [
"src/community/pages/Admin.jsx:34",
- "src/community/pages/ManageProject.jsx:794",
+ "src/community/pages/ManageProject.jsx:797",
"src/community/pages/admin/ErrorManager.jsx:145",
"src/community/pages/admin/ErrorManager.jsx:171"
],
@@ -5295,7 +5329,7 @@
],
"Could not load bounties.": [
"src/community/pages/Bounties.jsx:64",
- "src/community/pages/ManageProject.jsx:1001"
+ "src/community/pages/ManageProject.jsx:1004"
],
"Funded improvements open across public MistWarp projects.": [
"src/community/pages/Bounties.jsx:98"
@@ -6181,8 +6215,8 @@
],
"Feedback": [
"src/community/pages/ClassroomAssignment.jsx:53",
- "src/community/pages/ManageProject.jsx:780",
- "src/community/pages/ManageProject.jsx:815"
+ "src/community/pages/ManageProject.jsx:783",
+ "src/community/pages/ManageProject.jsx:818"
],
"Grade": [
"src/community/pages/ClassroomAssignment.jsx:57"
@@ -6415,7 +6449,7 @@
],
"Role": [
"src/community/pages/ClassroomSchool.jsx:69",
- "src/community/pages/ManageProject.jsx:900"
+ "src/community/pages/ManageProject.jsx:903"
],
"Remove admin": [
"src/community/pages/ClassroomSchool.jsx:93"
@@ -6543,7 +6577,7 @@
],
"Back to project": [
"src/community/pages/Commit.jsx:354",
- "src/community/pages/ManageProject.jsx:471",
+ "src/community/pages/ManageProject.jsx:473",
"src/community/pages/PullRequest.jsx:531",
"src/community/pages/RemixTree.jsx:213"
],
@@ -6552,8 +6586,8 @@
],
"Finding project…": [
"src/community/pages/Commit.jsx:365",
- "src/community/pages/Project.jsx:625",
- "src/community/pages/ProjectCode.jsx:333",
+ "src/community/pages/Project.jsx:627",
+ "src/community/pages/ProjectCode.jsx:358",
"src/community/pages/PullRequest.jsx:519",
"src/community/pages/PullRequests.jsx:58",
"src/community/pages/RemixTree.jsx:197"
@@ -6844,344 +6878,350 @@
],
"Analytics": [
"src/community/pages/ManageProject.jsx:67",
- "src/community/pages/ManageProject.jsx:511"
+ "src/community/pages/ManageProject.jsx:513"
],
"Publishing": [
"src/community/pages/ManageProject.jsx:69",
- "src/community/pages/ManageProject.jsx:643"
+ "src/community/pages/ManageProject.jsx:645"
],
"In-game products": [
"src/community/pages/ManageProject.jsx:70",
- "src/community/pages/ManageProject.jsx:684"
+ "src/community/pages/ManageProject.jsx:687"
],
"Collaboration": [
"src/community/pages/ManageProject.jsx:71",
- "src/community/pages/ManageProject.jsx:856",
- "src/community/pages/ManageProject.jsx:970",
+ "src/community/pages/ManageProject.jsx:859",
+ "src/community/pages/ManageProject.jsx:973",
"src/community/pages/Roadmap.jsx:497"
],
"Ownership": [
"src/community/pages/ManageProject.jsx:73",
- "src/community/pages/ManageProject.jsx:751"
+ "src/community/pages/ManageProject.jsx:754"
],
"Project not found.": [
"src/community/pages/ManageProject.jsx:193"
],
"Could not load this project.": [
"src/community/pages/ManageProject.jsx:194",
- "src/community/pages/Project.jsx:617"
+ "src/community/pages/Project.jsx:619"
],
"Project titles cannot be empty.": [
- "src/community/pages/ManageProject.jsx:291"
+ "src/community/pages/ManageProject.jsx:292"
],
"Saved.": [
- "src/community/pages/ManageProject.jsx:315"
+ "src/community/pages/ManageProject.jsx:317"
],
"Could not save changes.": [
- "src/community/pages/ManageProject.jsx:321"
+ "src/community/pages/ManageProject.jsx:323"
],
"Team saved.": [
- "src/community/pages/ManageProject.jsx:366"
+ "src/community/pages/ManageProject.jsx:368"
],
"Could not save the team.": [
- "src/community/pages/ManageProject.jsx:372"
+ "src/community/pages/ManageProject.jsx:374"
],
"Could not create a preview link.": [
- "src/community/pages/ManageProject.jsx:390"
+ "src/community/pages/ManageProject.jsx:392"
],
"Sign in to manage your projects.": [
- "src/community/pages/ManageProject.jsx:425"
+ "src/community/pages/ManageProject.jsx:427"
],
"This is not your project": [
- "src/community/pages/ManageProject.jsx:448"
+ "src/community/pages/ManageProject.jsx:450"
],
"Only the owner and team of a project can manage it.": [
- "src/community/pages/ManageProject.jsx:449"
+ "src/community/pages/ManageProject.jsx:451"
],
"Manage this project and see how it is doing.": [
- "src/community/pages/ManageProject.jsx:473"
+ "src/community/pages/ManageProject.jsx:475"
],
"Transferring…": [
- "src/community/pages/ManageProject.jsx:487"
+ "src/community/pages/ManageProject.jsx:489"
],
"See how your project is doing.": [
- "src/community/pages/ManageProject.jsx:511"
+ "src/community/pages/ManageProject.jsx:513"
],
"Donated credits": [
- "src/community/pages/ManageProject.jsx:536"
+ "src/community/pages/ManageProject.jsx:538"
],
"Donors": [
- "src/community/pages/ManageProject.jsx:541"
+ "src/community/pages/ManageProject.jsx:543"
],
"Advanced analytics are included with your Rotur {value1} membership.": [
- "src/community/pages/ManageProject.jsx:549"
+ "src/community/pages/ManageProject.jsx:551"
],
"Rotur Plus includes downloadable analytics. Your current membership includes {value1} history.": [
- "src/community/pages/ManageProject.jsx:553"
+ "src/community/pages/ManageProject.jsx:555"
],
"all-time": [
- "src/community/pages/ManageProject.jsx:554"
+ "src/community/pages/ManageProject.jsx:556"
],
"{value1}-day": [
- "src/community/pages/ManageProject.jsx:554"
+ "src/community/pages/ManageProject.jsx:556"
],
"Publish checklist": [
- "src/community/pages/ManageProject.jsx:566"
+ "src/community/pages/ManageProject.jsx:568"
],
"Project uploaded": [
- "src/community/pages/ManageProject.jsx:569"
+ "src/community/pages/ManageProject.jsx:571"
],
"Clear title": [
- "src/community/pages/ManageProject.jsx:570"
+ "src/community/pages/ManageProject.jsx:572"
],
"Instructions added": [
- "src/community/pages/ManageProject.jsx:571"
+ "src/community/pages/ManageProject.jsx:573"
],
"Description or notes added": [
- "src/community/pages/ManageProject.jsx:572"
+ "src/community/pages/ManageProject.jsx:574"
],
"Tags added": [
- "src/community/pages/ManageProject.jsx:573"
+ "src/community/pages/ManageProject.jsx:575"
],
"Thumbnail ready": [
- "src/community/pages/ManageProject.jsx:574"
+ "src/community/pages/ManageProject.jsx:576"
],
"Edit the name, branding, instructions, and public details people see.": [
- "src/community/pages/ManageProject.jsx:587"
+ "src/community/pages/ManageProject.jsx:589"
],
"Name and address": [
- "src/community/pages/ManageProject.jsx:589"
+ "src/community/pages/ManageProject.jsx:591"
],
"Vanity URL": [
- "src/community/pages/ManageProject.jsx:601"
+ "src/community/pages/ManageProject.jsx:603"
],
"/p/": [
- "src/community/pages/ManageProject.jsx:602"
+ "src/community/pages/ManageProject.jsx:604"
],
"my-project": [
- "src/community/pages/ManageProject.jsx:602"
+ "src/community/pages/ManageProject.jsx:604"
],
"This vanity URL is paused because your plan no longer includes one. It stays yours for 30 days. Clear it to give it up now.": [
- "src/community/pages/ManageProject.jsx:603"
+ "src/community/pages/ManageProject.jsx:605"
],
"Your {value1} membership includes a vanity URL.": [
- "src/community/pages/ManageProject.jsx:603"
+ "src/community/pages/ManageProject.jsx:605"
],
"Vanity project URLs are included with Rotur Pro.": [
- "src/community/pages/ManageProject.jsx:603"
+ "src/community/pages/ManageProject.jsx:605"
],
"Branding": [
- "src/community/pages/ManageProject.jsx:618"
+ "src/community/pages/ManageProject.jsx:620"
],
"A short line above your project": [
- "src/community/pages/ManageProject.jsx:626"
+ "src/community/pages/ManageProject.jsx:628"
],
"Included with your Rotur {value1} membership.": [
- "src/community/pages/ManageProject.jsx:629"
+ "src/community/pages/ManageProject.jsx:631"
],
"Custom branding is included with Rotur Plus and Pro.": [
- "src/community/pages/ManageProject.jsx:629"
+ "src/community/pages/ManageProject.jsx:631"
],
"Control who can open the project and what they can do with it.": [
- "src/community/pages/ManageProject.jsx:643"
+ "src/community/pages/ManageProject.jsx:645"
],
"Access": [
- "src/community/pages/ManageProject.jsx:645"
+ "src/community/pages/ManageProject.jsx:647"
],
"Visibility": [
- "src/community/pages/ManageProject.jsx:648",
+ "src/community/pages/ManageProject.jsx:650",
"src/community/pages/ManageSpace.jsx:647",
"src/community/pages/Spaces.jsx:264",
"src/community/pages/project/ForkSetupModal.jsx:59"
],
"Classroom projects stay private.": [
- "src/community/pages/ManageProject.jsx:655",
+ "src/community/pages/ManageProject.jsx:657",
"src/community/pages/project/ProjectNotices.jsx:78"
],
"Allow remixes": [
- "src/community/pages/ManageProject.jsx:659"
+ "src/community/pages/ManageProject.jsx:661"
],
"Allow people to see inside": [
- "src/community/pages/ManageProject.jsx:660"
+ "src/community/pages/ManageProject.jsx:662"
],
"When enabled, See inside gives access to project files and version history.": [
- "src/community/pages/ManageProject.jsx:661"
+ "src/community/pages/ManageProject.jsx:663"
],
"Turn off comments": [
- "src/community/pages/ManageProject.jsx:662",
+ "src/community/pages/ManageProject.jsx:664",
"src/community/pages/Profile.jsx:710",
- "src/community/pages/project/ProjectActivity.jsx:89"
+ "src/community/pages/project/ProjectActivity.jsx:94"
+ ],
+ "Turn off issues": [
+ "src/community/pages/ManageProject.jsx:665"
+ ],
+ "Stops new comments from being tracked as issues. Existing issues stay readable.": [
+ "src/community/pages/ManageProject.jsx:665"
],
"Save publishing settings": [
- "src/community/pages/ManageProject.jsx:667"
+ "src/community/pages/ManageProject.jsx:670"
],
"Private preview": [
- "src/community/pages/ManageProject.jsx:672"
+ "src/community/pages/ManageProject.jsx:675"
],
"Create a private play link that expires after 24 hours.": [
- "src/community/pages/ManageProject.jsx:672"
+ "src/community/pages/ManageProject.jsx:675"
],
"Create preview link": [
- "src/community/pages/ManageProject.jsx:675"
+ "src/community/pages/ManageProject.jsx:678"
],
"Expires in 24 hours.": [
- "src/community/pages/ManageProject.jsx:677"
+ "src/community/pages/ManageProject.jsx:680"
],
"Products defined for this project that players can purchase during gameplay using credits.": [
- "src/community/pages/ManageProject.jsx:684"
+ "src/community/pages/ManageProject.jsx:687"
],
"No in-game products yet": [
- "src/community/pages/ManageProject.jsx:722"
+ "src/community/pages/ManageProject.jsx:725"
],
"No in-game products are configured for this project yet.": [
- "src/community/pages/ManageProject.jsx:723"
+ "src/community/pages/ManageProject.jsx:726"
],
"Open in editor to manage products": [
- "src/community/pages/ManageProject.jsx:727"
+ "src/community/pages/ManageProject.jsx:730"
],
"Original creator share": [
- "src/community/pages/ManageProject.jsx:732"
+ "src/community/pages/ManageProject.jsx:735"
],
"Share in percent": [
- "src/community/pages/ManageProject.jsx:735"
+ "src/community/pages/ManageProject.jsx:738"
],
"Percentage of each in-game product sale paid to the original project.": [
- "src/community/pages/ManageProject.jsx:737"
+ "src/community/pages/ManageProject.jsx:740"
],
"Save share": [
- "src/community/pages/ManageProject.jsx:741"
+ "src/community/pages/ManageProject.jsx:744"
],
"Move the project to a group or transfer it to someone else.": [
- "src/community/pages/ManageProject.jsx:751"
+ "src/community/pages/ManageProject.jsx:754"
],
"Owning group": [
- "src/community/pages/ManageProject.jsx:753",
+ "src/community/pages/ManageProject.jsx:756",
"src/community/pages/ManageSpace.jsx:640"
],
"Rotur group tag": [
- "src/community/pages/ManageProject.jsx:756"
+ "src/community/pages/ManageProject.jsx:759"
],
"Optional group tag": [
- "src/community/pages/ManageProject.jsx:757"
+ "src/community/pages/ManageProject.jsx:760"
],
"Clear this field to move the project back to your account.": [
- "src/community/pages/ManageProject.jsx:758"
+ "src/community/pages/ManageProject.jsx:761"
],
"Save group": [
- "src/community/pages/ManageProject.jsx:762"
+ "src/community/pages/ManageProject.jsx:765"
],
"Transfer project": [
- "src/community/pages/ManageProject.jsx:767"
+ "src/community/pages/ManageProject.jsx:770"
],
"The new owner gets the project. You will lose owner access.": [
- "src/community/pages/ManageProject.jsx:767"
+ "src/community/pages/ManageProject.jsx:770"
],
"New owner username": [
- "src/community/pages/ManageProject.jsx:769"
+ "src/community/pages/ManageProject.jsx:772"
],
"Review player feedback and recent runtime health.": [
- "src/community/pages/ManageProject.jsx:778",
- "src/community/pages/ManageProject.jsx:813"
+ "src/community/pages/ManageProject.jsx:781",
+ "src/community/pages/ManageProject.jsx:816"
],
"Diagnostics": [
- "src/community/pages/ManageProject.jsx:780",
- "src/community/pages/ManageProject.jsx:815"
+ "src/community/pages/ManageProject.jsx:783",
+ "src/community/pages/ManageProject.jsx:818"
],
"Activity sections": [
- "src/community/pages/ManageProject.jsx:786",
- "src/community/pages/ManageProject.jsx:821"
+ "src/community/pages/ManageProject.jsx:789",
+ "src/community/pages/ManageProject.jsx:824"
],
"Player diagnostics": [
- "src/community/pages/ManageProject.jsx:789"
+ "src/community/pages/ManageProject.jsx:792"
],
"Anonymous runtime events from the most recent 500 sessions.": [
- "src/community/pages/ManageProject.jsx:789"
+ "src/community/pages/ManageProject.jsx:792"
],
"Loads": [
- "src/community/pages/ManageProject.jsx:792",
+ "src/community/pages/ManageProject.jsx:795",
"src/community/pages/admin/StatsOverview.jsx:484",
"src/community/pages/admin/StatsOverview.jsx:527"
],
"Green flags": [
- "src/community/pages/ManageProject.jsx:793"
+ "src/community/pages/ManageProject.jsx:796"
],
"{value1} ms": [
- "src/community/pages/ManageProject.jsx:795"
+ "src/community/pages/ManageProject.jsx:798"
],
"Average load": [
- "src/community/pages/ManageProject.jsx:795",
+ "src/community/pages/ManageProject.jsx:798",
"src/community/pages/admin/StatsOverview.jsx:527"
],
"Loading diagnostics…": [
- "src/community/pages/ManageProject.jsx:799"
+ "src/community/pages/ManageProject.jsx:802"
],
"Recent errors": [
- "src/community/pages/ManageProject.jsx:803"
+ "src/community/pages/ManageProject.jsx:806"
],
"Tracked feedback": [
- "src/community/pages/ManageProject.jsx:824"
+ "src/community/pages/ManageProject.jsx:827"
],
"Loading feedback…": [
- "src/community/pages/ManageProject.jsx:825"
+ "src/community/pages/ManageProject.jsx:828"
],
"No feedback yet": [
- "src/community/pages/ManageProject.jsx:828"
+ "src/community/pages/ManageProject.jsx:831"
],
"Feedback players send from inside the project will show up here.": [
- "src/community/pages/ManageProject.jsx:829"
+ "src/community/pages/ManageProject.jsx:832"
],
"Working": [
- "src/community/pages/ManageProject.jsx:842"
+ "src/community/pages/ManageProject.jsx:845"
],
"Dismissed": [
- "src/community/pages/ManageProject.jsx:844"
+ "src/community/pages/ManageProject.jsx:847"
],
"Manage project access and funded work.": [
- "src/community/pages/ManageProject.jsx:856",
- "src/community/pages/ManageProject.jsx:970"
+ "src/community/pages/ManageProject.jsx:859",
+ "src/community/pages/ManageProject.jsx:973"
],
"Collaboration sections": [
- "src/community/pages/ManageProject.jsx:864",
- "src/community/pages/ManageProject.jsx:978"
+ "src/community/pages/ManageProject.jsx:867",
+ "src/community/pages/ManageProject.jsx:981"
],
"Project team": [
- "src/community/pages/ManageProject.jsx:870"
+ "src/community/pages/ManageProject.jsx:873"
],
"Give other people access without sharing your account.": [
- "src/community/pages/ManageProject.jsx:871"
+ "src/community/pages/ManageProject.jsx:874"
],
"Add teammate": [
- "src/community/pages/ManageProject.jsx:880"
+ "src/community/pages/ManageProject.jsx:883"
],
"Sale share": [
- "src/community/pages/ManageProject.jsx:917"
+ "src/community/pages/ManageProject.jsx:920"
],
"No teammates yet": [
- "src/community/pages/ManageProject.jsx:951"
+ "src/community/pages/ManageProject.jsx:954"
],
"Add someone when you are ready to work together.": [
- "src/community/pages/ManageProject.jsx:952"
+ "src/community/pages/ManageProject.jsx:955"
],
"Save team": [
- "src/community/pages/ManageProject.jsx:963"
+ "src/community/pages/ManageProject.jsx:966"
],
"Bounty cancelled and refunded.": [
- "src/community/pages/ManageProject.jsx:1012"
+ "src/community/pages/ManageProject.jsx:1015"
],
"Could not cancel the bounty.": [
- "src/community/pages/ManageProject.jsx:1015"
+ "src/community/pages/ManageProject.jsx:1018"
],
"Create a bounty": [
- "src/community/pages/ManageProject.jsx:1024"
+ "src/community/pages/ManageProject.jsx:1027"
],
"New bounties are paused while MistWarp moves payments to Rotur. Bounties already funded still pay out when you merge a linked pull request, and you can cancel them for a refund.": [
- "src/community/pages/ManageProject.jsx:1026"
+ "src/community/pages/ManageProject.jsx:1029"
],
"Project bounties": [
- "src/community/pages/ManageProject.jsx:1031"
+ "src/community/pages/ManageProject.jsx:1034"
],
"No bounties yet": [
- "src/community/pages/ManageProject.jsx:1046"
+ "src/community/pages/ManageProject.jsx:1049"
],
"Curators": [
"src/community/pages/ManageSpace.jsx:27",
@@ -7690,7 +7730,8 @@
"Posting…": [
"src/community/pages/News.jsx:299",
"src/community/pages/PullRequest.jsx:624",
- "src/community/pages/Roadmap.jsx:500"
+ "src/community/pages/Roadmap.jsx:500",
+ "src/community/pages/project/IssueThread.jsx:274"
],
"Publish post": [
"src/community/pages/News.jsx:300"
@@ -8033,8 +8074,8 @@
],
"Browse projects": [
"src/community/pages/Profile.jsx:467",
- "src/community/pages/Project.jsx:602",
- "src/community/pages/Project.jsx:614"
+ "src/community/pages/Project.jsx:604",
+ "src/community/pages/Project.jsx:616"
],
"This user does not exist on Rotur.": [
"src/community/pages/Profile.jsx:468"
@@ -8110,7 +8151,7 @@
],
"Turn on comments": [
"src/community/pages/Profile.jsx:710",
- "src/community/pages/project/ProjectActivity.jsx:89"
+ "src/community/pages/project/ProjectActivity.jsx:94"
],
"Published themes": [
"src/community/pages/Profile.jsx:744"
@@ -8240,135 +8281,146 @@
"src/community/pages/Profile.jsx:987"
],
"Project not found": [
- "src/community/pages/Project.jsx:601",
- "src/community/pages/Project.jsx:613"
+ "src/community/pages/Project.jsx:603",
+ "src/community/pages/Project.jsx:615"
],
"This project link does not exist.": [
- "src/community/pages/Project.jsx:603"
+ "src/community/pages/Project.jsx:605"
],
"This project may have been deleted or unshared.": [
- "src/community/pages/Project.jsx:615"
+ "src/community/pages/Project.jsx:617"
],
"Delete project?": [
- "src/community/pages/Project.jsx:727",
+ "src/community/pages/Project.jsx:735",
"src/community/pages/admin/ProjectManager.jsx:68",
"src/community/pages/admin/UserDetailCard.jsx:253"
],
"Delete project": [
- "src/community/pages/Project.jsx:728",
+ "src/community/pages/Project.jsx:736",
"src/community/pages/admin/ProjectManager.jsx:70",
"src/community/pages/admin/UserDetailCard.jsx:255",
"src/community/pages/project/ProjectHeader.jsx:327"
],
"{value1} will be deleted permanently. This cannot be undone.": [
- "src/community/pages/Project.jsx:734"
+ "src/community/pages/Project.jsx:742"
],
"Run custom extensions without the sandbox?": [
- "src/community/pages/Project.jsx:740"
+ "src/community/pages/Project.jsx:748"
],
"Keep sandbox": [
- "src/community/pages/Project.jsx:741"
+ "src/community/pages/Project.jsx:749"
],
"Run anyway": [
- "src/community/pages/Project.jsx:742"
+ "src/community/pages/Project.jsx:750"
],
"This gives the project full access to your MistWarp account. It could read your login session, act as you, or change your data. Continue only if you trust the creator.": [
- "src/community/pages/Project.jsx:745"
+ "src/community/pages/Project.jsx:753"
],
"Shared {value1}": [
- "src/community/pages/Project.jsx:822",
+ "src/community/pages/Project.jsx:830",
"src/community/pages/admin/UserDetailCard.jsx:323",
"src/community/pages/project/ProjectHeader.jsx:94"
],
"Uploaded {value1}": [
- "src/community/pages/Project.jsx:823",
+ "src/community/pages/Project.jsx:831",
"src/community/pages/project/ProjectHeader.jsx:95"
],
"{value1} blocks": [
- "src/community/pages/Project.jsx:836"
+ "src/community/pages/Project.jsx:844"
],
"About this project": [
- "src/community/pages/ProjectCode.jsx:63"
+ "src/community/pages/ProjectCode.jsx:66"
],
"1 commit": [
- "src/community/pages/ProjectCode.jsx:83",
- "src/community/pages/ProjectCode.jsx:118",
+ "src/community/pages/ProjectCode.jsx:86",
+ "src/community/pages/ProjectCode.jsx:122",
"src/community/pages/project/CodeBrowser.jsx:104"
],
"{value1} commits": [
- "src/community/pages/ProjectCode.jsx:83",
- "src/community/pages/ProjectCode.jsx:118",
+ "src/community/pages/ProjectCode.jsx:86",
+ "src/community/pages/ProjectCode.jsx:122",
"src/community/pages/project/CodeBrowser.jsx:104"
],
"1 branch": [
- "src/community/pages/ProjectCode.jsx:84"
+ "src/community/pages/ProjectCode.jsx:87"
],
"{value1} branches": [
- "src/community/pages/ProjectCode.jsx:84",
- "src/community/pages/ProjectCode.jsx:280"
+ "src/community/pages/ProjectCode.jsx:87",
+ "src/community/pages/ProjectCode.jsx:299"
+ ],
+ "1 open issue": [
+ "src/community/pages/ProjectCode.jsx:88",
+ "src/community/pages/project/IssueList.jsx:155"
+ ],
+ "{value1} open issues": [
+ "src/community/pages/ProjectCode.jsx:88",
+ "src/community/pages/project/IssueList.jsx:155"
],
"1 open pull request": [
- "src/community/pages/ProjectCode.jsx:85"
+ "src/community/pages/ProjectCode.jsx:89"
],
"{value1} open pull requests": [
- "src/community/pages/ProjectCode.jsx:85"
+ "src/community/pages/ProjectCode.jsx:89"
],
"1 release": [
- "src/community/pages/ProjectCode.jsx:86"
+ "src/community/pages/ProjectCode.jsx:90"
],
"{value1} releases": [
- "src/community/pages/ProjectCode.jsx:86"
+ "src/community/pages/ProjectCode.jsx:90"
],
"1 file": [
- "src/community/pages/ProjectCode.jsx:103"
+ "src/community/pages/ProjectCode.jsx:107"
],
"{value1} files": [
- "src/community/pages/ProjectCode.jsx:103"
+ "src/community/pages/ProjectCode.jsx:107"
],
"{value1} in total": [
- "src/community/pages/ProjectCode.jsx:104"
+ "src/community/pages/ProjectCode.jsx:108"
],
"Contributors": [
- "src/community/pages/ProjectCode.jsx:110"
+ "src/community/pages/ProjectCode.jsx:114"
],
"Developer view · {value1}": [
- "src/community/pages/ProjectCode.jsx:169"
+ "src/community/pages/ProjectCode.jsx:179"
+ ],
+ "Issues": [
+ "src/community/pages/ProjectCode.jsx:222"
],
"Commits": [
- "src/community/pages/ProjectCode.jsx:208",
+ "src/community/pages/ProjectCode.jsx:223",
"src/community/pages/PullRequest.jsx:570",
"src/community/pages/RemixTree.jsx:278"
],
"Pull requests": [
- "src/community/pages/ProjectCode.jsx:210",
+ "src/community/pages/ProjectCode.jsx:225",
"src/community/pages/PullRequests.jsx:70",
"src/community/pages/Roadmap.jsx:134",
"src/community/pages/project/VersionControlPanel.jsx:24"
],
"Releases": [
- "src/community/pages/ProjectCode.jsx:211",
+ "src/community/pages/ProjectCode.jsx:226",
"src/community/pages/project/VersionControlPanel.jsx:25"
],
"Project view": [
- "src/community/pages/ProjectCode.jsx:232"
+ "src/community/pages/ProjectCode.jsx:251"
],
"See inside": [
- "src/community/pages/ProjectCode.jsx:239",
+ "src/community/pages/ProjectCode.jsx:258",
"src/community/pages/project/ProjectHeader.jsx:155"
],
"Developer view": [
- "src/community/pages/ProjectCode.jsx:247",
+ "src/community/pages/ProjectCode.jsx:266",
"src/community/pages/Settings.jsx:595",
"src/community/pages/project/ProjectHeader.jsx:147"
],
"Branch": [
- "src/community/pages/ProjectCode.jsx:272"
+ "src/community/pages/ProjectCode.jsx:291"
],
"The source of this project is private": [
- "src/community/pages/ProjectCode.jsx:322"
+ "src/community/pages/ProjectCode.jsx:347"
],
"Only people the creator has given access can see its files and history.": [
- "src/community/pages/ProjectCode.jsx:323"
+ "src/community/pages/ProjectCode.jsx:348"
],
"{title} · Pull request #{index}": [
"src/community/pages/PullRequest.jsx:286"
@@ -10947,6 +10999,97 @@
"Saved version": [
"src/community/pages/project/HistoryList.jsx:115"
],
+ "Could not open the issue.": [
+ "src/community/pages/project/IssueList.jsx:37",
+ "src/community/pages/project/IssueList.jsx:45"
+ ],
+ "Your comment was posted but could not be tracked as an issue. Try again to track it.": [
+ "src/community/pages/project/IssueList.jsx:44"
+ ],
+ "Describe the issue": [
+ "src/community/pages/project/IssueList.jsx:56"
+ ],
+ "Describe the bug or idea. It is posted as a comment on the project.": [
+ "src/community/pages/project/IssueList.jsx:57"
+ ],
+ "Open issue": [
+ "src/community/pages/project/IssueList.jsx:74"
+ ],
+ "Search issues": [
+ "src/community/pages/project/IssueList.jsx:126"
+ ],
+ "New issue": [
+ "src/community/pages/project/IssueList.jsx:134"
+ ],
+ "1 finished issue": [
+ "src/community/pages/project/IssueList.jsx:161"
+ ],
+ "{value1} finished issues": [
+ "src/community/pages/project/IssueList.jsx:161"
+ ],
+ "Could not load issues.": [
+ "src/community/pages/project/IssueList.jsx:167"
+ ],
+ "Loading issues…": [
+ "src/community/pages/project/IssueList.jsx:169"
+ ],
+ "#{value1} opened {value2} by {value3}": [
+ "src/community/pages/project/IssueList.jsx:194"
+ ],
+ "1 reply": [
+ "src/community/pages/project/IssueList.jsx:212",
+ "src/community/pages/project/IssueThread.jsx:218"
+ ],
+ "{value1} replies": [
+ "src/community/pages/project/IssueList.jsx:212",
+ "src/community/pages/project/IssueThread.jsx:218"
+ ],
+ "No issues match your search": [
+ "src/community/pages/project/IssueList.jsx:221"
+ ],
+ "No open issues": [
+ "src/community/pages/project/IssueList.jsx:222"
+ ],
+ "No finished issues": [
+ "src/community/pages/project/IssueList.jsx:222"
+ ],
+ "The creator has turned off issues for this project.": [
+ "src/community/pages/project/IssueList.jsx:225"
+ ],
+ "Any comment can become an issue. Its author or the project team can track it from the comment menu.": [
+ "src/community/pages/project/IssueList.jsx:226"
+ ],
+ "Could not post reply.": [
+ "src/community/pages/project/IssueThread.jsx:156"
+ ],
+ "All issues": [
+ "src/community/pages/project/IssueThread.jsx:166"
+ ],
+ "Could not load this issue.": [
+ "src/community/pages/project/IssueThread.jsx:176"
+ ],
+ "Issue not found": [
+ "src/community/pages/project/IssueThread.jsx:186"
+ ],
+ "It may have been deleted or turned back into a plain comment.": [
+ "src/community/pages/project/IssueThread.jsx:187"
+ ],
+ "Loading issue…": [
+ "src/community/pages/project/IssueThread.jsx:191"
+ ],
+ "{value1} marked this done {value2}": [
+ "src/community/pages/project/IssueThread.jsx:211"
+ ],
+ "{value1} opened this {value2}": [
+ "src/community/pages/project/IssueThread.jsx:215"
+ ],
+ "Reply to this issue": [
+ "src/community/pages/project/IssueThread.jsx:245",
+ "src/community/pages/project/IssueThread.jsx:246"
+ ],
+ "See it with the other comments": [
+ "src/community/pages/project/IssueThread.jsx:284"
+ ],
"Open pull requests from this project": [
"src/community/pages/project/OutgoingPullNotice.jsx:36"
],
diff --git a/src/community/translations/en.json b/src/community/translations/en.json
index 8ecfeeb0417..cd8fa022dc9 100644
--- a/src/community/translations/en.json
+++ b/src/community/translations/en.json
@@ -3722,5 +3722,45 @@
"Parent folder": "Parent folder",
"Breadcrumb": "Breadcrumb",
"Open projects on their files, commits and pull requests, with the player beside them. Projects with private source still open normally.": "Open projects on their files, commits and pull requests, with the player beside them. Projects with private source still open normally.",
- "Open projects in developer view": "Open projects in developer view"
+ "Open projects in developer view": "Open projects in developer view",
+ "Done #{value1}": "Done #{value1}",
+ "Issue #{value1}": "Issue #{value1}",
+ "Track as issue": "Track as issue",
+ "Mark as done": "Mark as done",
+ "Reopen issue": "Reopen issue",
+ "Stop tracking as issue": "Stop tracking as issue",
+ "Could not update the issue.": "Could not update the issue.",
+ "1 open issue": "1 open issue",
+ "{value1} open issues": "{value1} open issues",
+ "Issues": "Issues",
+ "Could not open the issue.": "Could not open the issue.",
+ "Describe the issue": "Describe the issue",
+ "Describe the bug or idea. It is posted as a comment on the project.": "Describe the bug or idea. It is posted as a comment on the project.",
+ "Open issue": "Open issue",
+ "Search issues": "Search issues",
+ "New issue": "New issue",
+ "Could not load issues.": "Could not load issues.",
+ "Loading issues…": "Loading issues…",
+ "1 reply": "1 reply",
+ "No issues match your search": "No issues match your search",
+ "No open issues": "No open issues",
+ "No finished issues": "No finished issues",
+ "The creator has turned off issues for this project.": "The creator has turned off issues for this project.",
+ "Any comment can become an issue. Its author or the project team can track it from the comment menu.": "Any comment can become an issue. Its author or the project team can track it from the comment menu.",
+ "Could not post reply.": "Could not post reply.",
+ "All issues": "All issues",
+ "Could not load this issue.": "Could not load this issue.",
+ "Issue not found": "Issue not found",
+ "It may have been deleted or turned back into a plain comment.": "It may have been deleted or turned back into a plain comment.",
+ "Loading issue…": "Loading issue…",
+ "{value1} marked this done {value2}": "{value1} marked this done {value2}",
+ "{value1} opened this {value2}": "{value1} opened this {value2}",
+ "Reply to this issue": "Reply to this issue",
+ "See it with the other comments": "See it with the other comments",
+ "Turn off issues": "Turn off issues",
+ "Stops new comments from being tracked as issues. Existing issues stay readable.": "Stops new comments from being tracked as issues. Existing issues stay readable.",
+ "Your comment was posted but could not be tracked as an issue. Try again to track it.": "Your comment was posted but could not be tracked as an issue. Try again to track it.",
+ "1 finished issue": "1 finished issue",
+ "{value1} finished issues": "{value1} finished issues",
+ "#{value1} opened {value2} by {value3}": "#{value1} opened {value2} by {value3}"
}
diff --git a/test/unit/community-comment-issues.test.jsx b/test/unit/community-comment-issues.test.jsx
new file mode 100644
index 00000000000..5fe97e3cbc4
--- /dev/null
+++ b/test/unit/community-comment-issues.test.jsx
@@ -0,0 +1,413 @@
+import React from 'react';
+import {act} from 'react-dom/test-utils';
+import {mount} from 'enzyme';
+import {MemoryRouter, Route, Routes} from 'react-router-dom';
+
+import api from '../../src/community/api';
+import {commentQuery} from '../../src/community/api/query.js';
+import {
+ canChangeIssue, commentIssueNumber, commentIssueState, issueThreads, issueTitle, mergeCommentUpdate
+} from '../../src/community/comment-issues.js';
+import CommentThread from '../../src/community/components/CommentThread.jsx';
+import IssueList from '../../src/community/pages/project/IssueList.jsx';
+import IssueThread from '../../src/community/pages/project/IssueThread.jsx';
+import projectRealtime from '../../src/community/project-realtime.js';
+import {useUser} from '../../src/community/UserContext.jsx';
+
+jest.mock('../../src/community/UserContext.jsx', () => ({useUser: jest.fn()}));
+
+const future = {v7_startTransition: true, v7_relativeSplatPath: true};
+
+const settle = async wrapper => {
+ for (let index = 0; index < 6; index++) {
+ await act(async () => {
+ await Promise.resolve();
+ });
+ }
+ wrapper.update();
+};
+
+const openIssue = {id: 'c1', author: 'Sam', content: 'The jump is too high\nIt clips the ceiling', created: 10, issue: {number: 2, state: 'open', openedBy: 'Sam'}};
+const doneIssue = {id: 'c3', author: 'Ana', content: 'Add a pause menu', created: 5, issue: {number: 1, state: 'done', closedBy: 'mist', closedAt: 20}};
+const replies = [
+ {id: 'r2', author: 'Sam', content: 'Still happens on level 3', parent: 'c1', created: 30},
+ {id: 'r1', author: 'mist', content: 'Looking at it', parent: 'c1', created: 20}
+];
+
+describe('comment issue helpers', () => {
+ test('read the state and number only for real issues', () => {
+ expect(commentIssueState(openIssue)).toBe('open');
+ expect(commentIssueState(doneIssue)).toBe('done');
+ expect(commentIssueState({id: 'x', issue: {state: 'weird', number: 4}})).toBe('');
+ expect(commentIssueState({id: 'x', issue: {state: 'none', number: 4}})).toBe('');
+ expect(commentIssueNumber({id: 'x', issue: {state: 'weird', number: 4}})).toBe(0);
+ expect(commentIssueNumber(openIssue)).toBe(2);
+ });
+
+ test('title an issue by the first line of its comment', () => {
+ expect(issueTitle('\n The jump is too high \nmore')).toBe('The jump is too high');
+ expect(issueTitle('a'.repeat(200), 10)).toBe(`${'a'.repeat(9)}…`);
+ expect(issueTitle('')).toBe('');
+ });
+
+ test('let the author or the project team change an issue, never on replies', () => {
+ expect(canChangeIssue(openIssue, {username: 'sam'}, false)).toBe(true);
+ expect(canChangeIssue(openIssue, {username: 'Lee'}, false)).toBe(false);
+ expect(canChangeIssue(openIssue, {username: 'Lee'}, true)).toBe(true);
+ expect(canChangeIssue(replies[0], {username: 'Sam'}, true)).toBe(false);
+ expect(canChangeIssue(openIssue, null, true)).toBe(false);
+ });
+
+ test('drop the issue when an update no longer has one', () => {
+ expect(mergeCommentUpdate(openIssue, {id: 'c1', content: 'Edited'})).not.toHaveProperty('issue');
+ expect(mergeCommentUpdate(openIssue, {id: 'c1', issue: {number: 2, state: 'done'}}).issue.state).toBe('done');
+ });
+
+ test('group replies under their issue, newest issue first, replies oldest first', () => {
+ const threads = issueThreads([doneIssue, replies[0], openIssue, replies[1], {id: 'c9', author: 'x', content: 'plain'}]);
+ expect(threads.map(thread => thread.root.id)).toEqual(['c1', 'c3']);
+ expect(threads[0].replies.map(reply => reply.id)).toEqual(['r1', 'r2']);
+ });
+
+ test('ask the API for issue threads', () => {
+ expect(commentQuery({all: true, issue: 'open'})).toBe('all=1&issue=open');
+ expect(commentQuery({all: true, issue: 'any', number: 3})).toBe('all=1&issue=any&number=3');
+ expect(commentQuery({all: true, issue: 'nope', number: 3})).toBe('all=1');
+ });
+});
+
+describe('issue actions on comments', () => {
+ afterEach(() => jest.restoreAllMocks());
+
+ const mountThread = (user, comments, issues, issue = jest.fn()) => {
+ useUser.mockReturnValue({user, login: jest.fn()});
+ const source = {list: jest.fn(() => Promise.resolve({comments})), issue};
+ const wrapper = mount(
+
+
+
+ );
+ return {wrapper, source};
+ };
+ const openMenu = wrapper => {
+ act(() => {
+ wrapper.find('button[aria-label="Comment actions"]').first()
+ .simulate('click');
+ });
+ wrapper.update();
+ };
+ const menuItem = (wrapper, label) => wrapper.find('button').filterWhere(button => button.text() === label);
+
+ test('authors track their own comment as an issue and see its badge', async () => {
+ const plain = {id: 'c1', author: 'Sam', content: 'Bug', created: 1};
+ const issue = jest.fn(() => Promise.resolve({comment: {...plain, issue: {number: 1, state: 'open'}}}));
+ const {wrapper} = mountThread({username: 'sam'}, [plain], {canTriage: false, enabled: true, href: n => `/project/p/code/issues/${n}`}, issue);
+ await settle(wrapper);
+ openMenu(wrapper);
+ await act(async () => {
+ menuItem(wrapper, 'Track as issue').simulate('click');
+ await Promise.resolve();
+ });
+ wrapper.update();
+ expect(issue).toHaveBeenCalledWith('c1', 'open');
+ const badge = wrapper.find('a').filterWhere(link => link.text() === 'Issue #1');
+ expect(badge.prop('href')).toBe('/project/p/code/issues/1');
+ wrapper.unmount();
+ });
+
+ test('the project team can mark any issue done but others cannot', async () => {
+ let mounted = mountThread({username: 'mist'}, [openIssue], {canTriage: true, enabled: true});
+ await settle(mounted.wrapper);
+ openMenu(mounted.wrapper);
+ expect(menuItem(mounted.wrapper, 'Mark as done')).toHaveLength(1);
+ expect(menuItem(mounted.wrapper, 'Stop tracking as issue')).toHaveLength(1);
+ mounted.wrapper.unmount();
+
+ mounted = mountThread({username: 'Lee'}, [openIssue], {canTriage: false, enabled: true});
+ await settle(mounted.wrapper);
+ openMenu(mounted.wrapper);
+ expect(menuItem(mounted.wrapper, 'Mark as done')).toHaveLength(0);
+ mounted.wrapper.unmount();
+ });
+
+ test('nobody can start a new issue when issues are off', async () => {
+ const {wrapper} = mountThread({username: 'mist'}, [{id: 'c1', author: 'mist', content: 'x', created: 1}], {canTriage: true, enabled: false});
+ await settle(wrapper);
+ openMenu(wrapper);
+ expect(menuItem(wrapper, 'Track as issue')).toHaveLength(0);
+ wrapper.unmount();
+ });
+
+ test('with issues off, existing issues can only stop being tracked', async () => {
+ const {wrapper} = mountThread({username: 'mist'}, [openIssue], {canTriage: true, enabled: false});
+ await settle(wrapper);
+ openMenu(wrapper);
+ expect(menuItem(wrapper, 'Mark as done')).toHaveLength(0);
+ expect(menuItem(wrapper, 'Stop tracking as issue')).toHaveLength(1);
+ wrapper.unmount();
+ });
+
+ test('an issue that stops being tracked loses its badge', async () => {
+ const issue = jest.fn(() => Promise.resolve({comment: {...openIssue, issue: {number: 2, state: 'none'}}}));
+ const {wrapper} = mountThread({username: 'Sam'}, [openIssue], {canTriage: false, enabled: true}, issue);
+ await settle(wrapper);
+ expect(wrapper.text()).toContain('Issue #2');
+ openMenu(wrapper);
+ await act(async () => {
+ menuItem(wrapper, 'Stop tracking as issue').simulate('click');
+ await Promise.resolve();
+ });
+ wrapper.update();
+ expect(issue).toHaveBeenCalledWith('c1', 'none');
+ expect(wrapper.text()).not.toContain('Issue #2');
+ wrapper.unmount();
+ });
+
+ test('pages without issues show no issue actions', async () => {
+ const {wrapper} = mountThread({username: 'Sam'}, [openIssue], null);
+ await settle(wrapper);
+ openMenu(wrapper);
+ expect(menuItem(wrapper, 'Mark as done')).toHaveLength(0);
+ expect(wrapper.text()).toContain('Issue #2');
+ wrapper.unmount();
+ });
+});
+
+describe('developer view issues', () => {
+ afterEach(() => jest.restoreAllMocks());
+
+ const project = {id: 'p1', isOwner: false, issuesOff: false, commentsOff: false};
+
+ test('lists each issue with its first comment and latest reply', async () => {
+ useUser.mockReturnValue({user: null});
+ const getComments = jest.spyOn(api, 'getComments').mockResolvedValue({
+ comments: [openIssue, ...replies],
+ issueCounts: {open: 1, done: 4}
+ });
+ const onCounts = jest.fn();
+ const wrapper = mount(
+
+
+
+ );
+ await settle(wrapper);
+ expect(getComments).toHaveBeenCalledWith('p1', {all: true, issue: 'open'});
+ expect(onCounts).toHaveBeenCalledWith({open: 1, done: 4});
+ const row = wrapper.find('article');
+ expect(row).toHaveLength(1);
+ const title = row.find('a').filterWhere(link => link.text() === 'The jump is too high');
+ expect(title.prop('href')).toBe('/project/p1/code/issues/2');
+ expect(row.text()).toContain('Still happens on level 3');
+ expect(row.text()).toContain('#2 opened');
+ expect(wrapper.text()).toContain('4 finished issues');
+ expect(wrapper.find('button').filterWhere(button => button.text() === 'New issue')).toHaveLength(0);
+
+ await act(async () => {
+ wrapper.find('button').filterWhere(button => button.text() === '4 finished issues')
+ .simulate('click');
+ await Promise.resolve();
+ });
+ expect(getComments).toHaveBeenLastCalledWith('p1', {all: true, issue: 'done'});
+ wrapper.unmount();
+ });
+
+ test('signed-in people open a new issue as a tracked comment', async () => {
+ useUser.mockReturnValue({user: {username: 'Lee'}});
+ jest.spyOn(api, 'getComments').mockResolvedValue({comments: [], issueCounts: {open: 0, done: 0}});
+ const add = jest.spyOn(api, 'addComment').mockResolvedValue({comment: {id: 'n1', author: 'Lee', content: 'Crash'}});
+ const track = jest.spyOn(api, 'setCommentIssue').mockResolvedValue({comment: {id: 'n1', issue: {number: 3, state: 'open'}}});
+ const wrapper = mount(
+
+
+
+ );
+ await settle(wrapper);
+ expect(wrapper.text()).toContain('No open issues');
+ act(() => {
+ wrapper.find('button').filterWhere(button => button.text() === 'New issue')
+ .simulate('click');
+ });
+ wrapper.update();
+ wrapper.find('textarea').simulate('change', {target: {value: ' Crash on start '}});
+ await act(async () => {
+ wrapper.find('form').simulate('submit');
+ await Promise.resolve();
+ });
+ await settle(wrapper);
+ expect(add).toHaveBeenCalledWith('p1', 'Crash on start', '');
+ expect(track).toHaveBeenCalledWith('p1', 'n1', 'open');
+ expect(wrapper.find('textarea')).toHaveLength(0);
+ wrapper.unmount();
+ });
+
+ test('retries only the tracking when it fails after the comment is posted', async () => {
+ useUser.mockReturnValue({user: {username: 'Lee'}});
+ jest.spyOn(api, 'getComments').mockResolvedValue({comments: [], issueCounts: {open: 0, done: 0}});
+ const add = jest.spyOn(api, 'addComment').mockResolvedValue({comment: {id: 'n1', author: 'Lee', content: 'Crash'}});
+ const track = jest.spyOn(api, 'setCommentIssue')
+ .mockRejectedValueOnce(new Error('offline'))
+ .mockResolvedValueOnce({comment: {id: 'n1', issue: {number: 3, state: 'open'}}});
+ const wrapper = mount(
+
+
+
+ );
+ await settle(wrapper);
+ act(() => {
+ wrapper.find('button').filterWhere(button => button.text() === 'New issue')
+ .simulate('click');
+ });
+ wrapper.update();
+ wrapper.find('textarea').simulate('change', {target: {value: 'Crash'}});
+ await act(async () => {
+ wrapper.find('form').simulate('submit');
+ await Promise.resolve();
+ });
+ await settle(wrapper);
+ expect(wrapper.text()).toContain('Your comment was posted but could not be tracked as an issue.');
+ await act(async () => {
+ wrapper.find('form').simulate('submit');
+ await Promise.resolve();
+ });
+ await settle(wrapper);
+ expect(add).toHaveBeenCalledTimes(1);
+ expect(track).toHaveBeenCalledTimes(2);
+ expect(wrapper.find('textarea')).toHaveLength(0);
+ wrapper.unmount();
+ });
+
+ let realtime = null;
+ const mountIssue = (user, extra = {}, onChange = jest.fn()) => {
+ useUser.mockReturnValue({user});
+ jest.spyOn(projectRealtime, 'subscribe').mockImplementation((projectId, listener) => {
+ realtime = listener;
+ return () => {};
+ });
+ const getComments = jest.spyOn(api, 'getComments').mockResolvedValue({comments: [openIssue, ...replies]});
+ const wrapper = mount(
+
+
+ }
+ />
+
+
+ );
+ return {wrapper, getComments};
+ };
+
+ test('shows the whole thread and lets the author mark it done', async () => {
+ const onChange = jest.fn();
+ const {wrapper, getComments} = mountIssue({username: 'Sam'}, {}, onChange);
+ await settle(wrapper);
+ expect(getComments).toHaveBeenCalledWith('p1', {all: true, issue: 'any', number: 2});
+ expect(wrapper.find('h2').text()).toBe('The jump is too high #2');
+ const texts = wrapper.find('article').map(node => node.text());
+ expect(texts).toHaveLength(3);
+ expect(texts[0]).toContain('It clips the ceiling');
+ expect(texts[1]).toContain('Looking at it');
+ expect(texts[2]).toContain('Still happens on level 3');
+
+ const setIssue = jest.spyOn(api, 'setCommentIssue').mockResolvedValue({
+ comment: {...openIssue, issue: {number: 2, state: 'done', closedBy: 'Sam', closedAt: 50}}
+ });
+ await act(async () => {
+ wrapper.find('button').filterWhere(button => button.text() === 'Mark as done')
+ .simulate('click');
+ await Promise.resolve();
+ });
+ await settle(wrapper);
+ expect(setIssue).toHaveBeenCalledWith('p1', 'c1', 'done');
+ expect(onChange).toHaveBeenCalledTimes(1);
+ expect(wrapper.text()).toContain('Sam marked this done');
+ expect(wrapper.find('button').filterWhere(button => button.text() === 'Reopen issue')).toHaveLength(1);
+ wrapper.unmount();
+ });
+
+ test('replies are added to the thread', async () => {
+ const {wrapper} = mountIssue({username: 'Lee'});
+ await settle(wrapper);
+ expect(wrapper.find('button').filterWhere(button => button.text() === 'Mark as done')).toHaveLength(0);
+ const add = jest.spyOn(api, 'addComment').mockResolvedValue({comment: {id: 'r3', author: 'Lee', content: 'Same here', parent: 'c1', created: 40}});
+ wrapper.find('textarea').simulate('change', {target: {value: 'Same here'}});
+ await act(async () => {
+ wrapper.find('form').simulate('submit');
+ await Promise.resolve();
+ });
+ await settle(wrapper);
+ expect(add).toHaveBeenCalledWith('p1', 'Same here', 'c1');
+ expect(wrapper.find('article')).toHaveLength(4);
+ wrapper.unmount();
+ });
+
+ test('follows replies and untracking from other people in real time', async () => {
+ const {wrapper} = mountIssue(null);
+ await settle(wrapper);
+ await act(async () => {
+ realtime({type: 'comment_created', comment: {id: 'r9', author: 'Ana', content: 'Me too', parent: 'c1', created: 60}});
+ realtime({type: 'comment_created', comment: {id: 'x1', author: 'Ana', content: 'Elsewhere', parent: 'other', created: 61}});
+ });
+ wrapper.update();
+ expect(wrapper.find('article')).toHaveLength(4);
+ expect(wrapper.text()).not.toContain('Elsewhere');
+ await act(async () => {
+ realtime({type: 'comment_edited', comment: {...openIssue, issue: {number: 2, state: 'none'}}});
+ });
+ wrapper.update();
+ expect(wrapper.text()).toContain('Issue not found');
+ wrapper.unmount();
+ });
+
+ test('hides done and reopen when issues are off', async () => {
+ const {wrapper} = mountIssue({username: 'Sam'}, {issuesOff: true});
+ await settle(wrapper);
+ expect(wrapper.find('button').filterWhere(button => button.text() === 'Mark as done')).toHaveLength(0);
+ expect(wrapper.find('textarea')).toHaveLength(1);
+ wrapper.unmount();
+ });
+
+ test('says when the issue does not exist', async () => {
+ useUser.mockReturnValue({user: null});
+ jest.spyOn(api, 'getComments').mockResolvedValue({comments: []});
+ const wrapper = mount(
+
+
+
+ );
+ await settle(wrapper);
+ expect(wrapper.text()).toContain('Issue not found');
+ expect(wrapper.find('textarea')).toHaveLength(0);
+ wrapper.unmount();
+ });
+});
diff --git a/test/unit/community-project-code.test.jsx b/test/unit/community-project-code.test.jsx
index 81a4685a1be..24c03d28904 100644
--- a/test/unit/community-project-code.test.jsx
+++ b/test/unit/community-project-code.test.jsx
@@ -116,6 +116,7 @@ const mockApi = (project, {last = lastCommits} = {}) => {
jest.spyOn(api, 'pulls').mockResolvedValue({pulls: [{index: 1, state: 'open'}, {index: 2, state: 'closed'}]});
jest.spyOn(api, 'releases').mockResolvedValue({releases: [{id: 'r1'}]});
jest.spyOn(api, 'commitSummaries').mockResolvedValue({summaries: {}});
+ jest.spyOn(api, 'getComments').mockResolvedValue({comments: [], issueCounts: {open: 2, done: 1}});
jest.spyOn(api, 'commitFile').mockResolvedValue({content: btoa('sprite "Cat";')});
if (last) jest.spyOn(api, 'commitLastCommits').mockResolvedValue(last);
else jest.spyOn(api, 'commitLastCommits').mockRejectedValue(new Error('not found'));
@@ -131,6 +132,9 @@ describe('project developer view helpers', () => {
expect(codeLocation('')).toEqual({tab: 'code', kind: 'tree', path: ''});
expect(codeLocation('commits')).toEqual({tab: 'commits', kind: 'tree', path: ''});
expect(codeLocation('tree/Cat/assets')).toEqual({tab: 'code', kind: 'tree', path: 'Cat/assets'});
+ expect(codeLocation('issues')).toEqual({tab: 'issues', kind: 'tree', path: ''});
+ expect(codeLocation('issues/12')).toEqual({tab: 'issues', kind: 'issue', path: '', number: 12});
+ expect(codeLocation('issues/abc')).toEqual({tab: 'issues', kind: 'tree', path: ''});
expect(codeLocation('blob/Cat/main.fractch')).toEqual({tab: 'code', kind: 'blob', path: 'Cat/main.fractch'});
expect(codeLocation('unknown')).toEqual({tab: 'code', kind: 'tree', path: ''});
});
@@ -179,7 +183,8 @@ describe('project developer view page', () => {
expect(wrapper.find('h1').text()).toBe('mist/Space game');
const tabs = wrapper.find('[role="tab"]').map(tab => tab.text());
- expect(tabs).toEqual(['Code', 'Commits3', 'Branches2', 'Pull requests1', 'Releases1']);
+ expect(tabs).toEqual(['Code', 'Issues2', 'Commits3', 'Branches2', 'Pull requests1', 'Releases1']);
+ expect(wrapper.text()).toContain('2 open issues');
expect(commitTree).toHaveBeenCalledWith('project-1', sha('a'));
expect(api.commitLastCommits).toHaveBeenCalledWith('project-1', sha('a'));
const rows = rowTexts(wrapper);
@@ -319,11 +324,34 @@ describe('project developer view page', () => {
await settle(wrapper);
act(() => {
- wrapper.find('[role="tab"]').at(1)
+ wrapper.find('[role="tab"]').at(2)
.simulate('click');
});
await settle(wrapper);
expect(currentLocation.pathname).toBe('/project/project-1/code/commits');
+ act(() => {
+ wrapper.find('[role="tab"]').at(1)
+ .simulate('click');
+ });
+ await settle(wrapper);
+ expect(currentLocation.pathname).toBe('/project/project-1/code/issues');
+ });
+
+ test('opens an issue thread from its address and hides the tab when issues are off', async () => {
+ mockApi(baseProject());
+ let wrapper = mountAt('/project/project-1/code/issues/4');
+ await settle(wrapper);
+ expect(api.getComments).toHaveBeenCalledWith('project-1', {all: true, issue: 'any', number: 4});
+ expect(wrapper.text()).toContain('Issue not found');
+ wrapper.unmount();
+
+ jest.restoreAllMocks();
+ mockApi(baseProject({issuesOff: true}));
+ api.getComments.mockResolvedValue({comments: [], issueCounts: {open: 0, done: 0}});
+ wrapper = mountAt('/project/project-1/code');
+ await settle(wrapper);
+ expect(wrapper.find('[role="tab"]').map(tab => tab.text())).not.toContain('Issues0');
+ wrapper.unmount();
});
test('plays the project in the sidebar only once asked', async () => {
diff --git a/test/unit/functions/middleware.test.js b/test/unit/functions/middleware.test.js
index d47d617147c..ad77e842c0f 100644
--- a/test/unit/functions/middleware.test.js
+++ b/test/unit/functions/middleware.test.js
@@ -388,6 +388,8 @@ describe('rewritten pages', () => {
'/project/1/pulls/2/extra',
'/project/1/code/unknown',
'/project/1/code/blob',
+ '/project/1/code/issues/abc',
+ '/project/1/code/issues/2/extra',
'/users/alice/unknown',
'/spaces/abc/unknown',
'/mystuff/project'
@@ -530,7 +532,9 @@ describe('project pages', () => {
['/code', 'Developer view'],
['/code/commits', 'Developer view'],
['/code/tree/Cat/assets', 'Developer view'],
- ['/code/blob/Cat/main.fractch', 'Developer view']
+ ['/code/blob/Cat/main.fractch', 'Developer view'],
+ ['/code/issues', 'Developer view'],
+ ['/code/issues/12', 'Developer view']
])('sub-page %s', async (rest, suffix) => {
stubApi({[`${API}/projects/1`]: sharedProject()});
const meta = await renderPath(`/project/1${rest}`);
@@ -607,7 +611,8 @@ describe('vanity project pages', () => {
['/pulls', 'Pull requests'],
['/commits/abc', 'Commit'],
['/code', 'Developer view'],
- ['/code/blob/Stage/main.fractch', 'Developer view']
+ ['/code/blob/Stage/main.fractch', 'Developer view'],
+ ['/code/issues/3', 'Developer view']
])('sub-page %s', async (rest, suffix) => {
stubApi({
[`${API}/vanity/cool-game`]: {id: '55'},