-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e tests, zero-state for a few views and a few bug fixes
e2e tests are for example-app, but kept in the same cypress setup for simpler reuse of shared cypress configuration needed for both cases.
- Loading branch information
1 parent
f7772ed
commit 086216c
Showing
93 changed files
with
1,932 additions
and
288 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from "react"; | ||
import { | ||
CommonActionId, | ||
styled, | ||
useAction, | ||
useGetActionShortcut, | ||
} from "@intellij-platform/core"; | ||
|
||
const StyledContainer = styled.div.attrs({ tabIndex: -1 })` | ||
display: flex; | ||
flex-direction: column; | ||
height: inherit; | ||
justify-content: center; | ||
padding: 0 25%; | ||
font-size: 1rem; | ||
outline: none; | ||
`; | ||
|
||
const StyledLine = styled.div` | ||
display: flex; | ||
gap: 0.5rem; | ||
margin-bottom: 0.5rem; | ||
`; | ||
|
||
const StyledShortcut = styled.div` | ||
color: ${({ theme }) => theme.commonColors.linkForegroundEnabled}; | ||
`; | ||
|
||
export function EditorZeroState() { | ||
return ( | ||
<StyledContainer> | ||
<ActionTip actionId={CommonActionId.GO_TO_FILE} /> | ||
<ActionTip actionId={CommonActionId.GO_TO_ACTION} /> | ||
</StyledContainer> | ||
); | ||
} | ||
|
||
function ActionTip({ actionId }: { actionId: string }) { | ||
const getShortcut = useGetActionShortcut(); | ||
const action = useAction(actionId); | ||
return ( | ||
<StyledLine> | ||
{action?.title} | ||
<StyledShortcut>{getShortcut(actionId)}</StyledShortcut> | ||
</StyledLine> | ||
); | ||
} |
Oops, something went wrong.