(core) Hides the link icon in print view

Summary:
Users complained about white spaces left by the link icon when printing.
Diff fixes the issue by hiding link icon completely.

Test Plan: Adds tests in `nbrowser/Printing.ts`

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3767
This commit is contained in:
Cyprien P
2023-01-18 17:43:39 +01:00
parent 1dafe4bae0
commit ca5ae6fa3f
4 changed files with 20 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
import {DataRowModel} from 'app/client/models/DataRowModel';
import {ViewFieldRec} from 'app/client/models/entities/ViewFieldRec';
import {cssLabel, cssRow} from 'app/client/ui/RightPanelStyles';
import {colors, testId} from 'app/client/ui2018/cssVars';
import {colors, hideInPrintView, testId} from 'app/client/ui2018/cssVars';
import {icon} from 'app/client/ui2018/icons';
import {IOptionFull, select} from 'app/client/ui2018/menus';
import {NTextBox} from 'app/client/widgets/NTextBox';
@@ -103,7 +103,7 @@ export class Reference extends NTextBox {
cssRef.cls('-blank', use => use(formattedValue).hasBlankReference),
dom.style('text-align', this.alignment),
dom.cls('text_wrapping', this.wrapping),
cssRefIcon('FieldReference', testId('ref-link-icon')),
cssRefIcon('FieldReference', testId('ref-link-icon'), hideInPrintView()),
dom.text(use => {
if (use(referenceId) === 0) { return ''; }
if (use(formattedValue).hasBlankReference) { return '[Blank]'; }