LinusU / LinusU/node-appdmg

Position of application icon is changing based on position of hidden files

Open
#225 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
158
PR merge metrics
No merged PRs in 30d

Description

Our team is experiencing weird behaviour with only application icon shown in visible area. When the hidden icons are moved to the right out of the visible area following happens:

  1. If the icons are hidden, the icon position is as defined in appdmg.json
  2. If user has com.apple.finder "AppleShowAllFiles" set to true or simply hit the CMD+Shift+. then the position of icon is shifted.

We thought that this is issue with the appearing scrollbar, but the shift is too big, scrollbar is only few dozens pixels wide and shift is hundred or even more(did not measure exactly). We also tried to move icons down under the visible area. The icon moves counterintuitively to the right closer to the scrollbar. Is there something we are doing wrong in appdmg.json file?

DMG when com.apple.finder "AppleShowAllFiles" is true and and hidden icons are under the visible area
HiddenDown

Here is the content of the appdmg.json file

{
  "title": "App",
  "icon": "icon.icns",
  "background": "background.png",
  "background-color": "mintcream",
  "icon-size": 96,
  "window": {
    "position": { "x": 200, "y": 200 },
    "size": { "width": 400, "height": 400 }
  },
  "contents": [
    { "x": 200, "y": 200, "type": "file", "path": "App.app" },
    { "x": 0, "y": 600, "type": "position", "path": ".background" },
    { "x": 0, "y": 600, "type": "position", "path": ".DS_Store" },
    { "x": 0, "y": 600, "type": "position", "path": ".Trashes" },
    { "x": 0, "y": 600, "type": "position", "path": ".VolumeIcon.icns" }
  ]
}

DMG when com.apple.finder "AppleShowAllFiles" is true and hidden icons are right to visible area
HiddenRight

Here is the content of the appdmg.json file

{
  "title": "App",
  "icon": "icon.icns",
  "background": "background.png",
  "background-color": "mintcream",
  "icon-size": 96,
  "window": {
    "position": { "x": 200, "y": 200 },
    "size": { "width": 400, "height": 400 }
  },
  "contents": [
    { "x": 200, "y": 200, "type": "file", "path": "App.app" },
    { "x": 600, "y": 0, "type": "position", "path": ".background" },
    { "x": 600, "y": 0, "type": "position", "path": ".DS_Store" },
    { "x": 600, "y": 0, "type": "position", "path": ".Trashes" },
    { "x": 600, "y": 0, "type": "position", "path": ".VolumeIcon.icns" }
  ]
}
DMG when com.apple.finder "AppleShowAllFiles" is false
OK

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 by reproducing the three configurations in the issue using the provided appdmg.json contents and compare the application icon position with AppleShowAllFiles enabled and disabled. Read the contents positioning and window size settings first; done means determining why the configured position changes and preserving that position when hidden entries are moved outside the visible area.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, macos
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.