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

Feature: Flash Message Styles and Animation #417

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

HauwaAguillard
Copy link

@HauwaAguillard HauwaAguillard commented Aug 14, 2019

PR connects to #415

Background

Initial styles and some animation for flash components.

Screen Shot 2019-08-14 at 1 13 40 PM

Screen Shot 2019-08-14 at 1 14 06 PM

Flash that fades is shown here:

Screen Shot 2019-08-14 at 1 16 43 PM

@HauwaAguillard HauwaAguillard mentioned this pull request Aug 14, 2019
14 tasks
@HauwaAguillard HauwaAguillard added 3 - in review pinned tickets that shouldnt be deleted until completed and this label is removed labels Aug 14, 2019
@HauwaAguillard
Copy link
Author

Added props and vars to the bottom of the example page

Screen Shot 2019-08-16 at 10 23 18 AM

Screen Shot 2019-08-16 at 10 23 31 AM

@HauwaAguillard
Copy link
Author

@CheetoMao when you get the chance, would love to get a code review. Thanks!

Copy link
Contributor

@blazebarsamian blazebarsamian left a comment

Choose a reason for hiding this comment

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

@HauwaAguillard work on the changes Ive mentioned below. I'll create an enhancement ticket to have the dismissible flash added. I'm going to work on some transitions.

  • Make sure to re-zip the settings-templates.zip file

settings-templates/_color-palette.scss Outdated Show resolved Hide resolved
settings-templates/harmonium-settings.scss Outdated Show resolved Hide resolved
settings-templates/_color-palette.scss Outdated Show resolved Hide resolved
src/Flash.js Outdated Show resolved Hide resolved
@include fade-out;
}

@mixin fade-in(
Copy link
Contributor

Choose a reason for hiding this comment

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

need to fix the transitions when the flash fades away and the page moves up so that its not jolting.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm going to work on this change.

Copy link
Author

@HauwaAguillard HauwaAguillard Aug 19, 2019

Choose a reason for hiding this comment

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

I would like to pair on this change when you are ready to work on it. Curious to see your workaround the jolting

scss/components/_Flash.scss Outdated Show resolved Hide resolved
scss/components/_Flash.scss Outdated Show resolved Hide resolved
settings-templates/harmonium-settings.scss Outdated Show resolved Hide resolved
src/Flash.js Show resolved Hide resolved
* Add dismissable flash functionality

* Fix spelling

* Dismissible flash functionality
Copy link
Contributor

@blazebarsamian blazebarsamian left a comment

Choose a reason for hiding this comment

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

Transitions still need work though.

</Table.Row>
</Table.Head>
<Table.HeadStacked>
<Table.Data>Flash Props</Table.Data>
Copy link
Contributor

Choose a reason for hiding this comment

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

Markup for this should look like this:

<Table.HeadStacked>
  <Table.Row>
    <Table.Header>Flash Props</Table.Header>
  </Table.Row>
</Table.HeadStacked>

.rev-FlashClose {
background: none;
border: none;
color: $flash-color;
Copy link
Contributor

Choose a reason for hiding this comment

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

this should probably get its own var. And will also need vars for hover (added to :hover, :focus) and active (added to :active)

$flash-close-color
$flash-close-color-hover
$flash-close-color-active

And don't forget to add them to the settings-template

medium-only: ((min-width: $medium) and (max-width: $large - 1)),
large: (min-width: $large),
large-down: ((max-width: $large - 1)),
large-only: ((min-width: $large) and (max-width: $xlarge - 1)),
xlarge: (min-width: $xlarge),
xlarge-down: ((max-width: $xlarge - 1)),
xlarge-down: ((max-width: $xlarge)),
Copy link
Contributor

Choose a reason for hiding this comment

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

change this back to xlarge-down: ((max-width: $xlarge - 1)),

@@ -14,18 +14,18 @@ $breakpoints: (
small: (min-width: $small),
small-only: ((min-width: $small) and (max-width: $medium - 1)),
medium: (min-width: $medium),
medium-down: ((max-width: $medium - 1)),
medium-down: ((max-width: $medium - 1 )),
Copy link
Contributor

Choose a reason for hiding this comment

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

remove empty space after the 1

border: $flash-border-size solid $flash-border-color;
color: $flash-color;
margin-bottom: $global-margin;
padding: $global-padding-tiny 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isnt this using the $flash-padding var?

&.rev-Flash--fade {
@include fade-out--hide();
}
&.rev-Flash--dismissible {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would maybe even add a padding-right: $flash-dismissible-padding-right so that the text doesnt overlap the close button. but I need to see what it looks like with the close button first. currently not seeing one on your branch.

if so, don't forget to add it to the settings-template

alert: ['rev-Flash--alert'],
persistent: ['rev-Flash--persistent'],
fade: ['rev-Flash--fade'],
dismissible: ['rev-Flash--dismissible'],
Copy link
Contributor

Choose a reason for hiding this comment

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

needs to be added to the props table

}
const BOOL_PROPS = [
...Object.keys(BOOL_PROPS_TO_CLASS_NAMES),
'dismissible',
Copy link
Contributor

Choose a reason for hiding this comment

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

these two are props as well right? they need to be added to the props table as well then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - in review pinned tickets that shouldnt be deleted until completed and this label is removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants