Skip to content

Commit

Permalink
Cleanup: Simplify CSS/HTML, Correct typos
Browse files Browse the repository at this point in the history
* Checkbox message: Use CSS class instead of hardcoded tags
* Generalize CSS class name
* Use same HTML for both messages
* Adjust "no results" message phrasing
* Correct whitespace typos (line 325)

Signed-off-by: Erica Bugden <erica.bugden@gmail.com>
  • Loading branch information
ebugden authored and bhufmann committed Jan 19, 2022
1 parent 06da4f0 commit 82fa544
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions packages/react-components/src/components/xy-output-component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,20 +315,18 @@ export class XYOutputComponent extends AbstractTreeOutputComponent<AbstractOutpu
// width={this.props.style.chartWidth}
if (this.state.outputStatus === ResponseStatus.COMPLETED && this.state.xyTree.length === 0) {
return <React.Fragment>
<div className='no-data'>
Trace analysis completed.
<div className='chart-message'>
Trace analysis complete.
<br />
No results: Trace missing required events.
</div>
</React.Fragment>;
}
if (this.state.outputStatus === ResponseStatus.COMPLETED && this.state.xyData?.datasets?.length===0 ) {
if (this.state.outputStatus === ResponseStatus.COMPLETED && this.state.xyData?.datasets?.length === 0) {
return <React.Fragment>
{
<p className='no-data' style={{fontSize: 20, marginRight: '5px', marginLeft: '5px', justifyContent:'center', alignItems:'center'}}>
Select a checkbox to see analysis results
</p>
}
<div className='chart-message'>
Select a checkbox to see analysis results
</div>
</React.Fragment>;
}
return <React.Fragment>
Expand Down
4 changes: 2 additions & 2 deletions packages/react-components/style/output-components-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ canvas {
margin: auto;
}

.no-data {
font-size: 24px;
.chart-message {
font-size: 20px;
text-align: center;
position: relative;
transform: translate(0, -50%);
Expand Down

0 comments on commit 82fa544

Please sign in to comment.