linuxmint / linuxmint/cinnamon

Automatic height limit for popup menu doesn't work

Open
#13,908 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

BUG
Dominant language
JavaScript
Stars
5.6k
Forks
915
Avg merge
5d 22h
Merged PRs (30d)
3

Description

Distribution

Mint 22.3

Package version

6.6.9

Graphics hardware in use

No response

Frequency

Always

Bug description

I'm currently revamping the applet Drawer and have stumbled across the case where the popup menu gets very tall but instead of had been limited and a scrollbar being shown (as documented here), it just renders off screen (there are two more menu items that can't be seen in the screenshot):

Image
Steps to reproduce
  1. Clone my repo: https://github.com/s-h-a-d-o-w/show-hide-applets_mohammad-sn
  2. git checkout repeat-popup-menu-items (On this branch, icons are intentionally added multiple times, to ensure that anybody trying this hopefully gets above the maximum height.)
  3. ./test-spice show-hide-applets@mohammad-sn
  4. Move the applet to the right side of your panel, then right click on it for the menu.
Expected behavior

Height of the menu should be limited, a scrollbar should be shown.

Additional information

UPDATE:
I just noticed that you don't seem to run this._applet_context_menu.setMaxHeight(); internally, as the comment that I linked to says. If I call it in my code, I can see that style is actually set to max-height: 1040px; max-width: 1920px;. But it still doesn't result in a scrollbar getting rendered when that is exceeded.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in js/ui/popupMenu.js around the documented setMaxHeight() logic, then reproduce the issue with the show-hide-applets repository using the repeat-popup-menu-items branch and ./test-spice. Trace the applet context menu's height and scrollbar behavior; done means an oversized popup is constrained and displays a usable scrollbar without requiring the applet to call setMaxHeight() itself.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.