Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(issue-views): Fix ul/li semantics #79317

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions static/app/components/draggableTabs/draggableTabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function Tabs({
tabVariant?: BaseTabProps['variant'];
value?: string | number;
}) {
const tabListRef = useRef<HTMLUListElement>(null);
const tabListRef = useRef<HTMLDivElement>(null);
const {tabListProps} = useTabList({orientation, ...ariaProps}, state, tabListRef);

const values = useMemo(() => [...state.collection], [state.collection]);
Expand Down Expand Up @@ -202,13 +202,7 @@ function Tabs({

return (
<TabListWrap {...tabListProps} className={className} ref={tabListRef}>
<ReorderGroup
axis="x"
values={values}
onReorder={onReorder}
as="div"
initial={false}
>
<ReorderGroup axis="x" values={values} onReorder={onReorder} initial={false}>
{tabs.map((item, i) => (
<Fragment key={item.key}>
<TabItemWrap
Expand All @@ -225,7 +219,6 @@ function Tabs({
})
}
value={item}
as="div"
data-key={item.key}
dragConstraints={dragConstraints} // dragConstraints are the bounds that the tab can be dragged within
dragElastic={0} // Prevents the tab from being dragged outside of the dragConstraints (w/o this you can drag it outside but it'll spring back)
Expand Down Expand Up @@ -494,7 +487,7 @@ const AddViewTempTabWrap = styled('div')`
align-items: center;
`;

const TabListWrap = styled('ul')`
const TabListWrap = styled('div')`
padding: 0;
margin: 0;
list-style-type: none;
Expand All @@ -507,6 +500,9 @@ const ReorderGroup = styled(Reorder.Group<Node<DraggableTabListItemProps>>)`
overflow: hidden;
width: max-content;
position: relative;
margin: 0;
padding: 0;
list-style-type: none;
`;

const AddViewButton = styled(Button)`
Expand Down
Loading