Problem/Motivation

The module's UI and documentation can be improved:
- improve menu appearance
- use more consistent UI labels
- add more documentation
- use README template
- remove "entity" from UI labels
- use "path" consistent
- consistent route
- use views for overview
- consistent casing

CommentFileSizeAuthor
#17 Screenshot From 2026-08-28 11-14-30.png29.09 KBarjenk

Issue fork path_file-3538124

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

batigolix created an issue. See original summary.

batigolix’s picture

Title: Improve UX » Improve UX & documentation
Issue summary: View changes

batigolix’s picture

Issue summary: View changes
batigolix’s picture

Issue summary: View changes
batigolix’s picture

Issue summary: View changes
batigolix’s picture

Issue summary: View changes
batigolix’s picture

Assigned: Unassigned » batigolix
batigolix’s picture

Status: Active » Needs review
Issue tags: +UX, +Documentation
batigolix’s picture

Assigned: batigolix » Unassigned
batigolix’s picture

Priority: Normal » Major
arjenk’s picture

Status: Needs review » Needs work

Reviewed and manually tested MR !16. Clear improvements, the move to /admin/content makes sense.

Some minor findings:

  • allowed_extensions default belongs in config, not just the form. The default is set only on the form display:
    '#default_value' => $config->get('allowed_extensions') ?: 'pdf doc docx txt',. If an admin never opens the settings form, path_file.settings:allowed_extensions stays empty. An empty file_extensions means no extension restriction (any file type uploadable). Add a config/install/path_file.settings.yml with allowed_extensions: 'pdf doc docx txt'.
  • README still use references to 'entity/entities'
  • info.yml description says "Creates a new content type which can will render a file at the given path.". You can remove the 'will'. How about: "Lets editors upload files and serve them at a given path."
  • maybe out of scope, but the file extentions now do a regex, but Drupal normally uses a validator ('#element_validate' => [['Drupal\file\Plugin\Field\FieldType\FileItem', 'validateExtensions']]). Reusing it also allows . and _ (e.g.
    tar.gz), comma separators
batigolix’s picture

Version: 2.0.0 » 2.1.1

  • 34110e5d committed on 2.1.x
    Issue #3538124 by batigolix: Inject entity type manager instead of...

  • 34110e5d committed on 2.0.x
    Issue #3538124 by batigolix: Inject entity type manager instead of...
batigolix’s picture

Status: Needs work » Needs review

I fixed the mentioned problems. This can be reviewed again

arjenk’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new29.09 KB

Reviewed and tested locally; tests are green, also with the current 2.1.x merged. The mentioned problems are solved.

One left over occurrence in the UI of 'entity':
There are no path files entities yet.

Otherwise all good.

batigolix’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -finalist-sprint, -UX, -Documentation

Top! Many Thank

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.