Comments: Fixed display, added archive list support for editor toolbox
Some checks failed
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
analyse-php / build (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled

This commit is contained in:
Dan Brown
2025-05-09 12:14:28 +01:00
parent c82fa33210
commit a27df485bb
4 changed files with 43 additions and 3 deletions

View File

@ -34,13 +34,26 @@ export class PageCommentReference extends Component {
window.addEventListener('editor-toolbox-change', (event) => {
const tabName: string = (event as {detail: {tab: string, open: boolean}}).detail.tab;
const isOpen = (event as {detail: {tab: string, open: boolean}}).detail.open;
if (tabName === 'comments' && isOpen) {
if (tabName === 'comments' && isOpen && this.link.checkVisibility()) {
this.showForEditor();
} else {
this.hideMarker();
}
});
// Handle visibility changes within editor toolbox archived details dropdown
window.addEventListener('toggle', event => {
if (event.target instanceof HTMLElement && event.target.contains(this.link)) {
window.requestAnimationFrame(() => {
if (this.link.checkVisibility()) {
this.showForEditor();
} else {
this.hideMarker();
}
});
}
}, {capture: true});
// Handle comments tab changes to hide/show markers & indicators
window.addEventListener('tabs-change', event => {
const sectionId = (event as {detail: {showing: string}}).detail.showing;