openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Review legacy-wmd.less

Open jdlrobson opened this issue 6 years ago • 5 comments

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

jdlrobson avatar Sep 08 '19 18:09 jdlrobson

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.

cdrini avatar Sep 09 '19 13:09 cdrini

Assigning jdlrobson (not tagging as requested) per slack discussions

xayhewalo avatar Nov 22 '19 00:11 xayhewalo

@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?

SaravgiYash avatar Jan 12 '21 08:01 SaravgiYash

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.

jdlrobson avatar Jan 14 '21 02:01 jdlrobson

Assignees removed automatically after 14 days.

github-actions[bot] avatar Jan 25 '24 08:01 github-actions[bot]