-
Improvement
-
Resolution: Fixed
-
Minor
-
4.5
-
MOODLE_405_STABLE
-
MOODLE_405_STABLE
-
MDL-82212-main -
-
5
-
HQ 2024 Sprint I3.1 Moppies
While working on MDL-77754 to improve the Font Awesome icons and take advantage of the new ones in 6, a few icons have been marked as candidates for being deprecated because:
- They are not used in Moodle LMS (and hardly used by third-party plugins too).
- They are duplicated and could be merged, to make them easier to maintain. For instance, i/hide and t/hide use the same icon and, looking at https://docs.moodle.org/dev/Using_images_in_a_theme#Image_locations_within_Moodle , both folders are for "General icons", so one of them could be removed (in favour of the other).
A deprecation mechanism should be defined and implemented for icons, to help developers to detect them.
This mechanism, similar to what was done in MDL-78334 for CSS:
- Add a method, get_deprecated_icons(), to icon_system to return an array with the deprecated key icons (for instance, core:a/download_all):
public function get_deprecated_icons(): array {
return [
'core_a/download_all';
];
}
- Implement this method in the icon_system_fontawesome class.
- Use the same methodology in
MDL-78334for CSS, to identify where someone uses a deprecated icon. Make the duplication warning optional using debug developer mode. - Add some JS snippet run in the footer when debug developer mode is enabled, to display a console warning for deprecated icons:
document.querySelectorAll('.icon.deprecated').forEach((icon) => {
window.console.warn("Deprecated icon found: " + icon.className);
});
- Document it in devdocs.
- blocks
-
MDL-82460 Deprecate unused pix icons
- Open
- has a non-specific relationship to
-
MDL-77754 UX · Create Figma icon library for the new Font Awesome 6.3 icons version
- Closed
- has been marked as being related by
-
MDL-66239 Document various deprecation processes
- Open
- links to
- mentioned in
-
Page Loading...