Skip to content

Commit e2d2fb6

Browse files
Merge pull request #208 from pneumaticapp/frontend/ui/46275__print_a_workflow_log
46275 frontend [ workflows ] print a workflow log
2 parents 8ff7fa1 + 5bdab6c commit e2d2fb6

6 files changed

Lines changed: 47 additions & 8 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/* stylelint-disable declaration-no-important */
2+
@media print {
3+
html,
4+
body {
5+
overflow: visible !important;
6+
height: auto !important;
7+
}
8+
9+
[id='pneumatic-frontend'] {
10+
overflow: visible !important;
11+
height: auto !important;
12+
}
13+
14+
main .container-fluid .row {
15+
display: flex !important;
16+
}
17+
18+
* {
19+
print-color-adjust: exact;
20+
-webkit-print-color-adjust: exact;
21+
scrollbar-width: none;
22+
}
23+
24+
*::-webkit-scrollbar {
25+
display: none;
26+
}
27+
28+
.no-print {
29+
display: none !important;
30+
}
31+
}
32+

frontend/src/public/assets/css/style.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Table of Contents
33
// -------------------
44
// 00. Variables
5+
// 00.1. Print
56
// 01. Library
67
// 02. Reset style
78
// 03. Base style
@@ -14,6 +15,12 @@
1415

1516
@import './variables/color';
1617

18+
/* ===================
19+
// 00.1. Print
20+
// =================== */
21+
22+
@import './print/print.css';
23+
1724
/* ===================
1825
// 01. Library
1926
// ===================
@@ -93,4 +100,4 @@ svg {
93100
/* Fix bootstrap style */
94101
.form-control {
95102
font-size: 1.5rem !important;
96-
}
103+
}

frontend/src/public/components/TaskCard/TaskCard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export function TaskCard({
365365
<UsersDropdown
366366
isMulti
367367
controlSize="sm"
368-
className={styles['responsible']}
368+
className={classnames(styles['responsible'], 'no-print')}
369369
placeholder={formatMessage({ id: 'user.search-field-placeholder' })}
370370
options={[...performerGroupDropdownOption, ...performerDropdownOption]}
371371
value={[...performerDropdownValue, ...performerGroupDropdownValue]}
@@ -379,7 +379,7 @@ export function TaskCard({
379379
)}
380380

381381
{viewMode !== ETaskCardViewMode.Guest && !task.isReadOnlyViewer && (
382-
<GuestController ref={guestsControllerRef} taskId={task.id} className={styles['guest-dropdown']} />
382+
<GuestController ref={guestsControllerRef} taskId={task.id} className={classnames(styles['guest-dropdown'], 'no-print')} />
383383
)}
384384
</>
385385
);
@@ -497,7 +497,7 @@ export function TaskCard({
497497
);
498498

499499
return (
500-
<div className={styles['buttons']}>
500+
<div className={classnames(styles['buttons'], 'no-print')}>
501501
<div className={styles['buttons__complete']}>
502502
{isEmbeddedWorkflowsComplete ? (
503503
renderCompleteButton(!isEmbeddedWorkflowsComplete)

frontend/src/public/components/Workflows/WorkflowLog/WorkflowLog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export const WorkflowLog = ({
222222
}
223223

224224
return (
225-
<div className={styles['comment-field']}>
225+
<div className={classnames(styles['comment-field'], 'no-print')}>
226226
<PopupCommentFieldContainer sendComment={sendComment} taskId={taskId} mentions={mentions} />
227227
</div>
228228
);

frontend/src/public/components/Workflows/WorkflowLog/WorkflowLogEvents/WorkflowLogTaskComment/WorkflowLogTaskComment.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export function WorkflowLogTaskComment({
158158
if (currentUserId !== userId || workflowStatus === EWorkflowStatus.Finished) return null;
159159

160160
return (
161-
<div className={styles['comment__actions']}>
161+
<div className={classnames(styles['comment__actions'], 'no-print')}>
162162
{renderDeleteButton()}
163163
{!isDelete && (
164164
<button
@@ -327,7 +327,7 @@ export function WorkflowLogTaskComment({
327327
<Tooltip
328328
visible={isShowTooltipEmoji}
329329
size="auto"
330-
containerClassName={classnames(styles['comment__footer-item'], styles['is-add-emoji'])}
330+
containerClassName={classnames(styles['comment__footer-item'], styles['is-add-emoji'], 'no-print')}
331331
content={
332332
isShowEmoji && (
333333
<Picker

frontend/stylelint/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ module.exports = {
255255
// Property
256256
// 'property-blacklist': array|string,
257257
'property-case': 'lower',
258-
'property-no-unknown': [true, { ignoreProperties: ['composes', 'field-sizing'] }],
258+
'property-no-unknown': [true, { ignoreProperties: ['composes', 'field-sizing', 'print-color-adjust'] }],
259259
'property-no-vendor-prefix': true,
260260
// 'property-whitelist': array|string,
261261
// Keyframe declaration

0 commit comments

Comments
 (0)