Skip to content

Conversation

@DNin01
Copy link
Member

@DNin01 DNin01 commented Oct 4, 2025

Changes

Changing the "Show addon names and descriptions in English" setting now only requires a settings page reload instead of a full extension reload.

Force.English.setting.toggle.reloads.page.mp4

Reason for changes

It's better to reload only the resources that are necessary.

Tests

Tested in Edge 141. Addons still work after toggling setting.

Help me find edge cases?

@DNin01 DNin01 requested a review from Samq64 October 4, 2025 20:04
@DNin01 DNin01 requested a review from WorldLanguages as a code owner October 4, 2025 20:04
@DNin01 DNin01 added type: enhancement New feature for the project scope: l10n All about localization/internationalization scope: webpages Related to the web pages (settings page, pop-up, etc) scope: core Related to the core script/extension workings labels Oct 4, 2025
@WorldLanguages
Copy link
Member

Probably no edge cases at the moment, but it could become a problem in the future.

Maybe you can achieve this exact same user experience (i.e. the tab not closing) while also reloading the extension. For example, by redirecting the user to a data: URL (or about:blank if you want) before reloading, and then sending back the user to the settings page as soon as possible.
This way you end up with the same user experience but less development headaches.

scratchAddons.localState.ready.manifests = false;
scratchAddons.manifests = [];
await loadAddonManifests();
sendResponse("done");
Copy link
Member

Choose a reason for hiding this comment

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

It looks like this respose is never received.

Unchecked runtime.lastError: The message port closed before a response was received.

Copy link
Member

Choose a reason for hiding this comment

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

It is not necessary to send a response.

If you really want to send one, then you need to return true; and avoid the use of async/await in favor of normal promises. (this is how asynchronously sending a response works with the chrome messaging API)

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

Labels

scope: core Related to the core script/extension workings scope: l10n All about localization/internationalization scope: webpages Related to the web pages (settings page, pop-up, etc) type: enhancement New feature for the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants