Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294704

Add a setting on "Table of files" and "Generic files" formatters to use files descriptions (or not)

$
0
0

Problem/Motivation

When you create a file field, you can enable the description field for each file. This field description is supposed to override the file name on display.
It is working properly with the "Generic file" formatter but not with the "Table of files" formatter.

More than just fixing this bug (it was working in 7.x) we decided to add a setting on the concerned formatters to let the site builder choose if she wants the file name to be overriden by the description.

Proposed resolution

- pass the file description to the theme so it can be used instead of the file name
- add a setting to the "Generic file" formatter to use the description when available
- add a setting to the "Table of files" formatter to use the description when available
- add an upgrade path to disable the new settings for existing "Table of files" formatters (Backward Compatibility)
- increase test coverage to ensure these new settings are working

Remaining tasks

Contributor tasks needed
TaskNovice task?Contributor instructionsComplete?
Create a patchInstructionsDone
Update the issue summaryInstructionsDone
Add automated testsInstructionsDone
Manually test the patch NoviceInstructionsDone
Embed before and after screenshots in the issue summary NoviceInstructions
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standardsInstructionsDone

User interface changes

A new setting allows the site builder to define if she want the file name to be overriden by the description when it's available.
The file description is shown, when available and when the formatter allows it, instead of the file name when using the "Table of files" or "Generic files" formatter.

API changes

None.

Data model changes

A new setting on the file_table and file_default formatters.


Viewing all articles
Browse latest Browse all 294704

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>