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

Feature advanced search #2067

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Feature advanced search #2067

wants to merge 8 commits into from

Conversation

alihamuh
Copy link
Collaborator

@alihamuh alihamuh commented Mar 6, 2023

No description provided.

Comment on lines 220 to 223
back: {
title: `Go back to ${type}`,
title: `Go back to test`,
action: () => window.history.back()
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This button should be removed.

Comment on lines -55 to +58
"eslint-plugin-header": "^3.1.1"
"eslint-plugin-header": "^3.1.1",
"liqe": "^3.6.0",
"react-datepicker": "^4.10.0",
"react-fast-compare": "^3.2.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these libraries doing here? This is the global package.json.

ml={1}
sx={{ textOverflow: "ellipsis" }}
>
{props.item.main2}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's main2?

ml={1}
sx={{ textOverflow: "ellipsis" }}
>
{props.item.main1}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's main1?

setResults(results);
})();
}, [nonce, type, context]);
useEffect(() => {}, []);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this for?


if (!title) return hardNavigate("/");
const type = "notes";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why fix it to notes?


return (
<>
<Text variant="subtitle" mx={2}>
Searching {title}
Searching {type}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just say Searching...

Comment on lines +101 to +122
<Flex mx={2}>
{results.map((result, index) =>
result.length > 0 ? (
<Button
variant="tertiary"
sx={{
borderColor:
index === selectedResult ? "primary" : undefined
}}
mr={1}
onClick={() => {
setSearchItem(result);
setSelectedResult(index);
}}
>
{`${result[0].type}s`}
</Button>
) : (
[]
)
)}
</Flex>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this for?

Comment on lines +123 to 134
{searchItem.length > 0 ? (
<SearchResults
title={capitalizeFirstLetter(`${searchItem[0].type}s`)}
context={context}
type={`${searchItem[0].type}s`}
results={searchItem}
></SearchResults>
) : (
<Text variant="subtitle" mx={2}>
{"No items to show"}
</Text>
)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can already be done via ListContainer. No need to reinvent the wheel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants