Review legacy-wmd.less
Update 2024: This file can be completely removed if we migrate to a better editor per #7308
Description
legacy-wmd.less is loaded in legacy.less on all pages in the style tag at the top of the page, but it likely only ever used on pages where you can edit this content. Much of it is can likely be loaded via JavaScript (buttons for example wmd-help-button are good candidates).
We should review this file, and pull out it's parts into a component associated with markdown textareas.
Proposal & Constraints
We should review this file, and pull out it's parts into a component associated with markdown textareas. The end result should be less bytes of CSS in pages loading legacy.less
The CSS for this feature should only be loaded as part of the markdown-editor entry point
We should be careful not to introduce flashes of unstyled content during the loading process.
Stakeholders
@cdrini
Parts of that file look like they were copied from https://github.com/internetarchive/wmd/blob/55904c7aa0ec75981713ef0813e2c85530755574/wmd.css . It would be best to try to remove our copy of it and use that file directly.
Assigning jdlrobson (not tagging as requested) per slack discussions
@jdlrobson I would like to work on this issue. If you could guide me on what all changes do I need to make?
Parts of that file look like they were copied from https://github.com/internetarchive/wmd/blob/55904c7aa0ec75981713ef0813e2c85530755574/wmd.css . It would be best to try to remove our copy of it and use that file directly.
Do I just need to replace legacy-wmd.less with this file?
The bulk of this task is about auditing the code and understanding how the styles are being used.
Once the audit of everything using it is done, write a report with recommendations on this issue and help us agree an approach.
This analysis would at a minimum:
- Explain the implications of removing legacy-wmd.less: what regress in the UI? What pages?
- Make recommendations for avoiding those regressions
- Eventually removing legacy-wmd in favor of https://github.com/internetarchive/wmd/blob/55904c7aa0ec75981713ef0813e2c85530755574/wmd.css as you say.
Assignees removed automatically after 14 days.