Skip to content

fix: reject task append to JumpList when description exceeds 260 characters - #28485

Merged
zcbenz merged 5 commits into
electron:masterfrom
HiMyNameIsBennet:26862
Apr 5, 2021
Merged

zcbenz merged 5 commits into
electron:masterfrom
HiMyNameIsBennet:26862

Conversation

@HiMyNameIsBennet

Copy link
Copy Markdown
Contributor

Description of Change

Fixed: #26862

Checklist

Release Notes

Notes: Fixed a bug where, when a JumpList task description exceeded 260 characters, the JumpList was empty, despite valid entries.

@welcome

welcome Bot commented Apr 1, 2021

Copy link
Copy Markdown

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Apr 1, 2021

@nornagon nornagon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a silent failure the right approach here? Should we perhaps throw an error or truncate the content instead?

Also, this limit should be documented somewhere.

Comment thread shell/browser/ui/win/jump_list.cc Resolved
@HiMyNameIsBennet

HiMyNameIsBennet commented Apr 2, 2021 •

Copy link
Copy Markdown
Contributor Author

@nornagon the error is not silenced, just not handled by this part of the script. Within the AppendCategory function in jump_list.cc, there is an error output on rejection of task append, [12720:0402/020411.590:ERROR:jump_list.cc(242)] Failed to append task 'Long Title' to Jump List.

Perhaps it would be better to serve additional information within the rejection itself though, along the lines of "The description of task name exceeds the maximum character limit of 260!"

@nornagon nornagon added the semver/patch backwards-compatible bug fixes label Apr 2, 2021
Comment thread shell/browser/ui/win/jump_list.cc Resolved
@HiMyNameIsBennet

HiMyNameIsBennet commented Apr 2, 2021 •

Copy link
Copy Markdown
Contributor Author

Should there be a change in the documentation to include this limit? If yes, where?

nornagon
nornagon previously approved these changes Apr 2, 2021
@nornagon

nornagon commented Apr 2, 2021 •

Copy link
Copy Markdown
Contributor

Should there be a change in the documentation to include this limit? If yes, where?

Yeah, it should go in the docs for app.setJumpList under docs/api/app.md. maybe also a note in docs/api/structures/jump-list-category.md

@nornagon
nornagon dismissed their stale review April 2, 2021 18:27

let's wait for some docs!

@HiMyNameIsBennet

Copy link
Copy Markdown
Contributor Author

@nornagon I added the documentation changes, do they work like this? Added a small remark to jump-list-item.md as well

@HiMyNameIsBennet

Copy link
Copy Markdown
Contributor Author

Is there anything left to do?

@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Apr 2, 2021
@zcbenz
zcbenz merged commit 82ea8ea into electron:master Apr 5, 2021
@welcome

welcome Bot commented Apr 5, 2021

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk

release-clerk Bot commented Apr 5, 2021

Copy link
Copy Markdown

Release Notes Persisted

Fixed a bug where, when a JumpList task description exceeded 260 characters, the JumpList was empty, despite valid entries.

@trop

trop Bot commented Apr 5, 2021

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "11-x-y", please check out #28524

@trop trop Bot removed the target/11-x-y label Apr 5, 2021
@trop

trop Bot commented Apr 5, 2021

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "12-x-y", please check out #28525

@trop

trop Bot commented Apr 5, 2021

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "13-x-y", please check out #28526

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

Labels

semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows JumpList empty when a single entry has a long description

3 participants