Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change password view #1932 #119

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

wolnio
Copy link
Contributor

@wolnio wolnio commented Apr 10, 2022

No description provided.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 10, 2022

Chromatic and Storybook are ready! 🎉

👉 Chromatic Link
👉 Storybook Link

triggered by a8c15f9

af509cd3-e034-490e-9a0e-93625c124f76

@github-actions
Copy link
Contributor

github-actions bot commented Apr 10, 2022

Vercel preview is ready! 🎉

👉 Preview Link

triggered by a8c15f9

e283ce82-0cf8-4055-bc5c-8e93da828c8e

Copy link
Contributor

@wlechowicz wlechowicz left a comment

Choose a reason for hiding this comment

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

Buttons need some air between them:
obraz

@@ -81,3 +81,12 @@ export const Header = styled.h1`
margin-bottom: none;
}
`;

export const ChangePass = styled.span`
Copy link
Contributor

Choose a reason for hiding this comment

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

You should use an anchor or a button instead of imitating a link with a span, this is a bad practice.
Since it doesn't navigate away, it should be a button.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, since we don't have a button with text only, should I use our Button component or normal button tag? Of course both types would be properly styled.

Copy link
Contributor

Choose a reason for hiding this comment

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

Our Button, onlyIcon prop gets you half way there, the prop should be renamed to something more fitting its actual role which is transparent really (no background, no border). Adding a prop such as asLink would be confusing since the button acts as a Link if href is passed but you don't want href.
Try creating a component that extends Button, sets attrs { onlyIcon: true} and adds the style for the text. See the pencil icon for how to do it.

Comment on lines 3 to 8
const Wrapper = styled.div`
width: 100%;
padding: 1em 0;
`;

export { Wrapper };
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const Wrapper = styled.div`
width: 100%;
padding: 1em 0;
`;
export { Wrapper };
export const Wrapper = styled.div`
width: 100%;
padding: 1em 0;
`;

return <ChangePassword {...args} />;
};

export const Responsive = Template.bind();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export const Responsive = Template.bind();
export const Responsive = Template.bind({});

const initialState = Object.freeze({ currentPass: '', newPass: '', repeatPass: '' });

export default function ChangePassword() {
const [inputValues, setInputValues] = useState(initialState);
Copy link
Contributor

Choose a reason for hiding this comment

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

Add validation and prepare payload for later.

Copy link
Contributor

@weronika299 weronika299 left a comment

Choose a reason for hiding this comment

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

What do you think about adding an underline or something to ChangePass to more visually emphasize that it is a link?

@@ -0,0 +1,41 @@
import { Input } from 'components/Form';
import { Wrapper } from './ChangePassword.styles';
import { useState } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

This useState import should be the first on the list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After review changes I don't use useState in that file :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, but the same situation is in ChangePassword.stories.js file.:)

@wolnio
Copy link
Contributor Author

wolnio commented Apr 11, 2022

What do you think about adding an underline or something to ChangePass to more visually emphasize that it is a link?

You mean to make underline visible all the time, not only on hover?

@weronika299
Copy link
Contributor

What do you think about adding an underline or something to ChangePass to more visually emphasize that it is a link?

You mean to make underline visible all the time, not only on hover?

Maybe underlining is not the best, hmm but for example higher font-size and font-weight value? But it's only suggestion so you can try it and decide. ;)

@@ -31,6 +31,7 @@ export const FlexRow = styled.div`
flex-direction: row;
justify-content: space-evenly;
align-items: center;
min-width: 375px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same issue here:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On a specific device or on all of them?

Comment on lines +87 to +94
cursor: pointer;
font-weight: bold;
&:hover {
text-decoration: underline;
}
margin: 12px;
color: #44ec52;
`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we could unify these buttons:
Zrzut ekranu 2022-04-14 o 01 28 16

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.

4 participants