Skip to content

Conversation

@GomezIvann
Copy link
Collaborator

@GomezIvann GomezIvann commented Nov 10, 2022

Checklist
(Check off all the items before submitting)

  • Build process is done without errors and all tests pass in the /lib directory.
  • Self-reviewed the code before submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Description
Using the grid layout to solve the issues the component had in regards to following the latests specifications.

Closes #1379

@raquelarrojo raquelarrojo self-requested a review November 14, 2022 07:45
@raquelarrojo raquelarrojo self-assigned this Nov 14, 2022
@GomezIvann GomezIvann changed the title [File Input] Single file item styles update [File Input] File item styles update Nov 14, 2022
@GomezIvann GomezIvann marked this pull request as ready for review November 15, 2022 16:47
Copy link
Collaborator

@raquelarrojo raquelarrojo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • In filedrop mode, please change the padding of the ButtonContainer to 4px 12px 4px 4px instead of 2px 12px 2px 3px as specified in guidelines.

Current implementation:
image

Guidelines:
image

  • In filedrop and dropzone modes, if it is not multiple and the file has an error, the error is not shown.

image

image

I think the error should be shown like this:
image

@GomezIvann
Copy link
Collaborator Author

GomezIvann commented Nov 17, 2022

  • In filedrop mode, please change the padding of the ButtonContainer to 4px 12px 4px 4px instead of 2px 12px 2px 3px as specified in the guidelines.

Current implementation: image

Guidelines: image

  • In filedrop and dropzone modes, if it is not multiple and the file has an error, the error is not shown.

image

image

I think the error should be shown like this: image

Are you sure the padding is 4px 12px 4px 4px? I mean, the styles of Alex say that the distance is 4px taking into account the border (4px - 1px of border = 3px of padding, so the value would be 3px 12px 3px 3px), am I right?

@raquelarrojo
Copy link
Collaborator

  • In filedrop mode, please change the padding of the ButtonContainer to 4px 12px 4px 4px instead of 2px 12px 2px 3px as specified in the guidelines.

Current implementation: image
Guidelines: image

  • In filedrop and dropzone modes, if it is not multiple and the file has an error, the error is not shown.

image
image
I think the error should be shown like this: image

Are you sure the padding is 4px 12px 4px 4px? I mean, the styles of Alex say that the distance is 4px taking into account the border (4px - 1px of border = 3px of padding, so the value would be 3px 12px 3px 3px), am I right?

Yes, I totally agree. Taking a look to the specs, 4px is the distance with the border. So we could calculate the padding as you say, calc(4px - dropBorderThickness), since dropBorderThickness is the token for the border width.

@raquelarrojo raquelarrojo self-requested a review November 21, 2022 08:29
Copy link
Collaborator

@raquelarrojo raquelarrojo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When it is not multiple and it has several files in value, it should show the files like this:

Code:

<DxcFileInput
    label="Single file with files in value"
    helperText="Please select files"
    callbackFile={callbackFile}
    value={allFiles}
    multiple={false}
/>

image

Now they are shown:
image

@raquelarrojo raquelarrojo self-requested a review November 21, 2022 15:07
@raquelarrojo raquelarrojo merged commit b41d935 into master Nov 21, 2022
@raquelarrojo raquelarrojo deleted the gomezivann-fileInput-styles-update branch November 21, 2022 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[File Input] File Item is not following the latest designs

3 participants