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

fix: tweak info text and style #1048

Merged
merged 4 commits into from
Sep 8, 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
23 changes: 10 additions & 13 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2020-09-08T06:57:57.672Z\n"
"PO-Revision-Date: 2020-09-08T06:57:57.672Z\n"
"POT-Creation-Date: 2020-09-08T15:07:59.261Z\n"
"PO-Revision-Date: 2020-09-08T15:07:59.261Z\n"

msgid "Untitled dashboard"
msgstr ""
Expand Down Expand Up @@ -68,27 +68,24 @@ msgstr ""
msgid "Print"
msgstr ""

msgid "The pages below are a preview of how the dashboard layout will be printed."
msgid "dashboard layout"
msgstr ""

msgid ""
"The pages below are a preview of how each dashboard item will be printed on "
"a separate page."
msgid "one item per page"
msgstr ""

msgid ""
"Use the default printer settings for best results and check that all "
"dashboard items have finished loading before printing. This text will not "
"be printed."
msgid "Print Preview"
msgstr ""

msgid "dashboard layout"
msgid "Use Chrome or Edge web browser"
msgstr ""

msgid "one item per page"
msgid "Wait for all dashboard items to load before printing this page"
msgstr ""

msgid "Print Preview"
msgid ""
"Use A4 landscape paper size and default margin settings in the browser "
"print dialog"
msgstr ""

msgid "{{count}} selected"
Expand Down
33 changes: 18 additions & 15 deletions src/components/Dashboard/PrintInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,6 @@ const PrintInfo = ({ isLayout }) => {
? a4LandscapeWidthPx
: window.innerWidth

const infoPartOne = isLayout
? i18n.t(
'The pages below are a preview of how the dashboard layout will be printed.'
)
: i18n.t(
'The pages below are a preview of how each dashboard item will be printed on a separate page.'
)

const infoPartTwo = i18n.t(
'Use the default printer settings for best results and check that all dashboard items have finished loading before printing. This text will not be printed.'
)

const infoHeader = isLayout
? i18n.t('dashboard layout')
: i18n.t('one item per page')
Expand All @@ -33,9 +21,24 @@ const PrintInfo = ({ isLayout }) => {
{`${i18n.t('Print Preview')}: ${infoHeader}`}
</p>
<div style={{ maxWidth }}>
<p
className={classes.info}
>{`${infoPartOne} ${infoPartTwo}`}</p>
<p className={classes.info}>
{i18n.t('For best print results:')}
janhenrikoverland marked this conversation as resolved.
Show resolved Hide resolved
</p>
<p className={classes.info}>
<ul className={classes.infoList}>
<li>{i18n.t('Use Chrome or Edge web browser')}</li>
<li>
{i18n.t(
'Wait for all dashboard items to load before printing this page'
janhenrikoverland marked this conversation as resolved.
Show resolved Hide resolved
)}
</li>
<li>
{i18n.t(
'Use A4 landscape paper size and default margin settings in the browser print dialog'
)}
</li>
</ul>
</p>
</div>
<hr className={classes.divider} />
</div>
Expand Down
4 changes: 4 additions & 0 deletions src/components/Dashboard/styles/PrintInfo.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
max-width: 800px;
}

.infoList > li {
padding: 4px 0;
}

.divider {
width: 1102px;
margin-left: 0px;
Expand Down