various moderation fixes and improvements (#4061)

* Typo correction

* show optimization button when present in additional categories

* add more formatted link shortcuts

* Add info text to env info stage

* Only show gallery relevancy button when relevant.

* add unsupported project type message to versions stage

* Fix misuse of slug message.

* Update unsupported_project.md

* lint fix
This commit is contained in:
coolbot 2025-07-28 05:56:47 -07:00 committed by GitHub
parent 8804478221
commit 13103b4950
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 43 additions and 6 deletions

View File

@ -0,0 +1,2 @@
**Client:** `%PROJECT_CLIENT_SIDE%` \
**Server:** `%PROJECT_SERVER_SIDE%`

View File

@ -1,3 +1,5 @@
## Misuse of Slug
## Misuse of custom URL
Per section 5.2 of %RULES% must accurately represent your project.
We ask that you ensure your project's %PROJECT_SLUG_FLINK% accurately represents your project.
Your current slug of `%PROJECT_SLUG%` may not accurately match your project's Name or contain excess information.
A mismatched URL may make it more difficult for users to find your content. Abbreviations or similar are fine to use if applicable. If your preferred URL is not available, and you cannot find a matching public project, let us know in this moderation thread when you resubmit your project, and our moderation team may be able to free it up for your project.

View File

@ -3,6 +3,6 @@
## Private Use
Under normal circumstances, your project would be rejected due to the issues listed above.
However, since your project is not intended for for public use, these requirements will be waived and your project will be unlisted. This means it will remain accessible through a direct link without appearing in public search results, allowing you to share it privately.
However, since your project is not intended for public use, these requirements will be waived and your project will be unlisted. This means it will remain accessible through a direct link without appearing in public search results, allowing you to share it privately.
If you're okay with this, or submitted your project to be unlisted already, than no further action is necessary.
If you would like to publish your project publicly, please address all moderation concerns before resubmitting this project.

View File

@ -0,0 +1,7 @@
## Unsupported Project
Unfortunately, Modrinth does not currently support the upload of %INVALID_TYPE%.
If you would like to publish this project in the future and help Modrinth grow, consider creating an [issue](https://github.com/modrinth/code/issues) suggesting support for this type of content.
We appreciate your understanding and look forward to hosting your other creations.

View File

@ -31,7 +31,9 @@ const categories: Stage = {
weight: 701,
suggestedStatus: 'flagged',
severity: 'low',
shouldShow: (project) => project.categories.includes('optimization'),
shouldShow: (project) =>
project.categories.includes('optimization') ||
project.additional_categories.includes('optimization'),
message: async () =>
(await import('../messages/categories/inaccurate.md?raw')).default +
(await import('../messages/categories/optimization_misused.md?raw')).default,

View File

@ -25,6 +25,7 @@ const gallery: Stage = {
weight: 901,
suggestedStatus: 'flagged',
severity: 'low',
shouldShow: (project) => project.gallery && project.gallery.length > 0,
message: async () => (await import('../messages/gallery/not-relevant.md?raw')).default,
} as ButtonAction,
],

View File

@ -7,7 +7,8 @@ const sideTypes: Stage = {
id: 'environment',
icon: GlobeIcon,
guidance_url: 'https://modrinth.com/legal/rules#miscellaneous',
navigate: '/settings#side-types',
navigate: '/settings',
text: async () => (await import('../messages/checklist-text/side_types.md?raw')).default,
actions: [
{
id: 'side_types_inaccurate_modpack',

View File

@ -150,7 +150,24 @@ const versions: Stage = {
severity: `medium`,
weight: 1004,
message: async () => (await import('../messages/versions/broken_version.md?raw')).default,
},
} as ButtonAction,
{
id: 'unsupported_project_type',
type: 'button',
label: `Unsupported`,
suggestedStatus: `rejected`,
severity: `medium`,
weight: 1005,
message: async () =>
(await import('../messages/versions/unsupported_project.md?raw')).default,
relevantExtraInput: [
{
label: 'Project Type',
required: true,
variable: 'INVALID_TYPE',
},
],
} as ButtonAction,
],
}

View File

@ -317,6 +317,11 @@ export function flattenProjectVariables(project: Project): Record<string, string
vars[`PROJECT_PERMANENT_LINK`] = `https://modrinth.com/project/${project.id}`
vars[`PROJECT_SETTINGS_LINK`] = `https://modrinth.com/project/${project.id}/settings`
vars[`PROJECT_SETTINGS_FLINK`] = `[Settings](https://modrinth.com/project/${project.id}/settings)`
vars[`PROJECT_TITLE_FLINK`] = `[Name](https://modrinth.com/project/${project.id}/settings)`
vars[`PROJECT_SLUG_FLINK`] = `[URL](https://modrinth.com/project/${project.id}/settings)`
vars[`PROJECT_SUMMARY_FLINK`] = `[Summary](https://modrinth.com/project/${project.id}/settings)`
vars[`PROJECT_ENVIRONMENT_FLINK`] =
`[Environment Information](https://modrinth.com/project/${project.id}/settings)`
vars[`PROJECT_TAGS_LINK`] = `https://modrinth.com/project/${project.id}/settings/tags`
vars[`PROJECT_TAGS_FLINK`] = `[Tags](https://modrinth.com/project/${project.id}/settings/tags)`
vars[`PROJECT_DESCRIPTION_LINK`] =