Skip to content
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

feat: Check that URL is valid before allowing submission #589

Merged
merged 2 commits into from
Oct 4, 2022

Conversation

Fleker
Copy link
Contributor

@Fleker Fleker commented Oct 3, 2022

Description

When I upload too large of an image, there is an error badge. However, I am still able to submit this image (though it fails up the stack). This change ensures the preview is valid before allowing the Submit button to be pressed.

Type of change

  • Bug fix (added a non-breaking change which fixes an issue)

How Has This Been Tested?

  • Tested endpoints locally

Checklist:

  • I have checked to make sure no other pull requests are open for this issue
  • The code is properly formatted and is consistent with the existing code style
  • I have commented my code, particularly in hard-to-understand areas
  • [N/A] I have made corresponding changes to the documentation
  • [N/A] My changes generate no new warnings

Screenshots

image

Copy link
Owner

@DenverCoder1 DenverCoder1 left a comment

Choose a reason for hiding this comment

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

Tested it and it looks great! Thanks for contributing.

I just have one minor suggestion

client/src/UploadForm.tsx Outdated Show resolved Hide resolved
@Fleker
Copy link
Contributor Author

Fleker commented Oct 4, 2022

Added secondaryLabel to both elements that applies the muted class.

Copy link
Owner

@DenverCoder1 DenverCoder1 left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for your help 👍

@DenverCoder1 DenverCoder1 changed the title Add check in BadgePreview that URL is valid before allowing submission feat: Check that URL is valid before allowing submission Oct 4, 2022
@DenverCoder1 DenverCoder1 merged commit 22c4183 into DenverCoder1:main Oct 4, 2022
@DenverCoder1 DenverCoder1 added enhancement New feature or request front-end For client side issues (demo site in React) labels Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request front-end For client side issues (demo site in React)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants