Skip to content

Feature: Flash Message Styles and Animation - #417

Open
HauwaAguillard wants to merge 7 commits into
masterfrom
415-Component-Flash-Message
Open

Feature: Flash Message Styles and Animation#417
HauwaAguillard wants to merge 7 commits into
masterfrom
415-Component-Flash-Message

Conversation

@HauwaAguillard

@HauwaAguillard HauwaAguillard commented Aug 14, 2019

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Author

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

@blazebarsamian blazebarsamian left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread settings-templates/_color-palette.scss Outdated
Comment thread settings-templates/harmonium-settings.scss Outdated
Comment thread settings-templates/_color-palette.scss Outdated
Comment thread src/Flash.js Outdated
@include fade-out;
}

@mixin fade-in(

Copy link
Copy Markdown
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
Copy Markdown
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.

@HauwaAguillard HauwaAguillard Aug 19, 2019

Copy link
Copy Markdown
Author

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

Comment thread docs-src/src/pages/components/FlashTables/FlashProps.js
Comment thread scss/components/_Flash.scss Outdated
Comment thread scss/components/_Flash.scss Outdated
Comment thread settings-templates/harmonium-settings.scss Outdated
Comment thread src/Flash.js
* Add dismissable flash functionality

* Fix spelling

* Dismissible flash functionality

@blazebarsamian blazebarsamian left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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

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
Copy Markdown
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)),

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
Copy Markdown
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

Comment thread scss/components/_Flash.scss Outdated
border: $flash-border-size solid $flash-border-color;
color: $flash-color;
margin-bottom: $global-margin;
padding: $global-padding-tiny 0;

Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/Flash.js
alert: ['rev-Flash--alert'],
persistent: ['rev-Flash--persistent'],
fade: ['rev-Flash--fade'],
dismissible: ['rev-Flash--dismissible'],

Copy link
Copy Markdown
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

Comment thread src/Flash.js
}
const BOOL_PROPS = [
...Object.keys(BOOL_PROPS_TO_CLASS_NAMES),
'dismissible',

Copy link
Copy Markdown
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