-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 an 'x' button to close the error messages box #1403 #1508
Merged
alexcjohnson
merged 8 commits into
plotly:dev
from
AnnMarieW:1403-x-button-to-close-error-box
Jan 7, 2021
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
087aaaa
Add an 'x' button to close the error messages popup #1403
ann-marie-ward b74ac86
Updated css #1403
ann-marie-ward ebe50bb
One more css update to align the button #1403
ann-marie-ward e53f278
One more css update to align the button #1403
ann-marie-ward 030f881
updated hover color
ann-marie-ward a05b13f
x and officon update
ann-marie-ward 6cdb6da
Merge branch 'dev' into 1403-x-button-to-close-error-box
alexcjohnson beeee56
update changelog for #1505
ann-marie-ward File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -9,9 +9,9 @@ class FrontEndErrorContainer extends Component { | |||||
} | ||||||
|
||||||
render() { | ||||||
const {errors, connected} = this.props; | ||||||
const {errors, connected, errorsOpened, clickHandler} = this.props; | ||||||
const errorsLength = errors.length; | ||||||
if (errorsLength === 0) { | ||||||
if (errorsLength === 0 || !errorsOpened) { | ||||||
return null; | ||||||
} | ||||||
|
||||||
|
@@ -34,6 +34,11 @@ class FrontEndErrorContainer extends Component { | |||||
</strong> | ||||||
){connected ? null : '\u00a0 🚫 Server Unavailable'} | ||||||
</div> | ||||||
<div | ||||||
className='dash-fe-error__icon-x' | ||||||
onClick={() => clickHandler()}> | ||||||
x | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This is the |
||||||
</div> | ||||||
</div> | ||||||
<div className='dash-error-card__list'>{errorElements}</div> | ||||||
</div> | ||||||
|
@@ -42,9 +47,12 @@ class FrontEndErrorContainer extends Component { | |||||
} | ||||||
|
||||||
FrontEndErrorContainer.propTypes = { | ||||||
id: PropTypes.string, | ||||||
errors: PropTypes.array, | ||||||
connected: PropTypes.bool, | ||||||
inAlertsTray: PropTypes.any | ||||||
inAlertsTray: PropTypes.any, | ||||||
errorsOpened: PropTypes.any, | ||||||
clickHandler: PropTypes.func | ||||||
}; | ||||||
|
||||||
FrontEndErrorContainer.propTypes = { | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably a stronger effect than we want - really we just need enough to be able to see a change in the X. Closest analog I see is the grey debug menu buttons, which starts out about the same as
#ccc
(just a tiny bit tilted toward blue)dash/dash-renderer/src/components/error/menu/DebugMenu.css
Line 70 in e7f4984
And on hover it gets just a bit darker
dash/dash-renderer/src/components/error/menu/DebugMenu.css
Line 84 in e7f4984
I'm not sure where those exact colors came from, but we may be able to just copy them both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I'll make the change. Thanks!