spacedrive/interface/components
Aditya 08ba4f917a
Extending QuickPreview functionality with additional filetype support (#1231)
* added some files `standard` mime type

* Used `TEXTViewer` Component to show Code Preview

* Update Thumb.tsx

* added `prismjs`

* removed unnecessary comment

* `CODEViewer` Component for Syntax Highlighting

* formatting

* using **Atom** Theme for `Prism`

* merge text/code viewers & bg-app-focus for prism

currently calling onError and onLoad without an Event argument
that should change but i'm not really sure what to do there

* removed unused imports

* Update index.ts

* `TEXTViewer` to `TextViewer_`

* `TextViewer_` to `TextViewer`

* Don't highlight normal TextFiles

* clean code

* `TEXTViewer` to `TextViewer`

* using tailwind classes more

* doing things correctly.

* installed `prismjs` in interface

* using own scroller

* Update Thumb.tsx

* Add an AbortController to the fetch request
 - Fix onError and onLoad calls
 - Format code

* Fix onError being called when request was aborted due to re-render
 - Fix Compoenent re-rendering loop due to circular reference in useEffect
 - Remove unused imports

* Improve text file serving and code syntax highlight
 - Implement way to identify text files in file-ext crate
 - Do not depend only on the file extension to identify text files in custom_uri
 - Import more prismjs language rules files
 - Add line numbers to TextViewer when rendering code

* Clippy and prettier

* Fix reading zero byte data to Vec
 - Improve empty file handling

* Expand code highlight to more file types
 - Fix 10MB when it should be 10KB
 - Add supported for more code and config files extensions to sd-file-ext
 - Add comlink and vite-plugin-comlink for easy js worker integration
 - Move Prismjs logic to a Worker, because larger files (1000+ lines) where causing the UI to hang
 - Replace line-number prismjs plugin with our own implementation

* Fix uppercase extension name

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: pr <pineapplerind.info@gmail.com>
Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-08-29 10:47:04 +00:00
..
TextViewer Extending QuickPreview functionality with additional filetype support (#1231) 2023-08-29 10:47:04 +00:00
AlertDialog.tsx Formatting (Prettier + Rustfmt 1.72) (#1246) 2023-08-24 20:34:52 +00:00
AssignTagMenuItems.tsx [ENG-300] Explorer multi-select (#1197) 2023-08-15 08:23:41 +00:00
Codeblock.tsx [ENG-380] Interface code structure improvement (#581) 2023-02-27 21:29:48 -08:00
ColorPicker.tsx [ENG-591] - Fix some funky behaviors (#827) 2023-05-20 03:11:10 +00:00
DismissibleNotice.tsx [ENG-1013] prevent explorer parent context menu on DismissibleNotice (#1261) 2023-08-28 12:38:47 +00:00
DragRegion.tsx [ENG-380] Interface code structure improvement (#581) 2023-02-27 21:29:48 -08:00
Folder.tsx [ENG-974] DB Backup prototype (#1216) 2023-08-17 05:37:10 +00:00
GridList.tsx [ENG-1015] fix view fetching (#1264) 2023-08-28 16:05:55 +00:00
index.ts Extending QuickPreview functionality with additional filetype support (#1231) 2023-08-29 10:47:04 +00:00
PasswordMeter.tsx Upgrade rspc TS (#775) 2023-05-04 06:21:42 +00:00
PDFViewer.tsx [ENG-651] Fix PDF rendering breaking app on macOS (#854) 2023-05-25 06:34:18 +00:00
SubtleButton.tsx [ENG-380] Interface code structure improvement (#581) 2023-02-27 21:29:48 -08:00
TrafficLights.tsx [ENG-469] Make Prettier and ESLint work together (#706) 2023-04-14 21:21:21 +00:00