-
Notifications
You must be signed in to change notification settings - Fork 4.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
🪟 🧹 Display returned error messages on replication view #16280
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bf98c90
display error messages if they exist
teallarson e3212ff
get it working with styled components first
teallarson 0cd4003
migrate to scss module
teallarson 652b342
use variables and text component
teallarson 6a0e4cb
add data-id back for cypress
teallarson 033148b
cleanup from pr review
teallarson b8e5085
add colors import
teallarson f0c6c01
fix cypress test
teallarson 4cf8125
fix ternary problem
teallarson 02c7a01
rename for clarity
teallarson 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
25 changes: 25 additions & 0 deletions
25
airbyte-webapp/src/views/Connection/ConnectionForm/components/EditControls.module.scss
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,25 @@ | ||
@use "../../../../scss/colors"; | ||
@use "../../../../scss/variables"; | ||
|
||
.content { | ||
display: flex; | ||
justify-content: flex-end; | ||
align-items: center; | ||
flex-direction: row; | ||
margin-top: variables.$spacing-lg; | ||
gap: variables.$spacing-lg; | ||
padding: variables.$spacing-sm; | ||
} | ||
|
||
.controlButton { | ||
margin-left: variables.$spacing-md; | ||
} | ||
|
||
// currently only implemented on transformation view form card, margins are specific to that implementation | ||
// todo: standardize the margin sizes here | ||
.line { | ||
min-width: 100%; | ||
height: variables.$border-thin; | ||
background: colors.$grey; | ||
margin: variables.$spacing-lg -27px 0 -24px; | ||
} |
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
16 changes: 16 additions & 0 deletions
16
airbyte-webapp/src/views/Connection/ConnectionForm/components/ResponseMessage.module.scss
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,16 @@ | ||
@use "../../../../scss/colors"; | ||
|
||
.message { | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
flex: 1; | ||
} | ||
|
||
.success { | ||
color: colors.$green; | ||
} | ||
|
||
.error { | ||
color: colors.$red; | ||
} |
33 changes: 33 additions & 0 deletions
33
airbyte-webapp/src/views/Connection/ConnectionForm/components/ResponseMessage.tsx
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,33 @@ | ||
import classnames from "classnames"; | ||
|
||
import { Text } from "components/base/Text"; | ||
|
||
import styles from "./ResponseMessage.module.scss"; | ||
|
||
interface ResponseMessageProps { | ||
successMessage?: React.ReactNode; | ||
errorMessage?: React.ReactNode; | ||
dirty: boolean; | ||
} | ||
export const ResponseMessage: React.FC<ResponseMessageProps> = ({ successMessage, errorMessage, dirty }) => { | ||
const messageStyle = classnames(styles.message, { | ||
[styles.success]: successMessage, | ||
[styles.error]: errorMessage, | ||
}); | ||
if (errorMessage) { | ||
return ( | ||
<Text as="div" size="lg" className={messageStyle}> | ||
{errorMessage} | ||
</Text> | ||
); | ||
} | ||
|
||
if (successMessage && !dirty) { | ||
return ( | ||
<Text as="div" size="lg" className={messageStyle} data-id="success-result"> | ||
{successMessage} | ||
</Text> | ||
); | ||
} | ||
return null; | ||
}; |
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 should be
$grey-100
.