gristlabs_grist-core/app/client/widgets
Dmitry S 2e22966289 (core) Revamp attachment editor + preview UI, and support more types, including PDFs.
Summary:
- New UI for the modal look mostly following the design prepared previously.
- Use <object> for rendering PDFs (on a Mac works on Firefox, Chrome, Safari; needs checking on Windows)
- While we are at it, use <video> and <audio> for relevant files (object would
  render them too, but without the option to disable autoplay).
- Use <object> for unknown types, except for text/html (unsafe) and other text
  types (need more work to render well).
- Fix skipping save on Escape or when attachments are unsaved (previously a
  noop action was emitted, creating surprises with undo).
- Display extension for files without preview, both in-cell and in the modal.
- Replace tiny "eye" icon to preview particular attachment with double-clicking.
- As an accidental feature, a particular attachment can be previewed by typing 1, 2, 3, etc into cell.
- Renamed PreviewsWidget/PreviewModel to AttachmentsWidget/AttachmentsEditor.

Test Plan: Unified old and new tests for attachments, added new test cases.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2667
2020-11-19 21:30:09 -05:00
..
AbstractWidget.js (core) move client code to core 2020-10-02 13:24:21 -04:00
AttachmentsEditor.ts (core) Revamp attachment editor + preview UI, and support more types, including PDFs. 2020-11-19 21:30:09 -05:00
AttachmentsWidget.css (core) Revamp attachment editor + preview UI, and support more types, including PDFs. 2020-11-19 21:30:09 -05:00
AttachmentsWidget.ts (core) Revamp attachment editor + preview UI, and support more types, including PDFs. 2020-11-19 21:30:09 -05:00
BaseEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
CheckBox.css (core) move client code to core 2020-10-02 13:24:21 -04:00
CheckBox.js (core) move client code to core 2020-10-02 13:24:21 -04:00
CheckBoxEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
ChoiceEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
ChoiceTextBox.js (core) move client code to core 2020-10-02 13:24:21 -04:00
DateEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
DateTextBox.js (core) move client code to core 2020-10-02 13:24:21 -04:00
DateTimeEditor.css (core) move client code to core 2020-10-02 13:24:21 -04:00
DateTimeEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
DateTimeTextBox.js (core) move client code to core 2020-10-02 13:24:21 -04:00
DiffBox.ts (core) simplify document comparison code, and flesh out diff with local changes 2020-11-11 15:49:16 -05:00
EditorPlacement.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
ErrorDom.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
FieldBuilder.css (core) move client code to core 2020-10-02 13:24:21 -04:00
FieldBuilder.ts (core) Automatically finalize action bundles when unrelated actions/bundles come in. 2020-11-10 10:32:07 -05:00
FieldEditor.ts (core) Revamp attachment editor + preview UI, and support more types, including PDFs. 2020-11-19 21:30:09 -05:00
FormulaEditor.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
HyperLinkEditor.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
HyperLinkTextBox.js (core) move client code to core 2020-10-02 13:24:21 -04:00
NewAbstractWidget.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
NewBaseEditor.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
NTextBox.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
NTextEditor.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
NumericTextBox.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
Reference.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Reference.js (core) move client code to core 2020-10-02 13:24:21 -04:00
ReferenceEditor.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
Spinner.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Spinner.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
Switch.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Switch.js (core) move client code to core 2020-10-02 13:24:21 -04:00
TextBox.css (core) move client code to core 2020-10-02 13:24:21 -04:00
TextBox.js (core) move client code to core 2020-10-02 13:24:21 -04:00
TextEditor.css (core) move client code to core 2020-10-02 13:24:21 -04:00
TextEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
UserType.js (core) Revamp attachment editor + preview UI, and support more types, including PDFs. 2020-11-19 21:30:09 -05:00
UserTypeImpl.js (core) Revamp attachment editor + preview UI, and support more types, including PDFs. 2020-11-19 21:30:09 -05:00