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

Add flair to snackbar #1313

Merged
merged 2 commits into from
Apr 17, 2018
Merged

Add flair to snackbar #1313

merged 2 commits into from
Apr 17, 2018

Conversation

miikkatu
Copy link
Contributor

@miikkatu miikkatu commented Apr 10, 2018

This is for #1279.

screen shot 2018-04-10 at 14 06 56

Unlike modal dialogs in the redesign, this is with a dark background to make it pop a bit more. Functionality remains the same as with the original snackbar.

The prop-types package was added as a dependency.

@neb-b
Copy link

neb-b commented Apr 12, 2018

Nice. I will check out the code more later but the picture looks good. We are using flow instead of prop-types so your types should be moved to that.

background-color: var(--color-primary);
border-radius: 10px;
box-shadow: var(--box-shadow-layer);
color: #f0f0f0;
Copy link

@neb-b neb-b Apr 12, 2018

Choose a reason for hiding this comment

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

This should use a text color variable. Probably just --color-text or whatever we call it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a snackbar specific variable now.

padding: $spacing-vertical;
position: fixed;
top: $spacing-vertical;
background-color: var(--color-primary);
Copy link

Choose a reason for hiding this comment

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

You should create a variable for this --snack-bar-bg --snack-bar-color

So we can change them for dark mode. Similar to how we do it with buttons:
https://github.com/lbryio/lbry-app/blob/master/src/renderer/scss/_vars.scss#L93

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those were added.

text-transform: uppercase;

span {
color: #f0f0f0;
Copy link

Choose a reason for hiding this comment

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

This should just be a color variable. It's just the same as the color you have above so maybe this isn't needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, this was not needed at all.

@miikkatu
Copy link
Contributor Author

miikkatu commented Apr 12, 2018

@seanyesmunt I updated the code as suggested in the comments.

min-width: min-content;
&:hover {
text-decoration: underline;
.message {
Copy link

Choose a reason for hiding this comment

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

Looks good. The only thing I would do is change this to snack-bar__message and move it to the top level. Then I think it's ok to merge.

@miikkatu
Copy link
Contributor Author

PR changed per review. Also, snack-bar__action was moved to the top level along with snack-bar__message.

@neb-b
Copy link

neb-b commented Apr 17, 2018

Awesome! Just add a changelog commit and I will merge

@miikkatu
Copy link
Contributor Author

Changelog updated.

@neb-b neb-b merged commit dad29b7 into lbryio:master Apr 17, 2018
@tzarebczan
Copy link
Contributor

Thanks @miikkatu! Have your contribution email, will follow up soon!

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