Skip to content

Commit

Permalink
[ui] Monospace font fixes in oss
Browse files Browse the repository at this point in the history
  • Loading branch information
hellendag committed Apr 22, 2024
1 parent 55e37b9 commit e5033c2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const Trace = styled.div`
background-color: ${Colors.backgroundLight()};
color: ${Colors.textLight()};
font-family: ${FontFamily.monospace};
font-size: 13px;
max-height: 90vh;
overflow: auto;
white-space: pre;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ const ErrorHeader = styled.h3`
const Trace = styled.div`
color: ${Colors.textLight()};
font-family: ${FontFamily.monospace};
font-size: 12px;
white-space: pre;
padding-bottom: 1em;
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ export const AssetNodeMinimal = ({
/>
) : null}
{isStale ? <MinimalNodeStaleDot assetKey={assetKey} liveData={liveData} /> : null}
<MinimalName style={{fontSize: 28}} $isSource={isSource}>
{withMiddleTruncation(displayName, {maxLength: 20})}
<MinimalName style={{fontSize: 24}} $isSource={isSource}>
{withMiddleTruncation(displayName, {maxLength: 18})}
</MinimalName>
</MinimalAssetNodeBox>
</TooltipStyled>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const GroupNodeNameAndRepo = ({group, minimal}: {minimal: boolean; group:
</div>
</Box>
<Box style={{fontSize: 12, lineHeight: '1em', color: Colors.textLight()}}>
{withMiddleTruncation(location, {maxLength: maxLengthAtFontSize(14)})}
{withMiddleTruncation(location, {maxLength: maxLengthAtFontSize(16)})}
</Box>
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ export class Description extends React.Component<IDescriptionProps, IDescription
sel.removeAllRanges();
sel.addRange(range);
}}
$fontSize={this.props.fontSize || '0.8rem'}
style={{
maxHeight: expanded ? undefined : this.props.maxHeight || DEFAULT_MAX_HEIGHT,
fontSize: this.props.fontSize || '0.8rem',
}}
>
{hasMore && (
Expand All @@ -101,12 +101,18 @@ export class Description extends React.Component<IDescriptionProps, IDescription
}
}

const Container = styled.div`
const Container = styled.div<{$fontSize: string | number}>`
overflow: hidden;
position: relative;
font-size: ${({$fontSize}) => (typeof $fontSize === 'number' ? `${$fontSize}px` : $fontSize)};
p:last-child {
margin-bottom: 0;
}
& code,
& pre {
font-size: ${({$fontSize}) => (typeof $fontSize === 'number' ? `${$fontSize}px` : $fontSize)};
}
`;

const ShowMoreHandle = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ const NowMarker = styled.div`
border-radius: 1px;
color: ${Colors.accentReversed()};
cursor: default;
font-size: 12px;
font-size: 10px;
line-height: 12px;
margin-left: -12px;
padding: 1px 4px;
Expand Down

0 comments on commit e5033c2

Please sign in to comment.