This repository has been archived by the owner on Jan 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gui): usage based filters (#538)
* feat(gui): parse filters for usages/usefulness * feat(gui): update filter help text * feat(gui): pass usage data around * feat(gui): implement usage filter * feat(gui): implement usefulness filter * style: apply automatic fixes of linters * fix: build errors * fix: linter errors * style: apply automatic fixes of linters Co-authored-by: lars-reimann <lars-reimann@users.noreply.github.com>
- Loading branch information
1 parent
3dc3ebd
commit 9880366
Showing
26 changed files
with
581 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
import { | ||
Box, | ||
Icon, | ||
IconButton, | ||
ListItem, | ||
Popover, | ||
PopoverArrow, | ||
PopoverBody, | ||
PopoverCloseButton, | ||
PopoverContent, | ||
PopoverHeader, | ||
PopoverTrigger, | ||
Text as ChakraText, | ||
UnorderedList, | ||
} from '@chakra-ui/react'; | ||
import React from 'react'; | ||
|
||
export const FilterHelpButton = function () { | ||
return ( | ||
<Box> | ||
<Popover> | ||
<PopoverTrigger> | ||
<IconButton variant="ghost" icon={<Icon name="help" />} aria-label="help" /> | ||
</PopoverTrigger> | ||
<PopoverContent minWidth={462} fontSize="sm" marginRight={2}> | ||
<PopoverArrow /> | ||
<PopoverCloseButton /> | ||
<PopoverHeader>Filter Options</PopoverHeader> | ||
<PopoverBody> | ||
<UnorderedList spacing={2}> | ||
<ListItem> | ||
<ChakraText> | ||
<strong>is:[type]</strong> | ||
</ChakraText> | ||
<ChakraText> | ||
Displays only elements that are of the given type. Replace [type] with one of{' '} | ||
<em>module, class, function, parameter</em>. | ||
</ChakraText> | ||
</ListItem> | ||
<ListItem> | ||
<ChakraText> | ||
<strong>is:[visibility]</strong> | ||
</ChakraText> | ||
<ChakraText> | ||
Displays only elements that have the given visibility. Replace [visibility] with one | ||
of <em>public, internal</em>. | ||
</ChakraText> | ||
</ListItem> | ||
<ListItem> | ||
<ChakraText> | ||
<strong>name:xy</strong> | ||
</ChakraText> | ||
<ChakraText> | ||
Displays only elements with names that contain the given string xy. | ||
</ChakraText> | ||
</ListItem> | ||
<ListItem> | ||
<ChakraText> | ||
<strong>annotation:any</strong> | ||
</ChakraText> | ||
<ChakraText>Displays only elements that have been annotated.</ChakraText> | ||
</ListItem> | ||
<ListItem> | ||
<ChakraText> | ||
<strong>annotation:[type]</strong> | ||
</ChakraText> | ||
<ChakraText> | ||
Displays only elements that are annotated with the given type xy. Replace [type] | ||
with one of{' '} | ||
<em> | ||
@attribute, @boundary, @calledAfter, @constant, @enum, @group, @move, @optional, | ||
@pure, @remove, @renaming, @required | ||
</em> | ||
. | ||
</ChakraText> | ||
</ListItem> | ||
<ListItem> | ||
<ChakraText> | ||
<strong>usages:[operator][expected]</strong> | ||
</ChakraText> | ||
<ChakraText> | ||
Displays only elements that are used a certain number of times. Replace [operator] | ||
with one of <em><, <=, >=, ></em> or omit it to match by equality. | ||
Replace [expected] with the expected number of usages. | ||
</ChakraText> | ||
</ListItem> | ||
<ListItem> | ||
<ChakraText> | ||
<strong>usefulness:[operator][expected]</strong> | ||
</ChakraText> | ||
<ChakraText> | ||
Displays only elements that have a certain usefulness. Replace [operator] with one | ||
of <em><, <=, >=, ></em> or omit it to match by equality. Replace | ||
[expected] with the expected usefulness. | ||
</ChakraText> | ||
</ListItem> | ||
<ListItem> | ||
<ChakraText> | ||
<strong>!filter</strong> | ||
</ChakraText> | ||
<ChakraText> | ||
Displays only elements that do not match the given filter. Possible filters are any | ||
in this list. | ||
</ChakraText> | ||
</ListItem> | ||
</UnorderedList> | ||
</PopoverBody> | ||
</PopoverContent> | ||
</Popover> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.