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

Fix popover items not updating #9028

Merged
merged 5 commits into from Apr 4, 2017

Conversation

Projects
None yet
2 participants
@MarshallOfSound
Member

MarshallOfSound commented Mar 27, 2017

Fixes #9025

Code to test it's working correctly

let counter = 1;
const button = new TouchBar.TouchBarButton({
  label: `${counter}`,
  click: () => {
    counter += 1;
    button.label = `${counter}`;
  }
})

let counter2 = 1;
const button2 = new TouchBar.TouchBarButton({
  label: `${counter2}`,
  click: () => {
    counter2 += 1;
    button2.label = `${counter2}`;
  }
})

const touchBar = new TouchBar([
  button2,
  new TouchBar.TouchBarPopover({
    label: 'Pop',
    items: new TouchBar([
      button,
    ])
  }),
  new TouchBar.TouchBarPopover({
    label: 'Pop2',
    items: new TouchBar([
      button,
      button2
    ])
  })
])

mainWindow.setTouchBar(touchBar)
@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki Mar 28, 2017

Contributor

Code to test it's working correctly

Could we add an update call in the specs somewhere to make sure this new path is exercised, even though there is nothing to assert probably.

Contributor

kevinsawicki commented Mar 28, 2017

Code to test it's working correctly

Could we add an update call in the specs somewhere to make sure this new path is exercised, even though there is nothing to assert probably.

@MarshallOfSound

This comment has been minimized.

Show comment
Hide comment
@MarshallOfSound

MarshallOfSound Mar 29, 2017

Member

Updated 👍

Member

MarshallOfSound commented Mar 29, 2017

Updated 👍

@kevinsawicki kevinsawicki self-assigned this Mar 29, 2017

@kevinsawicki kevinsawicki merged commit 7574c33 into master Apr 4, 2017

7 of 9 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
electron-linux-arm Build #6110918 succeeded in 73s
Details
electron-linux-ia32 Build #6110919 succeeded in 65s
Details
electron-linux-x64 Build #6110920 succeeded in 152s
Details
electron-mas-x64 Build #3822 succeeded in 8 min 9 sec
Details
electron-osx-x64 Build #3818 succeeded in 8 min 59 sec
Details
electron-win-ia32 Build #2810 succeeded in 8 min 14 sec
Details
electron-win-x64 Build #2782 succeeded in 8 min 15 sec
Details

@kevinsawicki kevinsawicki deleted the fix-popover-items-not-updating branch Apr 4, 2017

@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki Apr 4, 2017

Contributor

Thanks for the fix @MarshallOfSound 👍 🚢

Contributor

kevinsawicki commented Apr 4, 2017

Thanks for the fix @MarshallOfSound 👍 🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment