Skip to content

Reduce repository size: remove FontAwesome (2.7 MB, 4 icons) and dead KingTable code (~200 KB) #258

Description

@Martin-1997

Reduce repository size: remove FontAwesome (2.7 MB, 4 icons) and dead KingTable code (~200 KB)

Context

The repo is ~5.7 MB. Two chunks totalling ~3.0 MB (≈52%) can be removed with no framework change and no functional change, other than swapping four icons to Nextcloud-native equivalents. This issue is scoped to be low-risk and independently shippable.

Best landed after the testing/CI issue so the change is verified by CI, and before the @nextcloud/vue migration issue.

Part A — Delete dead KingTable code (zero behaviour change)

KingTable is shipped but imported nowhere; Tabulator is the table library actually in use across all data views. Confirmed: no references in js/src/*.js, templates/, js/webpack.config.js, js/package.json, or Makefile.

  • Delete js/src/kingtable.js (130 KB)
  • Delete css/kingtable.css (73 KB)
  • Grep the tree once more for kingtable / KingTable to confirm nothing else references it

Part B — Remove FontAwesome, replace 4 icons with native

FontAwesome ships 2.7 MB of fonts + a 67 KB stylesheet but is used for only 4 distinct icons in 9 places.

B1 — Replace the icon usages

Suggested mapping to Nextcloud core icon-* CSS classes (these theme automatically and work in both PHP templates and JS-generated HTML strings). Verify each visually on the live instance — swap to an inline MDI SVG if any class doesn't match in the target NC version.

FontAwesome Native class Meaning
fa fa-calendar icon-calendar-dark date-range picker trigger
fa fa-caret-down icon-triangle-s date-range picker caret
fa fa-edit icon-rename table row edit button
fas fa-folder icon-folder Select2 placeholder

Exact locations to change:

PHP templates (calendar + caret-down, the date-range picker header):

  • templates/content/reports.php:24-25
  • templates/content/dashboard.php:13-14
  • templates/content/index.php:60-61
  • templates/content/timelines.php:47-48

JS (edit icon in Tabulator column formatters — HTML strings):

  • js/src/tags.js:94
  • js/src/timelines-admin.js:97
  • js/src/clients.js:104
  • js/src/goals.js:98

JS (folder placeholder):

  • js/src/timer.js:435

B2 — Remove the assets and the include

  • Remove style('timetracker', 'all'); from templates/index.php:5
  • Delete css/all.css (67 KB, FontAwesome CSS)
  • Delete the webfonts/ directory (2.7 MB)
  • Grep for any remaining fa fa- / fas fa- / far fa- / webfonts / all.css references

Definition of Done

  • webfonts/, css/all.css, css/kingtable.css, js/src/kingtable.js deleted
  • style('timetracker','all') removed from templates/index.php
  • All 9 FontAwesome usages replaced with native icons
  • npm run build (webpack) succeeds with no new errors
  • Repository shrinks by ~3 MB

Testing (live instance)

Load each view and confirm the icons render and there are no 404s (for removed webfonts/all.css) or console errors:

  • Timer / main (templates/content/index.php): date-range picker shows calendar + caret icons; manual-entry dialog opens
  • Reports, Dashboard, Timelines: date-range picker icons render
  • Tags, Clients, Goals, Timelines-admin: Tabulator rows show the edit (pencil) icon and it still triggers edit
  • Timer: the folder placeholder renders in its Select2 control
  • Browser console: no 404s for webfonts/* or css/all.css, no new JS errors
  • Dark mode / theming: swapped icons still visible (native icon-* classes should adapt automatically)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions