Commit dc63ac6
feat(storage-browser): file preview and file thumbnail (#6669)
* feat(storage-browser): Object preview
* Add renderer resolver and image renderer
* Add video preview component
* Add text preview
* Add un-supported preview view
* Add main layout styling
* Add file limit
* Add preview placeholder loader
* Add retry logic
* Add typing for filePreview API
* Add file meta data section
* Update file metadata
* update to handle composable case
* Update file preview state logic
* Update FilePreview naming to be consistent
* Update state naming to be consistent
* update renderer props type
* Add file thumbnail
* Add unit testing preview components and utils
* Add tests for FilePreview component, controller and hook. Also utils and context
* Update file preview styling and fix createProvider test
* Update storage browser theming
* Add new file grounds and update composable and default auth
* Add display text for filePreview
* Update composable
* Update the preview layout.
* update image styling
* Add change set
* Update storage browser playground
* update file preview playground
* Rename files utils directory
* Update file type generic to avoid using AllFileTypes<any>
* Update multiple function definition to be consistent
* rename file preview callbacks (retryFilePreview,openFilePreview,closeFilePreview,) to be consistent
* separate file icon and file preview logic
* use unknown instead of any for file type generic resolver
* Update content type sting processing
* update file type logic
* optimize useFilePreview hook callbacks using useCallback
* Remove un-used code
* Add video error handling
* Update video return type
* Add Image error handling
* Update image, vide and metadata styling
* Increase the storage size limit.
* Update text preview component return value
* Use PreviewFallback for Image, text and video error handling.
* Update composable playground to use manged auth
* Silence types temporarily
* Update PreviewFallback component
* update file size extraction
* Update alt for text and video
* Update display messages
* Add exhaustive check for renderer
* Update provide props
* use existing file size formatter humanFileSize
* removed null assertion from file size
* Fix typo in url util name
* fix DEFAULT_FILE_SIZE_LIMITS type
* fix url import
* Remove null assertion form file preview state
* Update display text destruction
* Update FileSizeResolver and
* update file reducer
* fix typescript issue
* remove ts un-used code
* Update PreviewFallback
* Update text preview to use preview placeholder
* Update file limit check logic
* Make text content request cancellable
* use snapshot in testing file preview display text
* Update ariaLabel of file button
* replace runtime exhaustiveCheck with build-time type safety
* feat(object-preview) : update docs for the object preview feature (#6675)
* Add new properties for LocationDetailViewState
* Add file preview section in under Customization
* Add file preview display text
* Add file thumbnail icons
* Update overview section to reference file preview capability
* Update composition example to include File preview
* Add file preview to CustomUI section
* Add spacing for custom file preview comments
* update ### File preview section description/overview
* update overview description
* feat(storage-browser): file preview e2e tests (#6672)
* update file preview playground
* Update video and un-supported tests
* Update image, video and retry get by alt
* update preview loader assertion message
* remove redundant assertion.
* use when instead of then for button click
* update file row content
* Storage browser/object preview bug bash issues (#6676)
* close preview on search
* Close preview on refresh and navigate
* close preview on paginate.
* Fix Clicking on a selected/active textfile reloads the content
* Add unit tests for close file on actions and use file preview
* preview do not fails if get properties fails
* fix 404
* Add a test cases for opening a preview
* Fix fileType infer issue
* update get configuration logic
* update preview error scenario.
* Skip flaky e2e preview error
* Fix flaky test in file preview error
* Add mocking for file preview (#6679)
* Add mocking for file preview
* Fix file preview custom example
* Update next config domains
* Update mock comment
* address feedback from stakeholders
* fix file size limit test
* remove unused code in text preview component
* revert build command to use yarn
---------
Co-authored-by: Philipp Andreas Paul <[email protected]>1 parent 5bc366a commit dc63ac6
File tree
93 files changed
+4960
-108
lines changed- .changeset
- docs
- src/pages/[platform]/connected-components/storage/storage-browser
- examples
- examples/next/pages/ui/components/storage/storage-browser
- composable-playground
- customization-playground
- file-preview-playground
- packages
- e2e
- cypress/integration/common
- features/ui/components/storage/storage-browser
- react-storage
- src/components/StorageBrowser
- actions/handlers
- components
- base
- preview
- __tests__
- composables
- DataTable
- __tests__
- controls
- __tests__
- createStorageBrowser
- __tests__
- displayText
- libraries/en
- __tests__
- __snapshots__
- filePreview
- __tests__
- views
- LocationDetailView
- __tests__
- getLocationDetailViewTableData
- __tests__
- hooks/useFilePreview
- __tests__
- utils/files
- __tests__
- react/src/primitives/Icon/context
- ui
- src/theme
- components
- css/component
- StorageBrowser
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
93 files changed
+4960
-108
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
205 | 208 | | |
206 | 209 | | |
207 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
208 | 220 | | |
209 | 221 | | |
210 | 222 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
Lines changed: 70 additions & 0 deletions
| 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 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
Lines changed: 31 additions & 0 deletions
| 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 | + | |
Lines changed: 38 additions & 0 deletions
| 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 | + | |
| 37 | + | |
| 38 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
14 | 21 | | |
15 | 22 | | |
16 | 23 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
0 commit comments