adjust styling on small breakpoints
This commit is contained in:
parent
1328f75e6f
commit
067da11573
8 changed files with 36 additions and 27 deletions
4
extensions/vscode/package-lock.json
generated
4
extensions/vscode/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.9.229",
|
||||
"version": "0.9.230",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.9.229",
|
||||
"version": "0.9.230",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import AcceptRejectAllButtons from "./AcceptRejectAllButtons";
|
|||
import FeedbackButtons from "./FeedbackButtons";
|
||||
import UndoAndRedoButtons from "./UndoAndRedoButtons";
|
||||
import { ChatHistoryItem } from "core";
|
||||
import { stripImages } from "core/llm/images";
|
||||
import { CopyIconButton } from "../gui/CopyIconButton";
|
||||
|
||||
export interface MultifileEditActionsProps {
|
||||
index: number;
|
||||
|
|
@ -30,7 +32,6 @@ export default function MultifileEditActions({
|
|||
(state) => state.status === "closed",
|
||||
);
|
||||
|
||||
const isStreaming = applyStates.some((state) => state.status === "streaming");
|
||||
const isCurCheckpoint = Math.floor(index / 2) === curCheckpointIndex;
|
||||
const hasPendingApplies = pendingApplyStates.length > 0;
|
||||
|
||||
|
|
@ -50,6 +51,13 @@ export default function MultifileEditActions({
|
|||
)}
|
||||
|
||||
<div className="flex flex-1 justify-end">
|
||||
<CopyIconButton
|
||||
tabIndex={-1}
|
||||
text={stripImages(item.message.content)}
|
||||
clipboardIconClassName="h-3.5 w-3.5 text-gray-500"
|
||||
checkIconClassName="h-3.5 w-3.5 text-green-400"
|
||||
/>
|
||||
|
||||
<FeedbackButtons item={item} />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -31,15 +31,13 @@ export default function StepContainer(props: StepContainerProps) {
|
|||
const curCheckpointIndex = useSelector(
|
||||
(store: RootState) => store.state.curCheckpointIndex,
|
||||
);
|
||||
const isMultifileEdit = useSelector(
|
||||
(store: RootState) => store.state.isMultifileEdit,
|
||||
);
|
||||
const uiConfig = useUIConfig();
|
||||
const shouldHideActions = active && props.isLast;
|
||||
const isStepAheadOfCurCheckpoint =
|
||||
Math.floor(props.index / 2) > curCheckpointIndex;
|
||||
console.log({
|
||||
index: props.index,
|
||||
curCheckpointIndex,
|
||||
isStepAheadOfCurCheckpoint,
|
||||
});
|
||||
isMultifileEdit && Math.floor(props.index / 2) > curCheckpointIndex;
|
||||
|
||||
useEffect(() => {
|
||||
if (!active) {
|
||||
|
|
@ -78,7 +76,7 @@ export default function StepContainer(props: StepContainerProps) {
|
|||
|
||||
return (
|
||||
<div
|
||||
className={isStepAheadOfCurCheckpoint ? "opacity-30" : "relative"}
|
||||
className={isStepAheadOfCurCheckpoint ? "opacity-25" : "relative"}
|
||||
style={{
|
||||
minHeight: props.isLast ? "50vh" : 0,
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -33,9 +33,10 @@ export default function ApplyActions(props: ApplyActionsProps) {
|
|||
);
|
||||
case "done":
|
||||
return (
|
||||
<div className="flex items-center rounded bg-zinc-700 pl-2 pr-1">
|
||||
<span className="mr-2 text-xs text-gray-400">
|
||||
{`${props.applyState.numDiffs === 1 ? "1 diff" : `${props.applyState.numDiffs} diffs`} remaining`}
|
||||
<div className="xs:pl-2 xs:pr-1 flex items-center rounded bg-zinc-700">
|
||||
<span className="max-xs:hidden xs:mr-1 text-xs text-gray-400">
|
||||
{`${props.applyState.numDiffs === 1 ? "1 diff" : `${props.applyState.numDiffs} diffs`}`}
|
||||
<span className="max-md:hidden">{` remaining`}</span>
|
||||
</span>
|
||||
|
||||
<ToolbarButtonWithTooltip
|
||||
|
|
@ -56,9 +57,9 @@ export default function ApplyActions(props: ApplyActionsProps) {
|
|||
case "closed":
|
||||
if (!hasRejected && props.applyState.numDiffs === 0) {
|
||||
return (
|
||||
<span className="flex items-center rounded bg-zinc-700 pl-2 pr-1 text-slate-400">
|
||||
Applied
|
||||
<CheckIcon className="h-4 w-4 pl-1 hover:brightness-125" />
|
||||
<span className="flex items-center rounded bg-zinc-700 text-slate-400 max-sm:px-0.5 sm:pl-2">
|
||||
<span className="max-sm:hidden">Applied</span>
|
||||
<CheckIcon className="h-4 w-4 hover:brightness-125 sm:pl-1" />
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,18 +15,18 @@ export default function CopyButton({ text }: CopyButtonProps) {
|
|||
onClick={copyText}
|
||||
>
|
||||
<div
|
||||
className="flex items-center gap-1 transition-colors duration-200 hover:brightness-125"
|
||||
className="max-2xs:hidden flex items-center gap-1 transition-colors duration-200 hover:brightness-125"
|
||||
style={{ color: lightGray }}
|
||||
>
|
||||
{copied ? (
|
||||
<>
|
||||
<CheckIcon className="h-3 w-3 text-green-500 hover:brightness-125" />
|
||||
<span className="hidden sm:inline">Copied</span>
|
||||
<span className="max-sm:hidden">Copied</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<ClipboardIcon className="h-3 w-3 hover:brightness-125" />
|
||||
<span className="xs:inline hidden text-gray-400">Copy</span>
|
||||
<span className="text-gray-400 max-sm:hidden">Copy</span>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ export interface FileInfoProps {
|
|||
const FileInfo = ({ filepath, range }: FileInfoProps) => {
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
|
||||
// TODO: Need to turn into relative or fq path
|
||||
function onClickFileName() {
|
||||
ideMessenger.post("showFile", {
|
||||
filepath,
|
||||
|
|
@ -20,13 +19,13 @@ const FileInfo = ({ filepath, range }: FileInfoProps) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="flex max-w-[20%] items-center">
|
||||
<div className="flex w-full min-w-0 items-center">
|
||||
<div
|
||||
className="flex cursor-pointer items-center gap-1"
|
||||
className="mr-0.5 flex w-full min-w-0 cursor-pointer items-center gap-0.5"
|
||||
onClick={onClickFileName}
|
||||
>
|
||||
<FileIcon height="20px" width="20px" filename={filepath} />
|
||||
<span className="truncate hover:underline">
|
||||
<span className="w-full truncate hover:underline">
|
||||
{getBasename(filepath)}
|
||||
{range && ` ${range}`}
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ const TopDiv = styled.div`
|
|||
border-radius: ${defaultBorderRadius};
|
||||
margin-bottom: 8px !important;
|
||||
background-color: ${vscEditorBackground};
|
||||
min-width: 0;
|
||||
animation: ${fadeInAnimation} 300ms ease-out forwards;
|
||||
`;
|
||||
|
||||
|
|
@ -163,17 +164,19 @@ export default function StepContainerPreToolbar(
|
|||
return (
|
||||
<TopDiv>
|
||||
<ToolbarDiv isExpanded={isExpanded} className="find-widget-skip">
|
||||
<div className="flex items-center">
|
||||
<div className="flex min-w-0 max-w-[45%] items-center">
|
||||
<ChevronDownIcon
|
||||
onClick={onClickExpand}
|
||||
className={`h-4 w-4 cursor-pointer text-gray-400 hover:bg-gray-800 hover:brightness-125 ${
|
||||
className={`h-3.5 w-3.5 shrink-0 cursor-pointer text-gray-400 hover:bg-gray-800 hover:brightness-125 ${
|
||||
isExpanded ? "rotate-0" : "-rotate-90"
|
||||
}`}
|
||||
/>
|
||||
<FileInfo filepath={props.filepath} range={props.range} />
|
||||
<div className="w-full min-w-0">
|
||||
<FileInfo filepath={props.filepath} range={props.range} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="flex items-center gap-3 max-sm:gap-1.5">
|
||||
{isGeneratingCodeBlock && (
|
||||
<GeneratingCodeLoader
|
||||
showLineCount={!isExpanded}
|
||||
|
|
|
|||
0
manual-testing-sandbox/helloNested.py
Normal file
0
manual-testing-sandbox/helloNested.py
Normal file
Loading…
Add table
Reference in a new issue