Skip to content

Commit

Permalink
🐛 (webview/frontend/CaseView.tsx): Fix UI issue by adding a "Set As E…
Browse files Browse the repository at this point in the history
…xpected Output" button and related styles in app.css (#480)

Adds a new button to the CaseView component that allows users to set the output text as the expected output. This button is represented by the "Set" label and is styled with a gray filter, positioning, padding, cursor, and hover effects defined in the app.css file. The purpose of this change is to improve user experience by providing an easy way for users to mark output text as the expected output.
  • Loading branch information
DawnMagnet authored Dec 24, 2024
1 parent cbf9124 commit 2009906
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/webview/frontend/CaseView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,16 @@ export default function CaseView(props: {
>
Copy
</div>
<div
className="expectedoutput"
onClick={() => {
setOutput(trunctateStdout(resultText));
props.notify('Set As Expected Output');
}}
title="Set As Expected Output"
>
Set
</div>
<>
<TextareaAutosize
className="selectable received-textarea"
Expand Down
14 changes: 14 additions & 0 deletions src/webview/frontend/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,20 @@ button:disabled {
opacity: 0.5;
font-size: 80%;
}
.expectedoutput {
filter: grayscale(100%);
position: absolute;
top: 0px;
right: 35px;
padding: 4px;
cursor: pointer;
opacity: 0.5;
font-size: 80%;
}

.expectedoutput:hover {
opacity: 1;
}

.textarea-container {
position: relative;
Expand Down

0 comments on commit 2009906

Please sign in to comment.