Split event handling and chrome.storage saving in extensions options …#2712
Merged
RobbieTheWagner merged 1 commit intoemberjs:mainfrom Feb 21, 2026
Merged
Conversation
NullVoxPopuli
approved these changes
Feb 20, 2026
Contributor
NullVoxPopuli
left a comment
There was a problem hiding this comment.
much better API, nice work
RobbieTheWagner
approved these changes
Feb 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Extracting a bit of code from a larger piece of work to make it more reviewable.
For the extensions modal below:

This PR splits the event handling toggling the Tomster icon from its persistence to
chrome.storage. This is required because of the shape of what we store.This shape:
means that any update to other values we'd like to store in
optionsmust be merged with any existing values we want to retain. It's not been a problem so for because we're only saving a single value. However, if we add another option (the proposedselectedEditor) and don't first grab the stored options, we'd blow them away.We could go with a structure like
and skip the round-tripping / merge and use a pattern where the event handler also stores, but I wasn't sure if we wanted to add more properties to the root object stored or wanted to keep that clean and store all things