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

[DUOS][risk=no] translate page x2 - added error handling, added no results block, updated url to be hardcoded #1799

Merged
merged 5 commits into from
Sep 14, 2022

Conversation

lu-c
Copy link
Contributor

@lu-c lu-c commented Sep 14, 2022

The url is now up and running (despite CORS error), so had to make a few tweaks to this code


Have you read Terra's Contributing Guide lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

@lu-c lu-c requested a review from a team as a code owner September 14, 2022 15:55
src/libs/ajax.js Outdated Show resolved Hide resolved
@lu-c
Copy link
Contributor Author

lu-c commented Sep 14, 2022

The actual endpoint throws a CORS error - Please correct me I'm wrong, but there's nothing we can do about that, and it might be okay in dev? But if any fixes need to happen, it's in the api?

@rushtong
Copy link
Contributor

The actual endpoint throws a CORS error - Please correct me I'm wrong, but there's nothing we can do about that, and it might be okay in dev? But if any fixes need to happen, it's in the api?

The CORS error is because we're not going through the local proxy.

Copy link
Contributor

@connorlbark connorlbark left a comment

Choose a reason for hiding this comment

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

was able to test it ok, the changes themselves look good, once we figure out the config stuff I will retry + approve.

@@ -133,7 +117,14 @@ export default function Translator() {
style: { width: '100%', justifyContent: 'center' }
}, [Spinner]),

div({ isRendered: !isLoading, className: 'row no-margin' }, [
div({ isRendered: error }, [
'There was an error running your request'
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to use error to show something more specific

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i dont want to show the error message if it's something wrong with our servers or our code, only if it's a user error (that they can do something about). For now, I think this is okay, since I'm just trying to rush this code in real quick ^_^;

Copy link
Contributor

@rushtong rushtong left a comment

Choose a reason for hiding this comment

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

👍🏽

Copy link
Contributor

@JVThomas JVThomas left a comment

Choose a reason for hiding this comment

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

UI code is hitting the endpoint and relaying the results to the client.

@lu-c lu-c merged commit 1497e36 into develop Sep 14, 2022
@lu-c lu-c deleted the translate-paragraph2 branch September 14, 2022 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants