Skip to content

fix(admin-mods): modernize mods list and forms (#1552) - #1552

Merged
rumblefrog merged 4 commits into
sbpp:mainfrom
maxijabase:feat/mods-list-compact-actions
Sep 6, 2026
Merged

rumblefrog merged 4 commits into
sbpp:mainfrom
maxijabase:feat/mods-list-compact-actions

Conversation

@maxijabase

@maxijabase maxijabase commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Brings the admin Mods surfaces in line with the rest of the v2 panel list / form chrome.

List mods (?p=admin&c=mods&section=list)

  • Dense table--compact desktop table (less vertical padding per row).
  • Icon-only row actions (pencil / trash-2) with data-tooltip + aria-label, matching banlist / admins.
  • Page-level Mods (N) title outside the card (same shape as Admins).
  • Mobile card mirror (.mods-list-cards) so the table is not hidden and does not force horizontal scroll under 768px. Delete removes both the desktop row and the mobile card.

Add mod (section=add)

  • Page-level Add mod title + subtitle outside the card (no title trapped in card__header).

Edit mod (o=edit)

  • Removes the empty AdminTabs Back strip that left dead space above the form (redundant with the footer Back next to Save).
  • Page-level Edit mod · <name> title + subtitle, matching Edit admin / Edit ban.

Motivation and Context

Mods list / add / edit still used the older “title inside the card + text Edit/Delete + keep-mobile table” shape after bans, comms, and admins moved to compact tables, icon actions, page titles, and mobile cards. This PR closes that visual and responsive gap without changing mod semantics or APIs.

How Has This Been Tested?

  • Local Docker panel at :8080
  • Manual check: list (desktop + narrow viewport), add, edit
  • Existing E2E/integration hooks (mod-row, deletemod-btn, mod-delete dialog) kept; count badge format now (N) like admins

Screenshots (if appropriate):

Before

RB3SxxykDV.mp4

After

chrome_XpOmzWRTum.mp4

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@maxijabase
maxijabase requested a review from a team August 5, 2026 23:33
@Rushaway Rushaway changed the title Polish admin Mods list, add, and edit chrome feat(admin-mods): modernize mods list and forms (#1552) Aug 9, 2026
@Rushaway Rushaway changed the title feat(admin-mods): modernize mods list and forms (#1552) fix(admin-mods): modernize mods list and forms (#1552) Aug 9, 2026

global $userbank, $theme;

new \Sbpp\View\AdminTabs([], $userbank, $theme);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflicts with current convention, adding this back.

Comment thread web/pages/admin.mods.php
// mid=0 is the reserved Web pseudo-mod, not a configurable game mod.
$mod_list = $GLOBALS['PDO']->query("SELECT * FROM `:prefix_mods` WHERE mid > 0 ORDER BY name ASC")->resultset();
$mod_count = (int) $GLOBALS['PDO']->query("SELECT COUNT(mid) AS cnt FROM `:prefix_mods`")->single()['cnt'];
$mod_count = (int) $GLOBALS['PDO']->query("SELECT COUNT(mid) AS cnt FROM `:prefix_mods` WHERE mid > 0")->single()['cnt'];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to exclude the pseudo mod

*/
public function __construct(
public readonly bool $permission_listmods,
public readonly bool $permission_addmods,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was missing

@rumblefrog
rumblefrog force-pushed the feat/mods-list-compact-actions branch from 0cf6b04 to bd8e3ac Compare September 6, 2026 20:27
@rumblefrog
rumblefrog disabled auto-merge September 6, 2026 20:44
@rumblefrog
rumblefrog merged commit a46288b into sbpp:main Sep 6, 2026
7 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants