Skip to content

Commit

Permalink
Merge pull request #407 from itsdheerajdp/Fixes/AI_Assistant_Options_…
Browse files Browse the repository at this point in the history
…Hidden_Issue

Feat : AI Assistant Options Partially Hidden or Not Visible While Scrolling down the page and Selecting Text
  • Loading branch information
weilirs authored Sep 23, 2024
2 parents f9500d3 + 2d6ae94 commit 022a0e5
Show file tree
Hide file tree
Showing 5 changed files with 372 additions and 62 deletions.
221 changes: 221 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"@radix-ui/colors": "^3.0.0",
"@radix-ui/react-hover-card": "^1.1.1",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-slot": "^1.1.0",
"@sentry/electron": "^5.3.0",
"@tailwindcss/typography": "^0.5.10",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Editor/HighlightExtension.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const HighlightExtension = (setHighlightData: (data: HighlightData) => void) =>
const { top, left, right } = editorView.coordsAtPos(to)

// Calculate the button position below the last word
const buttonTop = top >= window.innerHeight ? 20 : top - 35 // Adjust the vertical offset as needed
const buttonTop = top >= window.innerHeight ? 50 : top - 125 // Adjust the vertical offset as needed
const buttonLeft = (left + right) / 2 - 190 // Position the button horizontally centered
setHighlightData({
text: highlightedText,
Expand Down
Loading

0 comments on commit 022a0e5

Please sign in to comment.