Repository navigation
Dumbcourse: the topic actions staff have on the full site - #363
Merged
Merged
Conversation
Dumbcourse's topic menu had close, pin, archive, unlist and delete. It
now offers everything in Discourse's topic admin menu.
New actions:
- pin in the category or globally, until a date or with no end;
- make or remove a banner;
- convert to a private message and back to a public topic;
- topic timers: close, open, delete, bump, delete replies and publish to a
category, at a time or after the last reply;
- change timestamp and reset bump date;
- topic slow mode;
- delete permanently.
Each item shows under core's own condition (topic-admin-menu.gjs, the
timer types from edit-topic-timer.gjs) and calls the endpoint core's menu
calls, so the server's checks are unchanged. Times are picked from a short
list or typed as a date, for keypads.
The staff items live in views/topic-staff.ts; the topic view only adds
them under Moderation. Its toasts say what happened ("Topic closed.")
rather than "Done."
…taff Staff can now do from Dumbcourse what the full site's staff menus do: select posts to move, merge, re-own or delete; the post admin menu and this plugin's post tools; a post's edit history; the admin user page's actions from a member's profile; and the review queue's filters, claiming, flag details, notes and queued-post editing. The review queue also reads Discourse's side-loaded actions again, so each item shows them.
Topic tags, shared drafts, nested replies and review history; publish as a page, nested reply pins and edit visibility for posts; whispers to a member, group or badge's holders; a member's title, username, email, primary group, penalty history, bounce score, sign-in accounts, DiscourseConnect record and other accounts on their address; and the review queue's remaining filters, history, DSA classification, the post's fate with a penalty, and flag reason priorities.
Lock and wiki send "true"/"false" and merge sends ids as text, as core reads them. Flag reasons are read from the side-loaded score types. A topic's author has their own delete and tag items outside Moderation. The specs wait for a revisited topic's fresh copy before pressing keys, and expect a hand-set trust level to be locked.
Change timestamp takes a date in the past. Clear penalty history adds up the silences and suspensions Discourse sends, which come without a total. A thousand-year penalty reads as forever.
Move to an existing topic by date sends chronological_order as the text "true", which is what core checks for; a JSON true was ignored.
A revisited topic shows its saved copy first and takes keys once the fresh copy is in, when the right soft key reads Options. Wait for that instead of pressing until a menu opens: a check left to time out fails the spec under Discourse's timeout rule even when everything passed.
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dumbcourse's topic menu had close, pin, archive, unlist and delete. It now offers everything in Discourse's topic admin menu.
New actions:
Each item shows under core's own condition (topic-admin-menu.gjs, the timer types from edit-topic-timer.gjs) and calls the endpoint core's menu calls, so the server's checks are unchanged. Times are picked from a short list or typed as a date, for keypads.
The staff items live in views/topic-staff.ts; the topic view only adds them under Moderation. Its toasts say what happened ("Topic closed.") rather than "Done."
Summary
Affected module(s)
Test plan
Checklist
pnpm lintis cleanbundle exec rubocopis cleanconfig/locales/server.en.ymlorclient.en.yml