Commit 50cdc9f2 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner

Simplify document outline

Convert some `section` elements to `div`s for a less chattery document
structure.
parent bbba566e
......@@ -39,7 +39,7 @@ export default function AnnotationBody({
const showTagList = !isEditing && tags.length > 0;
return (
<section className="annotation-body">
<div className="annotation-body">
{showExcerpt && (
<Excerpt
collapse={isCollapsed}
......@@ -78,7 +78,7 @@ export default function AnnotationBody({
)}
{showTagList && <TagList annotation={annotation} tags={tags} />}
{isEditing && <TagEditor onEditTags={onEditTags} tagList={tags} />}
</section>
</div>
);
}
......
......@@ -23,7 +23,7 @@ function AnnotationQuote({ annotation, isFocused, settings = {} }) {
const documentLanguage = '';
return (
<section
<div
className={classnames('annotation-quote', {
'is-orphan': isOrphan(annotation),
'is-focused': isFocused,
......@@ -43,7 +43,7 @@ function AnnotationQuote({ annotation, isFocused, settings = {} }) {
{quote(annotation)}
</blockquote>
</Excerpt>
</section>
</div>
);
}
......
......@@ -214,13 +214,13 @@ describe('ThreadList', () => {
* Get the blank spacer `<div>` that reserves space for non-rendered threads
* above the viewport.
*/
const getUpperSpacer = wrapper => wrapper.find('div').first();
const getUpperSpacer = wrapper => wrapper.find('div > div').first();
/**
* Get the blank spacer `<div>` that reserves space for non-rendered threads
* below the viewport.
*/
const getLowerSpacer = wrapper => wrapper.find('div').last();
const getLowerSpacer = wrapper => wrapper.find('div > div').last();
it('renders dimensional elements above and below visible threads', () => {
const wrapper = createComponent();
......
......@@ -174,7 +174,7 @@ function ThreadList({ thread, $rootScope }) {
}, [visibleThreads]);
return (
<section>
<div>
<div style={{ height: offscreenUpperHeight }} />
{visibleThreads.map(child => (
<div className="thread-list__card" id={child.id} key={child.id}>
......@@ -182,7 +182,7 @@ function ThreadList({ thread, $rootScope }) {
</div>
))}
<div style={{ height: offscreenLowerHeight }} />
</section>
</div>
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment