sui-components icon indicating copy to clipboard operation
sui-components copied to clipboard

feat(components/molecule/imageEditor): Add row layout and help text to molecule image editor

Open oegea opened this issue 3 years ago • 4 comments
trafficstars

molecule/imageEditor

❓ Ask

Types of changes

  • [X] ✨ New feature (non-breaking change which adds functionality)

Description, Motivation and Context

Context

We're implementing a new page in cnetpro to allow the user to modify their details, among which is the user profile image. To allow modifying the user profile image, we're adopting the molecule/imageEditor in order to offer a way to the user to crop and adjust the selected image before submitting it to the backend.

The problem

We need to make some modifications in the molecule/imageEditor component to be able to render it with a row-style layout, positioning the control sliders at the right side of the image, instead of the current "top to down" or column-style layout.

Changes in this PR

This PR implements a new prop which activates a new layout mode to display controls in the desired mode. Should not affect existing implementations as long as the new prop is not setted.

Additionally, we've added a help text, which is also totally optional.

Screenshots - Animations

Captura de Pantalla 2022-08-25 a las 11 14 58

oegea avatar Aug 25 '22 12:08 oegea

STATEMENTS BRANCHES FUNCTIONS LINES
≍ 0.01↑ ≍ 0.01↑ ≍ 0= ≍ 0=
% 72.05 57.78 58.92 73.72
ABS 2602 / 3611 1462 / 2530 472 / 801 2508 / 3402

github-actions[bot] avatar Aug 25 '22 12:08 github-actions[bot]

STATEMENTS BRANCHES FUNCTIONS LINES
≍ 0.01↑ ≍ 0.01↑ ≍ 0= ≍ 0=
% 72.05 57.78 58.92 73.72
ABS 2602 / 3611 1462 / 2530 472 / 801 2508 / 3402

github-actions[bot] avatar Aug 25 '22 13:08 github-actions[bot]

Add a demo for the new prop please

Done! And fixed scss variables too.

oegea avatar Aug 25 '22 14:08 oegea

STATEMENTS BRANCHES FUNCTIONS LINES
≍ 0.01↑ ≍ 0.01↑ ≍ 0= ≍ 0=
% 72.05 57.78 58.92 73.72
ABS 2602 / 3611 1462 / 2530 472 / 801 2508 / 3402

github-actions[bot] avatar Aug 25 '22 14:08 github-actions[bot]

wait till i come

andresin87 avatar Aug 26 '22 06:08 andresin87

wait till i come

image

jordevo avatar Aug 26 '22 07:08 jordevo

STATEMENTS BRANCHES FUNCTIONS LINES
≍ 0.1↑ ≍ 0.01↑ ≍ 0.15↑ ≍ 0.15↑
% 72.14 57.8 59.07 73.8
ABS 2613 / 3622 1462 / 2529 475 / 804 2519 / 3413

github-actions[bot] avatar Aug 29 '22 09:08 github-actions[bot]

STATEMENTS BRANCHES FUNCTIONS LINES
≍ 0.1↑ ≍ 0.01↑ ≍ 0.15↑ ≍ 0.15↑
% 72.14 57.8 59.07 73.8
ABS 2613 / 3622 1462 / 2529 475 / 804 2519 / 3413

github-actions[bot] avatar Aug 29 '22 10:08 github-actions[bot]

STATEMENTS BRANCHES FUNCTIONS LINES
≍ 0.1↑ ≍ 0.01↑ ≍ 0.15↑ ≍ 0.15↑
% 72.14 57.8 59.07 73.8
ABS 2613 / 3622 1462 / 2529 475 / 804 2519 / 3413

github-actions[bot] avatar Aug 29 '22 10:08 github-actions[bot]