Commit Graph

9 Commits

Author SHA1 Message Date
CatsJuice 4cbf4b74d6 feat(mobile): explorer create/rename operation (#8628)
close AF-1560
2024-11-04 05:28:05 +00:00
Peng Xiao c26120ae36 fix(core): bring back menu offset (#8327) 2024-09-20 15:36:43 +08:00
EYHN f009371e06 fix(core): fix menu shaking (#8187) 2024-09-11 03:42:13 +00:00
pengx17 fb76fdfca3 fix(core): menu not scrollable when opening in modal (#8179)
fix AF-1360

When menu (with modal = false) is rendered in Modal, the [RemoveScroll utility wrapped by Modal](https://github.com/radix-ui/primitives/blob/660060a765634e9cc7bf4513f41e8dabc9824d74/packages/react/dialog/src/Dialog.tsx#L203) will prevent menu from scrolling.

The reason why menu is scrollable within a dialog is because it is also wrapped a RemoveScroll [when modal is on. ](https://github.com/radix-ui/primitives/blob/660060a765634e9cc7bf4513f41e8dabc9824d74/packages/react/menu/src/Menu.tsx#L305)

In this fix, added a `useWithinModal` utility hook so that menu will automatically assign noportal mode for menu when it is rendered inside of a modal.
2024-09-10 06:09:00 +00:00
EYHN 51f3566bec fix(core): fix menu bugs (#8074) 2024-09-04 07:19:09 +00:00
pengx17 d00f86c3ce fix(core): handle modal overlay click event correctly (#8063)
1. overlay click + hide is brought back. this is because modal (ormobile menu)'s `onPointerDownOutside` is bound to document.body. Code in https://github.com/toeverything/AFFiNE/blob/e58af08f6325c7c2c6cbd3325e954fd7d2ab6859/packages/frontend/core/src/modules/explorer/views/tree/node.tsx#L353-L356 will stop the event from bubbling to the document element.
2. when Menu's set to modal=true, the parent is set to pointer-events: none as well. changed menu to modal false instead.

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/T2klNLEk0wxLh4NRDzhk/3e50281f-839d-4463-af00-dff2fce8202b.png)
2024-09-03 12:00:00 +00:00
EYHN 02f0d7aa08 feat(component): dropdown menu auto avoid collisions (#8013)
<div class='graphite__hidden'>
          <div>🎥 Video uploaded on Graphite:</div>
            <a href="https://app.graphite.dev/media/video/g3jz87HxbjOJpXV3FPT7/7f9d21cc-7b2f-4dc1-801c-e69d5e6d0750.mp4">
              <img src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/g3jz87HxbjOJpXV3FPT7/7f9d21cc-7b2f-4dc1-801c-e69d5e6d0750.mp4">
            </a>
          </div>
<video src="https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/g3jz87HxbjOJpXV3FPT7/7f9d21cc-7b2f-4dc1-801c-e69d5e6d0750.mp4">CleanShot 2024-08-29 at 14.49.58.mp4</video>
2024-09-03 02:12:16 +00:00
EYHN b96ad57568 feat(core): import template (#8000) 2024-08-29 04:01:35 +00:00
Cats Juice 23b0db36b9 feat(component): mobile menu support (#7892) 2024-08-21 09:05:05 +00:00