This repository was archived by the owner on Jan 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
New search bar #346
Merged
Merged
New search bar #346
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
859e1f1
WIP search bar changes
9b94d6c
add search bar component, reorganize a bit
michsa e74e423
TagQueryPopover: move HOCs to export
michsa cf2d79b
rename criteriaPath to path (for contexturify)
michsa 4591489
fix getTag
michsa ee21663
try out wrapTag for tag popovers
michsa 447e59d
wrap tag from theme instead
michsa 7bf187a
move TagsQuery stuff into its own folder
michsa e23b919
add the main popover menu & rename to ActionsMenu
michsa 76dfe8e
TagsInputSearchBar wip
michsa 7931360
add inline-block styling to tags and Expand icon
michsa 50e446a
add isOneLine, clean up TagsInputSearchBar
michsa caea5d7
remove scrollbar styles on collapsed TagsInput
michsa 1ff9eb9
add expansion stuff to TagsQuery
michsa a4ecc73
GreyVest theme: add border to TagsQuery instead of TagsInput
michsa 780e75a
move ExpandArrow to its own file, add icon
michsa a3ea4d8
super clean ExpandableTagsQuery :)
michsa f2cdbf6
move ExpandableTagsQuery out of TagsQuery directory
michsa bbd24d0
reverse ExpandableTagsInput tags
michsa f287248
TagsQuery popover stuff
michsa a5f49b2
fix tag popovers derendering on change
michsa fa66cfb
make tag popovers better
michsa 5487eba
remove searchBarLayout story
michsa e60f07c
fix react key console errors from ErrorList
michsa 7a04bdd
fix TagsQuery overflow icon with minmax grid thing
michsa bd1e6eb
install react-measure
michsa 754c506
fix search bar click-through handling
michsa 67ef83e
feedback
michsa d2de5e0
do the measure thing
michsa 192ade3
add Tag to GreyVest theme
michsa 10dc4d3
update changelog
michsa 0be344c
Merge branch 'master' into feature/345_SearchBarStyling
michsa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,42 @@ | ||
| import React from 'react' | ||
| import F from 'futil-js' | ||
| import _ from 'lodash/fp' | ||
| import { observer } from 'mobx-react' | ||
| import { Flex } from '../../greyVest' | ||
| import { withTheme } from '../../utils/theme' | ||
|
|
||
| let ExpandArrow = ({ collapse, tagsLength, style, theme: { Icon } }) => | ||
| !!(F.view(collapse) && tagsLength) && ( | ||
| <div className="expand-arrow" onClick={F.off(collapse)} style={style}> | ||
| <div | ||
| style={{ | ||
| height: 0, | ||
| cursor: 'pointer', | ||
| textAlign: 'center', | ||
| }} | ||
| title="Expand to see all tags" | ||
| > | ||
| <Flex | ||
| style={{ | ||
| display: 'inline-flex', | ||
| backgroundColor: 'white', | ||
| borderRadius: 4, | ||
| padding: '5px 12px', | ||
| boxShadow: '0 1px 4px 0 rgba(39, 44, 65, 0.1)', | ||
| color: '#9b9b9b', | ||
| fontWeight: 400, | ||
| }} | ||
| alignItems="center" | ||
| justifyContent="center" | ||
| > | ||
| View all {tagsLength} tags | ||
| <Icon icon="Expand" style={{ fontSize: 16, marginLeft: 6 }} /> | ||
| </Flex> | ||
| </div> | ||
| </div> | ||
| ) | ||
|
|
||
| export default _.flow( | ||
| observer, | ||
| withTheme | ||
| )(ExpandArrow) |
This file contains hidden or 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,30 @@ | ||
| import React from 'react' | ||
| import _ from 'lodash/fp' | ||
| import F from 'futil-js' | ||
| import { withContentRect } from 'react-measure' | ||
| import { contexturify } from '../../utils/hoc' | ||
| import TagsQuery from '../TagsQuery' | ||
| import ExpandArrow from './ExpandArrow' | ||
|
|
||
| let collapsedStyle = { | ||
| maxHeight: 40, | ||
| overflowY: 'auto', | ||
| } | ||
|
|
||
| let ExpandableTagsQuery = ({ measureRef, contentRect, collapse, ...props }) => ( | ||
| <> | ||
| <div style={F.view(collapse) ? collapsedStyle : {}}> | ||
| <div ref={measureRef}> | ||
| <TagsQuery {...props} /> | ||
| </div> | ||
| </div> | ||
| {F.view(collapse) && contentRect.entry.height > 70 && ( | ||
| <ExpandArrow collapse={collapse} tagsLength={props.node.tags.length} /> | ||
| )} | ||
| </> | ||
| ) | ||
|
|
||
| export default _.flow( | ||
| contexturify, | ||
| withContentRect() | ||
| )(ExpandableTagsQuery) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,59 @@ | ||
| import React from 'react' | ||
| import _ from 'lodash/fp' | ||
| import F from 'futil-js' | ||
| import { observer } from 'mobx-react' | ||
| import TagsJoinPicker from '../TagsJoinPicker' | ||
| import { withTheme } from '../../utils/theme' | ||
| import { Flex } from '../../greyVest' | ||
| import { copyTags } from './utils' | ||
|
|
||
| let ActionsMenu = ({ node, tree, open, theme: { Button, Checkbox } }) => ( | ||
| <Flex | ||
| style={{ minWidth: 240, padding: 10 }} | ||
| className="tags-query-actions-menu" | ||
| column | ||
| justifyContent="stretch" | ||
| alignItems="stretch" | ||
| > | ||
| {!!_.get('tags.length', node) && ( | ||
| <> | ||
| <Button | ||
| onClick={() => { | ||
| copyTags(node) | ||
| F.off(open)() | ||
| }} | ||
| > | ||
| Copy Keywords | ||
| </Button> | ||
| <Button | ||
| style={{ margin: '10px 0' }} | ||
| onClick={() => { | ||
| tree.mutate(node.path, { | ||
| tags: [], | ||
| }) | ||
| F.off(open)() | ||
| }} | ||
| > | ||
| Clear Keywords | ||
|
daedalus28 marked this conversation as resolved.
|
||
| </Button> | ||
| <div className="line-separator" /> | ||
| </> | ||
| )} | ||
| <label className="labeled-checkbox" style={{ margin: '10px 0' }}> | ||
| <Checkbox | ||
| htmlId="stemming" | ||
| checked={!node.exact} | ||
| onChange={e => tree.mutate(node.path, { exact: !e.target.checked })} | ||
| /> | ||
| <span>Include word variations</span> | ||
| </label> | ||
| <div> | ||
| <TagsJoinPicker node={node} tree={tree} /> | ||
| </div> | ||
| </Flex> | ||
| ) | ||
|
|
||
| export default _.flow( | ||
| observer, | ||
| withTheme | ||
| )(ActionsMenu) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.