-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix: Keyboard accessible context menus #1768
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
708c563
Proof of concept, account menu
tommoor b338ef0
Merge branch 'develop' of github.com:outline/outline into fix/issue-1766
tommoor 9bbad81
wip
tommoor e57d996
custom
tommoor cca8f1b
CollectionSortMenu
tommoor 3c69be9
CollectionMenu
tommoor 4d5839f
modal
tommoor fcc2414
feat: TemplateMenu
tommoor 315850a
feat: ShareMenu
tommoor 05f7421
feat: RevisionMenu
tommoor 97620b5
lint
tommoor bc67aff
feat: DocumentMenu
tommoor eb684b3
feat: GroupMenu
tommoor 20d3d57
feat: BreadcrumbMenu
tommoor 5a681ca
fix: Restore onOpen,onClose callbacks
tommoor cda4dfa
feat: NewTemplateMenu
tommoor 121fd8c
Remaining menus
tommoor ab72d3c
lint
tommoor 53a227e
lint
tommoor 7ffd193
fix: File upload should not be tabbable separate to menu
tommoor a6530fd
More fixes
tommoor 76e6585
fix: Submenu rendering from template
tommoor 33c1631
perf, header menu fixes
tommoor e892bb4
Merge develop
tommoor edba1da
lint
tommoor b50257e
Merge branch 'develop' of github.com:outline/outline into fix/issue-1766
tommoor 3679a64
Perf: Delayed menu contents mount
tommoor f179b37
fix: Improve menu positioning on DocumentListItem
tommoor 67f0754
fix: Cannot select search filter menu items with keyboard
tommoor 2bf1b49
fix: Translation consistency, more minor layout issues
tommoor 4cb81c3
flow
tommoor d7f86a0
fixes
tommoor 851ee27
fix: Show 'Template' badge on search results
tommoor 5580075
fix: ContextMenu onOpen/onClose callbacks called multiple times
tommoor File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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 was deleted.
Oops, something went wrong.
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,13 @@ | ||
// @flow | ||
import styled from "styled-components"; | ||
|
||
const Header = styled.h3` | ||
font-size: 11px; | ||
font-weight: 600; | ||
text-transform: uppercase; | ||
color: ${(props) => props.theme.sidebarText}; | ||
letter-spacing: 0.04em; | ||
margin: 1em 12px 0.5em; | ||
`; | ||
|
||
export default Header; |
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,21 @@ | ||
// @flow | ||
import { MoreIcon } from "outline-icons"; | ||
import * as React from "react"; | ||
import { MenuButton } from "reakit/Menu"; | ||
import NudeButton from "components/NudeButton"; | ||
|
||
export default function OverflowMenuButton({ | ||
iconColor, | ||
className, | ||
...rest | ||
}: any) { | ||
return ( | ||
<MenuButton {...rest}> | ||
{(props) => ( | ||
<NudeButton className={className} {...props}> | ||
<MoreIcon color={iconColor} /> | ||
</NudeButton> | ||
)} | ||
</MenuButton> | ||
); | ||
} |
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,16 @@ | ||
// @flow | ||
import * as React from "react"; | ||
import { MenuSeparator } from "reakit/Menu"; | ||
import styled from "styled-components"; | ||
|
||
export default function Separator(rest: {}) { | ||
return ( | ||
<MenuSeparator {...rest}> | ||
{(props) => <HorizontalRule {...props} />} | ||
</MenuSeparator> | ||
); | ||
} | ||
|
||
const HorizontalRule = styled.hr` | ||
margin: 0.5em 12px; | ||
`; |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does the leading
$
mean generally?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stops it being added to the dom by styled-components: https://styled-components.com/docs/api#transient-props