Commit 86b2780
authored
Correctly preview non-text files (#1707)
* Package.resolved changed
* progress
* minor doc change in CodeEditUI EffectView
* add WorkspacePdfFileView
* allow WorkspacePdfFileView to be able to send data to SwiftUI
* properly name `WorkspacePdfFileView` to `WorkspacePDFView`
* improve WorkspacePDFView docs
* add guards to WorkspacePDFView (makeNSView, updateNSView)
* wip
* wip 2
* correct padding
* progress? not
* add attachPDFDocumentToView helper in WorkspacePDFView
* update WorkspacePDFView docs
* remove WorkspaceNonTextFileView
* fix SwiftLint violations in WorkspacePDFView, WorkspaceCodeFileView
* add magic numbers comment to WorkspaceCodeFileView
* update WorkspacePDFView docs
* before i forget
* progressss
* too slow
* wip: the best work yet
* it really works!!
* add WorkspaceImageView
* add WorkspaceCannotPreviewFileView
* its working very predictably but showing/hiding navigator pane isn't smooth
* remove the use of canPreview as it can cause unexpected behaviour
* remove computeFrame helper in WorkspaceCodeFileView
* update PDF preview's background color
* add note for when PDF preview cannot create PDF document
* improve docs for WorkspaceImageView & WorkspacePDFView
* use unnamed parameter for imageUrl in WorkspaceImageView
* implement `WorkspaceCannotPreviewFileView`
* change url variables in `WorkspaceImageView`, `WorkspacePDFView` & `WorkspaceCannotPreviewFileView` to private
* add `WorkspaceLoadingView`
* spacing violation
* change onAppear modifier in WorkspaceCannotPreviewFileView
* remove `WorkspaceCannotPreviewFileView` as it creates a bug that makes thumbnailing slightly unpredictable
Will use QLPreview instead
* improve docs in `WorkspacePDFView` & `WorkspaceImageView`
* use `WorkspaceAnyFileView` to preview GIF images
* add a note to the documentation for `CodeFileDocument.utType`
* add `WorkspaceAnyFileView` to properly preview files of different file types
* rearrange files in `CodeEdit/Features/Documents/Views`
* add `WorkspaceAnyFileView`, `WorkspaceLoadingView`, `WorkspaceImageView`, & `WorkspacePDFView` to DocC Documentation
* update docs in `WorkspaceAnyFileView`, `WorkspaceLoadingView`, `WorkspaceImageView`, & `WorkspacePDFView`
* rename `CodeFileDocument.typeOfFile` to `CodeFileDocument.utType`
* fix: allow GIF previews to play, and with their proper dimensions
* do not return
data UTType from CodeFileDocument.utType
* update docs for CodeFileDocument.utType
* change conformance from movie to audiovisualContent in CodeFileDocument.utType
* properly display CodeFileView contents by undo-ing the padding in its parent view
* remove text, image, PDF, video restrictions on `CodeFileDocument.utType`
* update docs in WorkspaceImageView
* WorkspaceCodeFileView: group non-text files, so they inherit modifiers from the parent Group view
* WorkspaceCodeFileView: add important note on document.utType
* remove SwiftUI VideoPlayer view for now, it creates a bug that I can't work around
- the first play click doesn't start the video, but the audio starts playing in the background, even after closing the editor tab
- and everything in-between
* add `NonTextFileView` to clean up code
- NonTextFileView, OtherFileView, URL+isImage, are not needed anymore
* remove QLPreviewItem subclass from CodeFileDocument
* rename `WorkspaceCodeFileView` to `EditorAreaFileView`
* rename `EditorView` to `EditorAreaView`
- also added the view to the App Window docs
* rename 4 Workspace view files
- `WorkspaceAnyFileView` -> `AnyFileView`
- `WorkspaceLoadingView` -> `LoadingFileView`
- `WorkspaceImageView` -> `ImageFileView`
- `WorkspacePDFView` -> `PDFFileView`
* move views for opening files to `CodeEdit/Features/Editor`
* move `CodeFileDocument` to `CodeEdit/Features/Documents`
* NSTableViewWrapper: minor change in comment
* move `WindowCodeFileView` to `CodeEdit/Features/Editor/Views`
* use `AnyFileView` to view all images
- this removes the need to check for GIF images
- this also has a nice add-on of using gestures for zoom1 parent 54e0726 commit 86b2780
22 files changed
Lines changed: 371 additions & 352 deletions
File tree
- CodeEdit.xcodeproj
- CodeEdit
- Features
- CodeEditUI/Views
- CodeFile
- Image
- Other
- Documents
- Views
- Editor/Views
- QuickOpen/Views
- Utils/Extensions/URL
- Documentation.docc
- App Window
Large diffs are not rendered by default.
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
This file was deleted.
This file was deleted.
Lines changed: 21 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | | - | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
59 | | - | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | | - | |
62 | | - | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | | - | |
65 | | - | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 69 | + | |
75 | 70 | | |
76 | 71 | | |
77 | 72 | | |
| |||
Lines changed: 0 additions & 102 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
File renamed without changes.
0 commit comments