-
Notifications
You must be signed in to change notification settings - Fork 29
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 plots error message below ribbon #5165
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ecf6ecc
add-error-message-below-ribbon
julieg18 1df1191
Finish first iteration
julieg18 b4935b9
Add frontend tests
julieg18 361b96f
first attempt at vscode test
julieg18 6490e38
fix typo
julieg18 3aded0c
fix missing key warning
julieg18 1b08674
Add storybook and cleanup
julieg18 1e62dda
Keep only title
julieg18 1990649
Update key values
julieg18 780f737
Merge branch 'main' into add-error-message-below-ribbon
julieg18 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
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
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react' | ||
import styles from './styles.module.scss' | ||
import { PlotsState } from '../store' | ||
import { Error } from '../../shared/components/icons' | ||
|
||
export const Errors: React.FC<{ | ||
errors: PlotsState['webview']['plotErrors'] | ||
}> = ({ errors }) => { | ||
if (errors.length === 0) { | ||
return | ||
} | ||
|
||
return ( | ||
<div className={styles.errors}> | ||
<h3 className={styles.errorsTitle}> | ||
<Error className={styles.errorsIcon} width="16" height="16" /> | ||
Errors | ||
</h3> | ||
<table> | ||
<tbody> | ||
{errors.map(({ path, revs }) => ( | ||
<> | ||
<tr> | ||
<th colSpan={2} className={styles.errorsPlot}> | ||
{path} | ||
</th> | ||
</tr> | ||
{revs.map(({ rev, msg }) => ( | ||
<tr key={rev}> | ||
julieg18 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<td className={styles.errorsRev}>{rev}</td> | ||
<td className={styles.errorsMsgs}>{msg}</td> | ||
</tr> | ||
))} | ||
</> | ||
))} | ||
</tbody> | ||
</table> | ||
</div> | ||
) | ||
} |
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
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
Oops, something went wrong.
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.
This is a note to self, we should reduce the number of branches in this switch/case by having an enum instead:
and a simple
dispatch(actionToDispatch[key](data.data.key))
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'll open an issue for that. And don't worry, it's totally out of scope and has nothing to do with your PR.