Indent feedback

This commit is contained in:
Ben Gotow
2026-03-05 23:14:47 -06:00
parent d10787fae7
commit 08f7ffebcb
4 changed files with 10 additions and 9 deletions

View File

@@ -69,7 +69,7 @@ export class ButtonDropdown extends React.Component<ButtonDropdownProps, ButtonD
aria-label={this.props.primaryTitle}
onClick={this.props.primaryClick}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') this.props.primaryClick(e as any);
if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); this.props.primaryClick(); }
}}
>
{this.props.primaryItem}
@@ -78,17 +78,17 @@ export class ButtonDropdown extends React.Component<ButtonDropdownProps, ButtonD
role="button"
tabIndex={0}
aria-label={localized('More options')}
aria-haspopup="listbox"
aria-haspopup="menu"
aria-expanded={this.state.open !== false}
className="secondary-picker"
onClick={this.toggleDropdown}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') this.toggleDropdown();
if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); this.toggleDropdown(); }
}}
>
<RetinaImg name={'icon-thread-disclosure.png'} mode={RetinaImg.Mode.ContentIsMask} />
</div>
<div role="listbox" className="secondary-items" onMouseDown={this._onMenuClick}>
<div role="menu" className="secondary-items" onMouseDown={this._onMenuClick}>
{menu}
</div>
</div>

View File

@@ -228,9 +228,6 @@ export class MultiselectList extends React.Component<MultiselectListProps, Multi
<KeyCommandsRegion
globalHandlers={this._globalKeymapHandlers()}
className={className}
role="listbox"
aria-multiselectable="true"
aria-label={localized('Thread list')}
>
<ListTabular
ref={this.listRef}

View File

@@ -24,6 +24,7 @@ const CounterStyles = {
type OutlineViewItemProps = {
item: IOutlineViewItem;
level?: number;
isFirst?: boolean;
};
type OutlineViewItemState = {
editing: boolean;
@@ -375,7 +376,7 @@ class OutlineViewItem extends Component<OutlineViewItemProps, OutlineViewItemSta
aria-selected={item.selected || false}
aria-expanded={hasChildren ? !item.collapsed : undefined}
aria-label={item.name}
tabIndex={item.selected ? 0 : -1}
tabIndex={item.selected || this.props.isFirst ? 0 : -1}
>
<span className={containerClasses}>
<DisclosureTriangle

View File

@@ -242,7 +242,10 @@ export class OutlineView extends Component<OutlineViewProps, OutlineViewState> {
}
_renderItems() {
return this.props.items.map((item) => <OutlineViewItem key={item.id} item={item} />);
const noneSelected = !this.props.items.some(item => item.selected);
return this.props.items.map((item, idx) => (
<OutlineViewItem key={item.id} item={item} isFirst={noneSelected && idx === 0} />
));
}
_renderOutline(allowCreate, collapsed) {