add help text to contact form and aws integration setup#35
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds two user-facing improvements: a reminder in the contact form success message to check spam folders, and context-specific warnings in the AWS integration setup when the S3 key prefix contains "AWSLogs".
- Updated success message in the contact form to help users identify missing emails.
- Added conditional warnings in the integrations page based on regex tests for AWSLogs in the S3 key prefix.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/app/(user-area)/teams/[teamId]/settings/integrations/page.tsx | Introduces new regex validations and corresponding warning messages for AWSLogs usage in the S3 key prefix. |
| frontend/src/app/(public-area)/contact/ContactForm.tsx | Updates the success message with an added reminder to check the spam folder. |
Comments suppressed due to low confidence (1)
frontend/src/app/(public-area)/contact/ContactForm.tsx:44
- Consider adding tests to verify that the updated success message correctly includes the spam folder reminder.
<SuccessMessage>
Comment on lines
+128
to
+141
| {s3KeyPrefix && | ||
| (startsWithAwsLogsRegex.test(s3KeyPrefix) ? ( | ||
| <p className="text-xs text-indian-red"> | ||
| Cloud Snitch will automatically search for the "AWSLogs" directory in your S3 | ||
| bucket. This field is only necessary if you have a custom prefix for your CloudTrail | ||
| logs. Otherwise, you should leave it empty. | ||
| </p> | ||
| ) : includesAwsLogsRegex.test(s3KeyPrefix) ? ( | ||
| <p className="text-xs text-indian-red"> | ||
| Cloud Snitch will automatically search for the "AWSLogs" directory in your S3 | ||
| bucket. This field should only contain the custom prefix that you specified when | ||
| creating the trail, if any. | ||
| </p> | ||
| ) : null)} |
There was a problem hiding this comment.
[nitpick] The nested ternary conditions for rendering warnings make the code harder to read; consider refactoring the conditional logic into a clearer structure or helper functions.
Suggested change
| {s3KeyPrefix && | |
| (startsWithAwsLogsRegex.test(s3KeyPrefix) ? ( | |
| <p className="text-xs text-indian-red"> | |
| Cloud Snitch will automatically search for the "AWSLogs" directory in your S3 | |
| bucket. This field is only necessary if you have a custom prefix for your CloudTrail | |
| logs. Otherwise, you should leave it empty. | |
| </p> | |
| ) : includesAwsLogsRegex.test(s3KeyPrefix) ? ( | |
| <p className="text-xs text-indian-red"> | |
| Cloud Snitch will automatically search for the "AWSLogs" directory in your S3 | |
| bucket. This field should only contain the custom prefix that you specified when | |
| creating the trail, if any. | |
| </p> | |
| ) : null)} | |
| {getS3KeyPrefixWarning(s3KeyPrefix)} |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What It Does