Skip to content

Commit

Permalink
Use semantic HTML tags
Browse files Browse the repository at this point in the history
Signed-off-by: Prem Kumar <[email protected]>
  • Loading branch information
onprem committed Aug 20, 2020
1 parent 2f38a92 commit 2d1a847
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 66 deletions.
120 changes: 60 additions & 60 deletions pkg/ui/bindata.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('BlockDetails', () => {
const blockDetails = mount(<BlockDetails {...defaultProps} />);

it('renders a heading with block ulid', () => {
const title = blockDetails.find('div > p');
const title = blockDetails.find('div > span');
expect(title).toHaveLength(1);
expect(title.text()).toEqual(sampleBlock.ulid);
});
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/react-app/src/thanos/pages/blocks/BlockDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const BlockDetails: FC<BlockDetailsProps> = ({ block, selectBlock }) => {
{block && (
<>
<div className={styles.detailsTop}>
<p>{block.ulid}</p>
<span className={styles.header}>{block.ulid}</span>
<button className={styles.closeBtn} onClick={(): void => selectBlock(undefined)}>
&times;
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Blocks SourceView', () => {
const sourceView = mount(<SourceView {...defaultProps} />);

it('renders a paragraph with title', () => {
const title = sourceView.find('div > p');
const title = sourceView.find('div > span');
expect(title).toHaveLength(1);
expect(title.text()).toEqual(source);
});
Expand Down
2 changes: 1 addition & 1 deletion pkg/ui/react-app/src/thanos/pages/blocks/SourceView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const SourceView: FC<SourceViewProps> = ({ data, title, gridMaxTime, grid
<>
<div className={styles.source}>
<div className={styles.title} title={title}>
<p>{title}</p>
<span>{title}</span>
</div>
<div className={styles.rowsContainer}>
{Object.keys(data).map(k => (
Expand Down
5 changes: 3 additions & 2 deletions pkg/ui/react-app/src/thanos/pages/blocks/blocks.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
flex-wrap: wrap-reverse;
}

.detailsTop > p {
.header {
margin: 0;
padding: 0;
font-weight: 700;
Expand Down Expand Up @@ -93,7 +93,8 @@
padding: 0 1em;
}

.title > p {
.title > span {
display: block;
width: 8vw;
margin: 0;
text-align: center;
Expand Down

0 comments on commit 2d1a847

Please sign in to comment.