Skip to content

Conversation

@evhan55
Copy link
Contributor

@evhan55 evhan55 commented Sep 22, 2018

Resolves

This is progress towards: #2956.

Proposed Changes

  • Displays stacks of alerts vertically.
  • Shows an icon in an alert if one is provided.

screen shot 2018-09-22 at 5 40 22 pm

Reason for Changes

To improve on previous alerts that displayed directly on top of each other, and to add further customizability with optional icons.

Notes

'handleOnCloseAlert'
]);
}
handleOnCloseAlert () {

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

'handleOnCloseAlert'
]);
}
handleOnCloseAlert () {

This comment was marked as abuse.

if (extensionId) { // if it's an extension
const extension = extensionData.find(ext => ext.extensionId === extensionId);
if (extension && extension.name) {
// TODO: is this the right place to assemble this message?

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

};

const showAlert = function (message) {
const showAlert = function (data) {

This comment was marked as abuse.


const closeAlert = function () {
return {type: CLOSE_ALERT};
const closeAlert = function (index) {

This comment was marked as abuse.

rschamp
rschamp previously approved these changes Sep 25, 2018
Copy link
Contributor

@rschamp rschamp left a comment

Choose a reason for hiding this comment

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

Looks good to me @evhan55! I have a few comments that could be addressed in the follow-up PR

<AlertComponent
iconURL={this.props.iconURL}
message={this.props.message}
onCloseAlert={this.handleOnCloseAlert}

This comment was marked as abuse.

This comment was marked as abuse.

className,
onCloseAlert
}) => (
<Box

This comment was marked as abuse.

/**
* Function to show an alert with the given input data.
*
* @param {object} data - data with the following props: {message, extensionId=null}

This comment was marked as abuse.

Copy link
Contributor

@ericrosenbaum ericrosenbaum left a comment

Choose a reason for hiding this comment

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

👍

@ericrosenbaum ericrosenbaum merged commit ca51b63 into scratchfoundation:develop Sep 26, 2018
@evhan55 evhan55 deleted the multiple-alerts branch October 10, 2018 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants