- 🇮🇳India niranjan_panem Gurugram
In drupal 11 claro theme suffix for file-size is not added in preprocess_image_widget. Below is the screen shot of it.
- 🇺🇸United States bnjmnm Ann Arbor, MI
@niranjan_panem that is correct because, as the issue summary states Claro's file-link template always displays file_size
The template is where the issue lies
The preprocess in the issue summary was explaining how other themes addressed this in the past.
- 🇺🇸United States dafeder Philadelphia, PA
What is the argument against wrapping the whole span in a conditional to check if file_size is set? This is how it is handled in the core twig template for file module. There are other contexts when that variable might be empty, and you wouldn't want to show the parentheses if there's nothing between them. Likewise, if you want to hide it you could just unset that variable via preprocess.
- Merge request !13334Issue #3117430 by mfb: file-link template should not always display file_size → (Open) created by mfb