Patch #40137
closed
Jstoolbar help files should import images from the asset pipeline
Added by Marius BĂLTEANU 10 months ago.
Updated 9 months ago.
Description
jstoolbar help files are pure html static files that are importing the images using html image elements, for example:
<img src="../../images/jstoolbar/bt_img.png" style="border: 1px solid #bbb;" alt="Image" />
We need to update these files in order to use the images generated by the asset pipeline. I see 2 options:
1. move all these images as CSS background images
2. refactor all help files in order to use a template that is rendered on server side. If we do this, it will make also easier to modify that files because you don't need to make the same change in all help files.
Files
- Related to Feature #39111: Enable Asset Pipeline Integration using Propshaft added
I've started working on this and I'm attaching an intermediary version of the patch series:
0001-Add-route-to-serve-all-wiki-syntax-help-files-from-v
- Introduces
HelpController
and a new route help/wiki_syntax/(:detailed)
to serve help files
- Moves all wiki syntax help files to
app/views/help
and CSS files to app/assets/stylesheets
0002-Reorganizare-wiki-syntax-help-files-per-text-formatt
- Reorganize all the help files per text formatter (
markdown
, common_mark
and textile
)
0003-Remove-languages-from-wiki-syntax-help-files-that-ar (inspired from common_mark implementation)
- Remove languages from wiki syntax help files that are identical with en language.
- Fall back to the english help page if there is none for the current language.
0004-Point-JS-toolbar-Help-button-to-new-route
- Changes JS toolbar help button to use the new route
0005-Add-erb-extension-to-all-wiki-syntax-help-files
- Just add the erb extension to all files.
0006-Move-img-border-definition-to-CSS-file
- Move inline style for img border to css file to cleanup a little bit the view files.
0007-Include-css-file-from-asset-pipeline
- Includes the css file from the asset pipeline.
Still need to finish:
- Update link that points to detailed version.
- Include images using
image_tag
.
- Add tests for new route and
HelpController
.
I hope I will finish this until the end of this month.
Added last two patches that get rid of the static image tags and links.
I've committed all the patches, still need to add tests.
- Category set to Text formatting
- Status changed from New to Closed
- Assignee set to Marius BĂLTEANU
- Resolution set to Fixed
I think I've finished all the minimum changes in order to restore the old functionality.
- Tracker changed from Defect to Patch
- Resolution deleted (
Fixed)
- Related to Patch #40559: Fix incorrect icon image paths for Wiki help pages added
Also available in: Atom
PDF