Skip to content

Conversation

aaron-steinfeld
Copy link
Contributor

Description

Adds a code-style table cell renderer that uses a gray background and monospaced font.
image

Testing

Added unit tests, verified in action. Also checked case of no data and data too long to fit to verify that they show "Unknown" and truncate, respectively.

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

@aaron-steinfeld aaron-steinfeld requested a review from a team as a code owner February 22, 2021 23:47
@codecov
Copy link

codecov bot commented Feb 22, 2021

Codecov Report

Merging #627 (76aa65b) into main (fbbf449) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #627   +/-   ##
=======================================
  Coverage   85.20%   85.21%           
=======================================
  Files         772      773    +1     
  Lines       15936    15941    +5     
  Branches     2055     2055           
=======================================
+ Hits        13579    13584    +5     
  Misses       2323     2323           
  Partials       34       34           
Impacted Files Coverage Δ
...nderers/code/code-table-cell-renderer.component.ts 100.00% <100.00%> (ø)
...s/components/src/table/cells/table-cells.module.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbbf449...76aa65b. Read the comment docs.

@github-actions

This comment has been minimized.

@aaron-steinfeld aaron-steinfeld merged commit 9e94511 into main Feb 23, 2021
@aaron-steinfeld aaron-steinfeld deleted the code-table-cell-renderer branch February 23, 2021 01:03
@github-actions
Copy link

Unit Test Results

    4 files  ±0  238 suites  +1   14m 26s ⏱️ +22s
858 tests +2  858 ✔️ +2  0 💤 ±0  0 ❌ ±0 
862 runs  +2  862 ✔️ +2  0 💤 ±0  0 ❌ ±0 

Results for commit 9e94511. ± Comparison against base commit fbbf449.

styleUrls: ['./code-table-cell-renderer.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<div class="code-cell" [htTooltip]="this.value | htDisplayString">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this code or just version? We might have to do more to support code view right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version was just the example. It's code like backticks are code in markdown - not supposed to be multiline support in a table cell, although I guess we could add that if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants