reposilite
reposilite copied to clipboard
GH-1003 Reimplement code snippets in UI
Fix #1003
Hmm I see one thing that is kinda problematic. Bundle size is x2 bigger than it was before:
? 987 modules transformed.
rendering chunks...
build/frontend/reposilite-frontend/index.html 1.70 KiB
build/frontend/reposilite-frontend/assets/index.395dd189.css 51.59 KiB / gzip: 9.33 KiB
build/frontend/reposilite-frontend/assets/index.512c4994.js 629.31 KiB / gzip: 216.66 KiB
After:
> Task :reposilite-frontend:buildFrontend
? 1186 modules transformed.
rendering chunks...
build/frontend/reposilite-frontend/index.html 1.70 KiB
build/frontend/reposilite-frontend/assets/index.310f997f.css 54.10 KiB / gzip: 9.68 KiB
build/frontend/reposilite-frontend/assets/index.df79b065.js 1632.45 KiB / gzip: 505.17 KiB
Resource-wise we should probably just get rid of any highlight library 🤔
Maybe it would be a better option to don't use an editor library at all. It should be relatively easy to implement the code snippets manually. The highlighting could be "hardcoded" because the highlighted text doesn't change.
Yeah, we've used highlighting library, because in the earlier version of 3.x we had configuration editor in Settings
tab, but since we've replaced it with forms, it's no longer needed.
Main visual changes:
- no line numbers
- vertical scrolling instead of line wrapping
Looks fine, thanks!