[PR #214] [MERGED] fix: dropdown and popover positioning #223

Closed
opened 2026-03-01 14:40:36 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/arikchakma/maily.to/pull/214
Author: @arikchakma
Created: 8/3/2025
Status: Merged
Merged: 8/3/2025
Merged by: @arikchakma

Base: mainHead: fix/safari-dropdown


📝 Commits (2)

  • 9c73f32 fix: component without portal
  • 1d09271 chore: scroll threshold

📊 Changes

3 files changed (+48 additions, -24 deletions)

View changed files

📝 packages/core/src/editor/components/popover.tsx (+29 -19)
📝 packages/core/src/editor/components/ui/dropdown-menu.tsx (+13 -5)
📝 packages/core/src/editor/index.tsx (+6 -0)

📄 Description

This pull request introduces enhancements to the Popover and DropdownMenu components by adding a portal prop for more flexible rendering, and updates the Editor component to support scroll-related customization. These changes improve the flexibility and configurability of the components.

Enhancements to Popover and DropdownMenu Components:

  • PopoverContent Component: Added a portal prop to conditionally wrap the content in a PopoverPrimitive.Portal. This allows developers to control whether the content is rendered inside a portal. [1] [2]
  • DropdownMenuContent Component: Similarly, introduced a portal prop to conditionally wrap the content in a DropdownMenuPrimitive.Portal, providing the same flexibility as the PopoverContent component. [1] [2]

Updates to the Editor Component:

  • New Props for Scroll Customization: Added scrollThreshold and scrollMargin props to the EditorProps type, allowing developers to customize the scroll behavior of the editor.
  • Default Values for New Props: Set default values for scrollThreshold and scrollMargin to 40 in the Editor component's props destructuring.
  • Integration with useEditor: Passed the new scrollThreshold and scrollMargin props to the editorProps configuration in the useEditor hook.

Resolves #207


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/arikchakma/maily.to/pull/214 **Author:** [@arikchakma](https://github.com/arikchakma) **Created:** 8/3/2025 **Status:** ✅ Merged **Merged:** 8/3/2025 **Merged by:** [@arikchakma](https://github.com/arikchakma) **Base:** `main` ← **Head:** `fix/safari-dropdown` --- ### 📝 Commits (2) - [`9c73f32`](https://github.com/arikchakma/maily.to/commit/9c73f3264cbd36bbea6b5b2c2194c349d046d8ff) fix: component without portal - [`1d09271`](https://github.com/arikchakma/maily.to/commit/1d09271a966fc143fcfb7964a7164199319aa9e4) chore: scroll threshold ### 📊 Changes **3 files changed** (+48 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/editor/components/popover.tsx` (+29 -19) 📝 `packages/core/src/editor/components/ui/dropdown-menu.tsx` (+13 -5) 📝 `packages/core/src/editor/index.tsx` (+6 -0) </details> ### 📄 Description This pull request introduces enhancements to the `Popover` and `DropdownMenu` components by adding a `portal` prop for more flexible rendering, and updates the `Editor` component to support scroll-related customization. These changes improve the flexibility and configurability of the components. ### Enhancements to `Popover` and `DropdownMenu` Components: * **`PopoverContent` Component**: Added a `portal` prop to conditionally wrap the content in a `PopoverPrimitive.Portal`. This allows developers to control whether the content is rendered inside a portal. [[1]](diffhunk://#diff-e9c74f5d43ba40806c0f3a31e6354256d393ac8232e2be2df12348297729c93cL18-R26) [[2]](diffhunk://#diff-e9c74f5d43ba40806c0f3a31e6354256d393ac8232e2be2df12348297729c93cL32-R46) * **`DropdownMenuContent` Component**: Similarly, introduced a `portal` prop to conditionally wrap the content in a `DropdownMenuPrimitive.Portal`, providing the same flexibility as the `PopoverContent` component. [[1]](diffhunk://#diff-6e8f2f9fe10add4e097626a3a275d9d5476edf6b4fe9f6323966d7d866e043f7L60-R64) [[2]](diffhunk://#diff-6e8f2f9fe10add4e097626a3a275d9d5476edf6b4fe9f6323966d7d866e043f7L72-R81) ### Updates to the `Editor` Component: * **New Props for Scroll Customization**: Added `scrollThreshold` and `scrollMargin` props to the `EditorProps` type, allowing developers to customize the scroll behavior of the editor. * **Default Values for New Props**: Set default values for `scrollThreshold` and `scrollMargin` to `40` in the `Editor` component's props destructuring. * **Integration with `useEditor`**: Passed the new `scrollThreshold` and `scrollMargin` props to the `editorProps` configuration in the `useEditor` hook. Resolves #207 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 14:40:36 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/maily.to#223
No description provided.