Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows JumpList empty when a single entry has a long description #26862

Open
bpasero opened this issue Dec 7, 2020 · 6 comments
Open

Windows JumpList empty when a single entry has a long description #26862

bpasero opened this issue Dec 7, 2020 · 6 comments

Comments

@bpasero
Copy link
Contributor

@bpasero bpasero commented Dec 7, 2020

Issue Details

  • Electron Version:
    • 11.0.3
  • Operating System:
    • Windows 10
  • Last Known Working Electron version:

Expected Behavior

An invalid entry to the JumpList does not cause other entries to disappear.

Actual Behavior

A single invalid JumpList entry makes all other entries disappear.

To Reproduce

// Modules to control application life and create native browser window
const { app, BrowserWindow } = require('electron')

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow

function createWindow() {
  // Create the browser window.
  mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      nodeIntegration: true
    }
  })

  // and load the index.html of the app.
  mainWindow.loadFile('index.html')

  // Open the DevTools.
  // mainWindow.webContents.openDevTools()

  // Emitted when the window is closed.
  mainWindow.on('closed', function () {
    // Dereference the window object, usually you would store windows
    // in an array if your app supports multi windows, this is the time
    // when you should delete the corresponding element.
    mainWindow = null
  })
}

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)

app.setJumpList([
  {
    type: "custom",
    name: "Recent Workspaces",
    items: [
      {
        type: "task",
        title: "Title",
        description: "Description",
        program: process.execPath
      },
      {
        type: "task",
        title: "Long Title",
        description: "DescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescriptionDescription",
        program: process.execPath
      }
    ]
  }
])

// Quit when all windows are closed.
app.on('window-all-closed', function () {
  // On OS X it is common for applications and their menu bar
  // to stay active until the user quits explicitly with Cmd + Q
  if (process.platform !== 'darwin') {
    app.quit()
  }
})

app.on('activate', function () {
  // On OS X it's common to re-create a window in the app when the
  // dock icon is clicked and there are no other windows open.
  if (mainWindow === null) {
    createWindow()
  }
})

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.

Additional Information

It looks like this happens when the description property exceeds 255 characters length?

@zg3d
Copy link

@zg3d zg3d commented Dec 11, 2020

Could I try to contribute to this issue.

@codebytere
Copy link
Member

@codebytere codebytere commented Dec 12, 2020

hey @zg3d - sure! i'd be happy to give you some pointers. So what's happening here is that is looks like when the SetDescription method is called with a too-long parameter, it causes the IShellLink to not show up. SetJumpList is implemented here, which in turn invokes methods from this file. I'd start by digging into this line.

@MarcoDotIO
Copy link

@MarcoDotIO MarcoDotIO commented Jan 2, 2021

Hi there,

I'm a complete beginner for developing on the Electron platform. Do you guys have any resources for getting started with solving issues with this type of platform?

@ankushduacodes
Copy link

@ankushduacodes ankushduacodes commented Jan 22, 2021

Hi @codebytere, I would love to work on this issue if no one is.
Please let me know if I may.

Thank you!... 🚀

@rohit306-bit
Copy link

@rohit306-bit rohit306-bit commented Feb 1, 2021

i also wants to try to fix it

@codebytere
Copy link
Member

@codebytere codebytere commented Feb 1, 2021

As this is an open source project, you do not need my permission to work on available issues :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants