Skip to content

Commit

Permalink
feat: explain block adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Rothenberg committed Apr 19, 2022
1 parent b45018a commit 2b971d0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/blocks/file-blocks/explain/explanation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function ExplanationComponent(props: {
)}
{status === "success" && data && (
<div className="pb-2">
<p className="text-xs font-mono">{data}</p>
<p className="text-xs whitespace-pre font-mono">{data}</p>
</div>
)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/blocks/file-blocks/explain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function BlockInner(props: FileBlockProps) {
}, [content, context, start, end]);

return (
<div className="h-full explain-block overflow-auto pl-6 relative">
<div className="h-full explain-block overflow-auto pl-7 relative">
{start && end && (
<div
className="z-20 absolute"
Expand Down Expand Up @@ -144,7 +144,7 @@ function BlockInner(props: FileBlockProps) {
return (
<div
key={line}
className="px-3 overflow-y-auto break-words absolute bg-white w-[260px] -right-6"
className="px-3 overflow-y-auto break-words absolute bg-white w-[260px] -right-7"
style={{
top: (explanation.start - 1) * 18 - 2,
height: (explanation.end - explanation.start + 1) * 18,
Expand Down
1 change: 0 additions & 1 deletion src/blocks/file-blocks/explain/line-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function LineMenu(props: {
<ActionList.Item onSelect={onCopyPermalink}>
Copy Permalink
</ActionList.Item>
<ActionList.Item disabled>View git blame</ActionList.Item>
<ActionList.Divider />
<ActionList.Item onSelect={onExplain}>Explain Code</ActionList.Item>
</ActionList>
Expand Down

0 comments on commit 2b971d0

Please sign in to comment.