kopia lustrzana https://github.com/wagtail/wagtail
Fix eslint warnings
rodzic
7a03c125de
commit
9d19c2aa13
|
@ -338,6 +338,7 @@ export class CommentApp {
|
|||
}
|
||||
|
||||
// If this is the initial focused comment. Focus and pin it
|
||||
// eslint-disable-next-line no-warning-comments
|
||||
// TODO: Scroll to this comment
|
||||
if (initialFocusedCommentId && comment.pk === initialFocusedCommentId) {
|
||||
this.store.dispatch(setFocusedComment(commentId, { updatePinnedComment: true, forceFocus: true }));
|
||||
|
|
|
@ -201,7 +201,9 @@ interface RenderSidebarStoryOptions {
|
|||
strings?: Strings;
|
||||
}
|
||||
|
||||
function renderSidebarStory(modules: ModuleDefinition[], { rtl = false, strings = null }: RenderSidebarStoryOptions = {}) {
|
||||
function renderSidebarStory(
|
||||
modules: ModuleDefinition[], { rtl = false, strings = null }: RenderSidebarStoryOptions = {}
|
||||
) {
|
||||
// Enable focus outlines so we can test them
|
||||
React.useEffect(() => {
|
||||
initFocusOutline();
|
||||
|
|
|
@ -115,7 +115,10 @@ export const Sidebar: React.FunctionComponent<SidebarProps> = (
|
|||
);
|
||||
|
||||
return (
|
||||
<aside className={'sidebar' + (slim ? ' sidebar--slim' : '')} onMouseEnter={onMouseEnterHandler} onMouseLeave={onMouseLeaveHandler}>
|
||||
<aside
|
||||
className={'sidebar' + (slim ? ' sidebar--slim' : '')}
|
||||
onMouseEnter={onMouseEnterHandler} onMouseLeave={onMouseLeaveHandler}
|
||||
>
|
||||
<div className="sidebar__inner">
|
||||
<button onClick={onClickCollapseToggle} className="button sidebar__collapse-toggle">
|
||||
{collapsed ? <Icon name="angle-double-right" /> : <Icon name="angle-double-left" />}
|
||||
|
|
|
@ -112,6 +112,7 @@ window.comments = (() => {
|
|||
onUnfocus() {
|
||||
this.node.classList.add('button-secondary');
|
||||
this.node.ariaLabel = STRINGS.FOCUS_COMMENT;
|
||||
// eslint-disable-next-line no-warning-comments
|
||||
// TODO: ensure comment is focused accessibly when this is clicked,
|
||||
// and that screenreader users can return to the annotation point when desired
|
||||
}
|
||||
|
@ -213,6 +214,7 @@ window.comments = (() => {
|
|||
}
|
||||
}
|
||||
});
|
||||
// eslint-disable-next-line no-warning-comments
|
||||
return unsubscribeWidget; // TODO: listen for widget deletion and use this
|
||||
}
|
||||
updateVisibility(newShown) {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
jest.mock('../..');
|
||||
|
||||
const wagtail = require('../..');
|
||||
|
||||
document.addEventListener = jest.fn();
|
||||
|
||||
require('./wagtailadmin');
|
||||
|
|
Ładowanie…
Reference in New Issue