refactor: Convert 'show more' div to semantic button

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2025-12-03 00:50:58 +00:00
parent b1d4fc2903
commit fd5acd4861
2 changed files with 16 additions and 1 deletions

View File

@@ -93,7 +93,7 @@ function Comments({ cache }) {
<div className={isCollapsed ? 'text hidden' : 'text'} dangerouslySetInnerHTML={{ __html: c.text || '<p>[Empty / deleted comment]</p>'}} />
{hidden && hasChildren ?
<div className='comment lined info pointer' onClick={() => expandComment(cid)}>[show {countComments(c)-1} more]</div>
<button className='comment lined info pointer' onClick={() => expandComment(cid)}>[show {countComments(c)-1} more]</button>
:
c.comments.map(i => displayComment(story, i, level + 1))
}

View File

@@ -225,6 +225,21 @@ button.collapser {
color: inherit;
}
button.comment {
background: transparent;
border-top: none;
border-right: none;
border-bottom: none;
margin: 0;
padding-top: 0;
padding-right: 0;
padding-bottom: 0;
font: inherit;
color: inherit;
text-align: left;
width: 100%;
}
.comment .pointer {
cursor: pointer;
}