fix: resolve tab flickering when switching between requests (#6825)

This commit is contained in:
gopu-bruno
2026-01-16 12:08:14 +05:30
committed by GitHub
parent b1e6a707bf
commit bd0894ede0
2 changed files with 9 additions and 15 deletions

View File

@@ -14,6 +14,10 @@ const Wrapper = styled.div`
z-index: 0;
}
.scroll-chevrons.hidden {
display: none;
}
.tabs-scroll-container {
overflow-x: auto;
overflow-y: clip;
@@ -192,10 +196,6 @@ const Wrapper = styled.div`
}
}
&.has-chevrons ul {
padding-left: 0;
}
.special-tab-icon {
color: ${(props) => props.theme.primary.text};
}

View File

@@ -103,14 +103,9 @@ const RequestTabs = () => {
});
};
const getRootClassname = () => {
return classnames({
'has-chevrons': showChevrons
});
};
// Todo: Must support ephemeral requests
return (
<StyledWrapper className={getRootClassname()}>
<StyledWrapper>
{newRequestModalOpen && (
<NewRequest collectionUid={activeCollection?.uid} onClose={() => setNewRequestModalOpen(false)} />
)}
@@ -118,12 +113,11 @@ const RequestTabs = () => {
<>
<CollectionToolBar collection={activeCollection} />
<div className="flex items-center gap-2 pl-2" ref={collectionTabsRef}>
{showChevrons ? (
<div className={classnames('scroll-chevrons', { hidden: !showChevrons })}>
<ActionIcon size="lg" onClick={leftSlide} aria-label="Left Chevron" style={{ marginBottom: '3px' }}>
<IconChevronLeft size={18} strokeWidth={1.5} />
</ActionIcon>
) : null}
</div>
{/* Moved to post mvp */}
{/* <li className="select-none new-tab mr-1" onClick={createNewTab}>
<div className="flex items-center home-icon-container">
@@ -175,11 +169,11 @@ const RequestTabs = () => {
</ActionIcon>
)}
{showChevrons ? (
<div className={classnames('scroll-chevrons', { hidden: !showChevrons })}>
<ActionIcon size="lg" onClick={rightSlide} aria-label="Right Chevron" style={{ marginBottom: '3px' }}>
<IconChevronRight size={18} strokeWidth={1.5} />
</ActionIcon>
) : null}
</div>
{/* Moved to post mvp */}
{/* <li className="select-none new-tab choose-request">
<div className="flex items-center">