menu icon indicating copy to clipboard operation
menu copied to clipboard

fix:submenu overflow popupoffset

Open CooperHash opened this issue 11 months ago • 5 comments

ref: #668

background

When we set the popupOffset, we expect all submenus to have an offset from the menu item. However, when the window width is small, the menu overflows. The overflow, represented by ... as an overflow placeholder, does not have a submenu offset.

It is necessary to fix it

before fix:

https://github.com/react-component/menu/assets/73218815/851a744b-3415-4142-8fc4-777c85efb273

after fix:

https://github.com/react-component/menu/assets/73218815/b33cc2f3-e1cc-4fd0-a570-1046c6769ffd

CooperHash avatar Mar 17 '24 03:03 CooperHash

And, some new test case is needed.

yoyo837 avatar Mar 18 '24 00:03 yoyo837

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.58%. Comparing base (4ae012f) to head (57b5938).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #690   +/-   ##
=======================================
  Coverage   99.58%   99.58%           
=======================================
  Files          27       27           
  Lines         721      722    +1     
  Branches      196      199    +3     
=======================================
+ Hits          718      719    +1     
  Misses          3        3           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 18 '24 02:03 codecov[bot]

And, some new test case is needed.

i have no idea how to mock overflow

CooperHash avatar Mar 18 '24 04:03 CooperHash

@zombieJ @yoyo837 When should this PR be expected in the release?

alekseykurylev avatar Apr 23 '24 08:04 alekseykurylev

@zombieJ @yoyo837 When should this PR be expected in the release?

I haven't written the test yet, so you'll need to wait for me to finish writing it before they can review it.

CooperHash avatar Apr 23 '24 08:04 CooperHash