Skip to content

[3.0] Add drag-and-drop package selection - #9907

Open
boredskull wants to merge 1 commit into
SimpleMachines:release-3.0from
boredskull:feature/package-manager-drag-drop-upload
Open

boredskull wants to merge 1 commit into
SimpleMachines:release-3.0from
boredskull:feature/package-manager-drag-drop-upload

Conversation

@boredskull

Copy link
Copy Markdown

Description

This pull request introduces drag-and-drop package selection to the SMF 3.0 Package Manager as an initial step towards modernising the package management experience.

Although SMF's underlying package management system has evolved considerably, the administrative interface has retained much of its traditional workflow across successive major versions.

With SMF 3.0 introducing significant architectural improvements, this presents an opportunity to improve the usability and accessibility of package management while retaining the existing installation system.

Changes introduced

1. Drag-and-drop package selection

Administrators can now select a package by dragging a file from their computer into the designated upload area.

  • Supports selecting a single package file through drag-and-drop.
  • Retains the traditional file selection button.
  • Continues to use the existing Upload button to submit the selected package.
  • Restricts the file picker's suggested formats to .zip, .tgz and .tar.gz.
  • Prevents the browser's normal file-opening behaviour when a file is dropped onto the upload area.
  • Does not automatically initiate an installation or upload when a file is dropped.

2. Accessibility improvements

The upload interface has been updated to improve accessibility and clarity.

  • Associates the file input with its corresponding label.
  • Uses an aria-live="polite" region to announce the selected filename to assistive technologies.
  • Preserves the standard keyboard-accessible file selection control.
  • Maintains the normal upload workflow when JavaScript is unavailable.
  • Provides a clear description of the drag-and-drop functionality.

The intention is to improve the experience for administrators without requiring a particular input method.

3. Language support

A new language string has been introduced in Languages/en_US/Packages.php:

package_upload_drop_hint

This provides the upload area's instructions through SMF's existing language system, allowing translations to be added without modifying the package manager template.

4. Existing package functionality is preserved

The change is deliberately limited to the package upload interface.

It does not alter:

  • Package installation or uninstallation processing.
  • Server-side package validation.
  • Package compatibility checks.
  • Session token handling.
  • Administrator permissions.
  • Package database records.
  • Existing package file handling.
  • Package download functionality.

The standard form submission remains in place, allowing the existing SMF package manager to process uploaded files as before.

Files modified

  • Themes/default/Packages.template.php
  • Languages/en_US/Packages.php

No additional libraries, dependencies, database migrations or configuration settings are introduced.

Rationale

The package manager is an important part of SMF's administration interface, yet uploading and managing packages continues to rely on a largely traditional workflow.

Modern administrators increasingly expect straightforward file selection, clear feedback and accessible controls.

Introducing drag-and-drop selection provides a relatively small usability improvement without requiring changes to the established package installation engine.

This contribution is intended to be native SMF 3.0 functionality rather than a dependency on an external modification.

It may also provide a starting point for considering additional package manager interface improvements during SMF 3.0 development, subject to the development team's preferences.

Compatibility and testing

The proposed change targets the release-3.0 development branch.

The GitHub source diff has been reviewed to confirm that the changes are confined to the upload template and language strings.

The following checks remain necessary before merging:

  • Confirm successful drag-and-drop selection of supported package files.
  • Confirm that selecting files using the traditional file picker continues to work.
  • Verify normal upload and installation behaviour.
  • Check keyboard-only navigation.
  • Check screen reader announcements.
  • Verify behaviour across supported browsers.
  • Confirm that unsupported or malformed packages continue to be handled by existing server-side validation.
  • Run the relevant SMF coding standards and automated test suites.

No live SMF 3.0 integration testing or comprehensive browser accessibility testing has yet been completed.

Future considerations

This pull request is intentionally focused on package selection rather than a complete package manager redesign.

Further improvements could include clearer package status indicators, a more informative package management dashboard, improved installation feedback and a more consistent administrative workflow.

Those changes would be better considered separately to keep this contribution straightforward to review and maintain.

Issues References (Fixes|Related|Closes)

No existing issue is directly referenced.

This pull request proposes a usability and accessibility enhancement to the native SMF 3.0 Package Manager.

Add a native, progressively enhanced drop target to the existing
package upload form while keeping standard file selection and the
existing server-side upload and validation workflow unchanged.

Signed-off-by: boredskull <boredskullgaming@gmail.com>
@github-actions github-actions Bot added Theme Localization Language & internationalization labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Localization Language & internationalization Theme

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant