Skip to content

Commit

Permalink
label tags update
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpkane committed Oct 22, 2024
1 parent 3c49160 commit 35a2567
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ export default function (
const length = results?.results?.length ?? 0;

const shown =
queryPerformance ||
(!modal && queryPerformance) ||
(resultsLoadable.state !== "loading" && length >= CHECKBOX_LIMIT);

return {
results,
useSearch,

useSearch:
path === "_label_tags" && queryPerformance && !modal
? undefined
: useSearch,
showSearch: Boolean(shown) && !boolean,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const Filter = () => {
</Box>
</Tooltip>
)}
{queryPerformance && <LightningBolt />}
{queryPerformance && <LightningBolt style={{ color: "#f5b700" }} />}
<Tooltip
text="Change field visibility"
placement="bottom-center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import { useRecoilValue } from "recoil";
import styled from "styled-components";
import Arrow from "./Arrow";

const LABEL_TAGS = "_label_tags";

export const LightningBolt = styled(Bolt)`
color: ${({ theme }) => theme.text.secondary};
`;
Expand Down Expand Up @@ -43,10 +41,6 @@ const IconWrapper = ({ modal, path }: { modal: boolean; path: string }) => {
const indexed = useRecoilValue(fos.pathHasIndexes(path));
const queryPerformance = useRecoilValue(fos.queryPerformance);

if (!modal && queryPerformance && path === LABEL_TAGS) {
return null;
}

if (queryPerformance && indexed && !modal) {
return (
<Lightning path={path} frameFilteringDisabled={frameFilteringDisabled} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ const ListValueEntry = ({
<Arrow
key="arrow"
data-cy={`sidebar-field-arrow-enabled-${path}`}
style={{ cursor: "pointer", margin: 0 }}
style={{
color: theme.text.secondary,
cursor: "pointer",
margin: 0,
}}
onClick={(event) => {
event.preventDefault();
event.stopPropagation();
Expand Down

0 comments on commit 35a2567

Please sign in to comment.