|
2 | 2 |
|
3 | 3 | The upload component is used to choose files from any location in the local machine and update those files to the server where the application is hosted. It is a common procedure in applications where files are required like documents, images or other information in digital formats. |
4 | 4 |
|
5 | | -## Appearance |
| 5 | +## Usage |
6 | 6 |
|
7 | | -A limited area in the user interface is reserved for this purpose, letting the user select the files in two ways, either choosing the file through the file system of the operating system or dragging the file and dropping in the respective area. |
8 | | -Once the file is displayed there, some characteristics are rendered: |
9 | | -- A thumbnail of the file (in the case that it is available) |
10 | | -- The name of the file |
11 | | -- The size or other information of the file |
12 | | -- An icon representing the actual status of the file (in progress, done, error) |
13 | | - |
14 | | -When all the files are loaded and the user wants to upload the files to the server, the only action to be performed is the click on the upload button. If the action goes right, an alert message with a success status will be displayed, in other cases, an error will pop up indicating the reason. |
15 | | - |
16 | | -### Modes |
17 | | - |
18 | | -There are two different modes for the upload component, one of them is used to upload a single file thus the representation of the component is much simple and takes less space in the screen compared with the multi file upload version, which is used to select several files in a row. |
19 | | - |
20 | | -Modes for the component: __single__ and __multiple__. |
21 | | - |
22 | | - |
23 | | -### States |
24 | | - |
25 | | -*Default state* |
| 7 | +- Use the specific mode based on the application requirements |
| 8 | +- Add some explanation text in the case that it is needed to clarify the information to the user |
| 9 | +- By default, the drag and drop appearance is handled by the browser, in case it wants to be customized is the responsibility of the developer |
| 10 | +- If the upload process fails, please show an error message avoiding technical or undetermined information (i.e '0x94 ERROR_PATH_BUSY') that won't be understood by the user of the application |
26 | 11 |
|
27 | | - |
28 | 12 |
|
29 | | -*Drag and drop state* |
30 | 13 |
|
31 | | - |
| 14 | +## States |
32 | 15 |
|
33 | | -*Uploading state* |
| 16 | +### Default |
34 | 17 |
|
35 | | - |
| 18 | + |
36 | 19 |
|
37 | | -*File complete state* |
| 20 | +_Upload with the default preview of the component_ |
38 | 21 |
|
39 | | - |
| 22 | +### Drag and drop |
40 | 23 |
|
41 | | -*Hover state with extra options* |
| 24 | + |
42 | 25 |
|
43 | | - |
| 26 | +_Upload with drag and drop action of a file_ |
44 | 27 |
|
45 | | -*Upload completion state* |
| 28 | +### Hover state |
46 | 29 |
|
47 | | - |
| 30 | + |
48 | 31 |
|
49 | | -## Design tokens |
| 32 | +_Example of an item hovered_ |
50 | 33 |
|
51 | | -Cannot be possible to configure or customize any parameter of the component to apply a theming. |
| 34 | +### Success and error |
52 | 35 |
|
53 | | -## Design Specifications |
| 36 | +Provide feedback to the users regarding the issues their files may face, or indicate that the files upload was succesfull. An alert type `success` or `error` should be placed on the top right corner of the upload container. |
54 | 37 |
|
55 | | -Since this component has many specifications to be detailed here, the best way to share the information with the interested people is throw the adobe cloud link in the Links and references section. |
| 38 | + |
56 | 39 |
|
57 | | -### Responsive design |
| 40 | +_Component success feedback_ |
58 | 41 |
|
59 | | -*This is pending* |
| 42 | + |
60 | 43 |
|
61 | | -### User Interface Design Considerations |
| 44 | +_Component error feedback_ |
62 | 45 |
|
63 | | -- Use the specific mode based on the application requirements |
64 | | -- Add some explanation text in the case that it is needed to clarify the information to the user |
65 | | -- By default, the drag and drop appearance is handled by the browser, in case it wants to be customized is the responsibility of the developer |
66 | | -- If the upload process fails, please show an error message avoiding technical or undetermined information (i.e '0x94 ERROR_PATH_BUSY') that won't be understood by the user of the application |
67 | 46 |
|
68 | 47 | ## Links and references |
69 | 48 |
|
70 | | -- Upload: https://xd.adobe.com/view/23e2cca4-5021-490a-a548-e99a9b4a2006-76b1/screen/0a80be63-f9b6-4436-a3f1-ced47070f70d/variables/ |
71 | | -- Single upload: https://xd.adobe.com/view/23e2cca4-5021-490a-a548-e99a9b4a2006-76b1/screen/f67eb530-b374-4d13-a1d8-ba4c1fba2e74/variables/ |
| 49 | +- [React CDK component](https://developer.dxc.com/tools/react/next/#/components/upload) |
| 50 | +- [Angular CDK component](https://developer.dxc.com/tools/angular/next/#/components/upload) |
72 | 51 |
|
73 | 52 | ____________________________________________________________ |
74 | 53 |
|
|
0 commit comments