Skip to content

Enhance CommentThread so extension can create vertically-scrollable threads #174629

@gjsjohnmurray

Description

@gjsjohnmurray

An extension I have created uses the comments API to create threads that display documentation. In some cases the documentation is lengthy. I would like to be able to set a height limit on the comments-container div.

I experimented by modifying this code:

display() {
this._commentsElement = dom.append(this.container, dom.$('div.comments-container'));
this._commentsElement.setAttribute('role', 'presentation');
this._commentsElement.tabIndex = 0;
this._updateAriaLabel();

adding this line to hard-wire a maximum height and vertical scrolling:

this._commentsElement.setAttribute('style', 'max-height: 15em; overflow-y: auto;');

It seemed to work.

image

Would you be open to a proper implementation of this as proposed API?

Metadata

Metadata

Assignees

Labels

commentsComments Provider/Widget/Panel issuesfeature-requestRequest for new features or functionality

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions