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

adding more error handling to smartling #24

Merged
merged 2 commits into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
styling updates
  • Loading branch information
davidfateh committed Feb 12, 2020
commit 912844842bf8ee6269af934e5de10171f1f23a24
2 changes: 1 addition & 1 deletion apps/smartling/frontend/src/AppConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default class AppConfig extends React.Component<Props, State> {
<Heading>About Smartling</Heading>
<Paragraph className="about-p">
This app allows you to view the translation status of entries in the Contentful
web app and easily find corresponding entries within a Smartling project. Go to your Smartling <TextLink href="https://dashboard.smartling.com" target="_blank" rel="noopener noreferrer">dashboard</TextLink>.
web app and easily find corresponding entries within a <TextLink href="https://dashboard.smartling.com" target="_blank" rel="noopener noreferrer">Smartling</TextLink> project.
</Paragraph>
</Typography>
<hr />
Expand Down
2 changes: 2 additions & 0 deletions apps/smartling/frontend/src/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ export default class Sidebar extends React.Component<Props, State> {
smartlingBody = (
<Note title="Connection error" noteType="negative" className="general-error">
Please ensure that you have access to the connected Smartling project.
<br />
<TextLink href="https://contentful.com/developers/docs/extensibility/apps/smartling/" target="_blank" rel="noopener noreferrer">View documentation</TextLink>
</Note>
);
}
Expand Down
42 changes: 36 additions & 6 deletions apps/smartling/frontend/src/__snapshots__/index.spec.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ Object {
class="Paragraph__Paragraph___2aO-9 about-p f36-margin-bottom--m"
data-test-id="cf-ui-paragraph"
>
This app allows you to view the translation status of entries in the Contentful web app and easily find corresponding entries within a Smartling project. Go to your Smartling
This app allows you to view the translation status of entries in the Contentful web app and easily find corresponding entries within a
<a
class="TextLink__TextLink___1biUr a11y__focus-outline--default___2hwb1 TextLink__TextLink--primary___2Vc9F"
data-test-id="cf-ui-text-link"
Expand All @@ -410,10 +410,10 @@ Object {
class="TabFocusTrap__TabFocusTrap___39Vty"
tabindex="-1"
>
dashboard
Smartling
</span>
</a>
.
project.
</p>
</div>
<hr />
Expand Down Expand Up @@ -895,7 +895,7 @@ Object {
class="Paragraph__Paragraph___2aO-9 about-p f36-margin-bottom--m"
data-test-id="cf-ui-paragraph"
>
This app allows you to view the translation status of entries in the Contentful web app and easily find corresponding entries within a Smartling project. Go to your Smartling
This app allows you to view the translation status of entries in the Contentful web app and easily find corresponding entries within a
<a
class="TextLink__TextLink___1biUr a11y__focus-outline--default___2hwb1 TextLink__TextLink--primary___2Vc9F"
data-test-id="cf-ui-text-link"
Expand All @@ -907,10 +907,10 @@ Object {
class="TabFocusTrap__TabFocusTrap___39Vty"
tabindex="-1"
>
dashboard
Smartling
</span>
</a>
.
project.
</p>
</div>
<hr />
Expand Down Expand Up @@ -1665,6 +1665,21 @@ Object {
</div>
<div>
Please ensure that you have access to the connected Smartling project.
<br />
<a
class="TextLink__TextLink___1biUr a11y__focus-outline--default___2hwb1 TextLink__TextLink--primary___2Vc9F"
data-test-id="cf-ui-text-link"
href="https://contentful.com/developers/docs/extensibility/apps/smartling/"
rel="noopener noreferrer"
target="_blank"
>
<span
class="TabFocusTrap__TabFocusTrap___39Vty"
tabindex="-1"
>
View documentation
</span>
</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -1755,6 +1770,21 @@ Object {
</div>
<div>
Please ensure that you have access to the connected Smartling project.
<br />
<a
class="TextLink__TextLink___1biUr a11y__focus-outline--default___2hwb1 TextLink__TextLink--primary___2Vc9F"
data-test-id="cf-ui-text-link"
href="https://contentful.com/developers/docs/extensibility/apps/smartling/"
rel="noopener noreferrer"
target="_blank"
>
<span
class="TabFocusTrap__TabFocusTrap___39Vty"
tabindex="-1"
>
View documentation
</span>
</a>
</div>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions apps/smartling/frontend/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ body {

.general-error {
margin-top: var(--spacing-l);

a {
margin-top: var(--spacing-2xs);
display: block !important;
}
}

.smartling-status {
Expand Down