Skip to content

Commit b42f76e

Browse files
authored
Merge pull request #515 from dxc-technology/component-upload
Component upload documentation update
2 parents 47991b9 + 7dbb5d1 commit b42f76e

File tree

13 files changed

+23
-44
lines changed

13 files changed

+23
-44
lines changed
1.15 MB
Binary file not shown.

guidelines/components/upload/README.md

Lines changed: 23 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,73 +2,52 @@
22

33
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.
44

5-
## Appearance
5+
## Usage
66

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
2611

27-
![Upload with the default preview of the component](images/upload_preview.png)
2812

29-
*Drag and drop state*
3013

31-
![Upload with drag and drop action of a file](images/upload_dragdrop.png)
14+
## States
3215

33-
*Uploading state*
16+
### Default
3417

35-
![Upload with file uploading](images/upload_processing.png)
18+
![Upload with the default preview of the component](images/upload_default.png)
3619

37-
*File complete state*
20+
_Upload with the default preview of the component_
3821

39-
![Upload with a file already uploaded and added to the list](images/upload_uploaded.png)
22+
### Drag and drop
4023

41-
*Hover state with extra options*
24+
![Upload with drag and drop action of a file](images/upload_dragover.png)
4225

43-
![Upload with a hover action over the items to display more options](images/upload_hover.png)
26+
_Upload with drag and drop action of a file_
4427

45-
*Upload completion state*
28+
### Hover state
4629

47-
![Upload after cliclinkg the upload button with an alert reporting the state](images/upload_alert.png)
30+
![Example of an item hovered](images/upload_preview.png)
4831

49-
## Design tokens
32+
_Example of an item hovered_
5033

51-
Cannot be possible to configure or customize any parameter of the component to apply a theming.
34+
### Success and error
5235

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.
5437

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+
![Component success feedback](images/upload_success.png)
5639

57-
### Responsive design
40+
_Component success feedback_
5841

59-
*This is pending*
42+
![Component error feedback](images/upload_error.png)
6043

61-
### User Interface Design Considerations
44+
_Component error feedback_
6245

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
6746

6847
## Links and references
6948

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)
7251

7352
____________________________________________________________
7453

-26.9 KB
Binary file not shown.
34.4 KB
Loading
-17.5 KB
Binary file not shown.
24.7 KB
Loading
55 KB
Loading
-16.8 KB
Binary file not shown.
23.1 KB
Loading
-16.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)