Merge pull request #4026 from continuedev/dallin/jetrains-ui-tweaks
Tutorial Card and UI Tweaks
This commit is contained in:
commit
21cfde2aa6
2 changed files with 37 additions and 43 deletions
|
|
@ -451,8 +451,8 @@ class CustomPanel(
|
|||
val rightButton =
|
||||
CustomButton("⏎ Enter") { onEnter() }
|
||||
.apply {
|
||||
background = JBColor(0x999998.toInt(), 0x999998.toInt())
|
||||
foreground = JBColor(0xF5F5F5.toInt(), 0xF5F5F5.toInt())
|
||||
background = globalScheme.defaultForeground
|
||||
foreground = globalScheme.defaultBackground
|
||||
border = EmptyBorder(2, 6, 2, 6)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ import {
|
|||
PencilSquareIcon,
|
||||
XMarkIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import styled from "styled-components";
|
||||
import { defaultBorderRadius, lightGray, vscBackground } from "..";
|
||||
import { lightGray } from "..";
|
||||
import { getMetaKeyLabel, isJetBrains } from "../../util";
|
||||
import { useContext } from "react";
|
||||
import { IdeMessengerContext } from "../../context/IdeMessenger";
|
||||
|
|
@ -16,41 +15,27 @@ interface TutorialCardProps {
|
|||
onClose: () => void;
|
||||
}
|
||||
|
||||
const TutorialCardDiv = styled.div`
|
||||
border: 1px solid ${lightGray};
|
||||
border-radius: ${defaultBorderRadius};
|
||||
background-color: ${vscBackground};
|
||||
padding: 1rem 2.5rem 1rem 2rem;
|
||||
margin: 1rem;
|
||||
max-width: 28rem;
|
||||
position: relative;
|
||||
`;
|
||||
|
||||
const CloseButton = styled.button`
|
||||
border: none;
|
||||
background-color: ${vscBackground};
|
||||
color: ${lightGray};
|
||||
position: absolute;
|
||||
top: 0.4rem;
|
||||
right: 0.5rem;
|
||||
padding: 0.25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
`;
|
||||
|
||||
export function TutorialCard({ onClose }: TutorialCardProps) {
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
const jetbrains = isJetBrains();
|
||||
|
||||
return (
|
||||
<TutorialCardDiv data-testid={`tutorial-card`}>
|
||||
<CloseButton onClick={onClose}>
|
||||
<XMarkIcon className="h-5 w-5" />
|
||||
</CloseButton>
|
||||
<div
|
||||
className="border-0.5 border-lightGray bg-vsc-background m-1 max-w-96 rounded-md border-solid px-3 py-3 sm:px-5"
|
||||
data-testid={`tutorial-card`}
|
||||
>
|
||||
<div className="flex items-center justify-between">
|
||||
<h3 className="m-0 p-0"></h3>
|
||||
<div
|
||||
onClick={onClose}
|
||||
className="cursor-pointer items-center justify-center"
|
||||
>
|
||||
<XMarkIcon className="h-5 w-5" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul className="space-y-4 pl-0" style={{ color: lightGray }}>
|
||||
{!isJetBrains() && (
|
||||
{!jetbrains && (
|
||||
<li className="flex items-start">
|
||||
<ArrowRightStartOnRectangleIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<span>
|
||||
|
|
@ -67,27 +52,36 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
|
|||
</li>
|
||||
)}
|
||||
<li className="flex items-start">
|
||||
<PencilSquareIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<div>
|
||||
<PencilSquareIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
</div>
|
||||
<span>
|
||||
Highlight code and press <kbd>{getMetaKeyLabel()}</kbd> + <kbd>I</kbd> to
|
||||
quickly make natural language edits
|
||||
Highlight code and press <kbd>{getMetaKeyLabel()}</kbd> +{" "}
|
||||
<kbd>I</kbd> to quickly make natural language edits
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-start">
|
||||
<ClipboardDocumentIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<div>
|
||||
<ClipboardDocumentIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
</div>
|
||||
<span>
|
||||
Highlight code and press <kbd>{getMetaKeyLabel()}</kbd> + <kbd>L</kbd> to
|
||||
add it to the chat window
|
||||
Highlight code and press <kbd>{getMetaKeyLabel()}</kbd> +{" "}
|
||||
<kbd>{jetbrains ? "J" : "L"}</kbd> to add it to the chat window
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-start">
|
||||
<Cog6ToothIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<div>
|
||||
<Cog6ToothIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
</div>
|
||||
<span>
|
||||
Click the gear icon in the bottom right to configure Continue
|
||||
Click the gear icon at the top of the chat window to configure
|
||||
Continue
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-start">
|
||||
<BookOpenIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<div>
|
||||
<BookOpenIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
</div>
|
||||
<span>
|
||||
<a
|
||||
className="cursor-pointer text-inherit underline hover:text-inherit"
|
||||
|
|
@ -101,6 +95,6 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
|
|||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</TutorialCardDiv>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue