Refractoring Stage 6.21 Scoped keyboard shortcut settings and handlers locally; they continue to use the mail and productivity feature APIs. Bumped to 0.4.33 (Android version code 433) and updated REFACTOR_PLAN.md.
This commit is contained in:
+3
-1
@@ -121,6 +121,7 @@ This is a gradual destination, not a requirement to move everything at once. IPC
|
|||||||
- [x] Encapsulate OpenPGP mail helpers behind `window.epMailFeatures.pgp` and use the mail API's HTML escaping helper (`pgp-mail-ui.js`).
|
- [x] Encapsulate OpenPGP mail helpers behind `window.epMailFeatures.pgp` and use the mail API's HTML escaping helper (`pgp-mail-ui.js`).
|
||||||
- [x] Encapsulate attachment UI helpers locally; its navigation and renderer hooks continue through the mail API (`attachments.js`).
|
- [x] Encapsulate attachment UI helpers locally; its navigation and renderer hooks continue through the mail API (`attachments.js`).
|
||||||
- [x] Encapsulate snooze UI helpers locally while preserving explicit mail/productivity API usage (`snooze-ui.js`).
|
- [x] Encapsulate snooze UI helpers locally while preserving explicit mail/productivity API usage (`snooze-ui.js`).
|
||||||
|
- [x] Encapsulate keyboard shortcut settings and handlers locally; integrations remain through the mail/productivity feature APIs (`shortcuts.js`).
|
||||||
- [x] Migrate additional mail-related consumers to unique local aliases to avoid classic-script lexical redeclarations.
|
- [x] Migrate additional mail-related consumers to unique local aliases to avoid classic-script lexical redeclarations.
|
||||||
- [x] Add a combined-script parse test to prevent duplicate top-level lexical declarations from stopping later UI scripts.
|
- [x] Add a combined-script parse test to prevent duplicate top-level lexical declarations from stopping later UI scripts.
|
||||||
- [ ] Migrate remaining mail-related consumers and remove transitional global dependencies.
|
- [ ] Migrate remaining mail-related consumers and remove transitional global dependencies.
|
||||||
@@ -149,7 +150,7 @@ This is a gradual destination, not a requirement to move everything at once. IPC
|
|||||||
- Electron Builder and the desktop Actions artifact name derive from `package.json`.
|
- Electron Builder and the desktop Actions artifact name derive from `package.json`.
|
||||||
- Android `versionName` derives from the same package version. Its current `versionCode` mapping is `major * 10000 + minor * 100 + patch`; keep minor and patch below 100, and revise the mapping before reaching that boundary to avoid collisions.
|
- Android `versionName` derives from the same package version. Its current `versionCode` mapping is `major * 10000 + minor * 100 + patch`; keep minor and patch below 100, and revise the mapping before reaching that boundary to avoid collisions.
|
||||||
- `scripts/build-all.ps1` uses the package version for APK naming. Before a release, bump once with `npm run bump:build`, verify the lockfile and computed Android version code, and build every target without another bump.
|
- `scripts/build-all.ps1` uses the package version for APK naming. Before a release, bump once with `npm run bump:build`, verify the lockfile and computed Android version code, and build every target without another bump.
|
||||||
- Latest version check: `package.json` and both lockfile version fields are `0.4.32`; Android derives `versionName 0.4.32` and `versionCode 432`. The user confirms the previous artifact works; this bump is for the next build.
|
- Latest version check: `package.json` and both lockfile version fields are `0.4.33`; Android derives `versionName 0.4.33` and `versionCode 433`. The user confirms the previous artifact works; this bump is for the next build.
|
||||||
|
|
||||||
## Progress log
|
## Progress log
|
||||||
|
|
||||||
@@ -184,5 +185,6 @@ This is a gradual destination, not a requirement to move everything at once. IPC
|
|||||||
- Step 6 at version `0.4.30` scopes PGP mail helpers, preserving the `prepareSend` API and removing its dependency on the core shell's former global HTML escape helper.
|
- Step 6 at version `0.4.30` scopes PGP mail helpers, preserving the `prepareSend` API and removing its dependency on the core shell's former global HTML escape helper.
|
||||||
- Step 6 at version `0.4.31` scopes attachment preview and search helpers while retaining their event-driven integrations.
|
- Step 6 at version `0.4.31` scopes attachment preview and search helpers while retaining their event-driven integrations.
|
||||||
- Step 6 at version `0.4.32` scopes snooze UI helpers; message labeling and mail-state access remain routed through feature APIs.
|
- Step 6 at version `0.4.32` scopes snooze UI helpers; message labeling and mail-state access remain routed through feature APIs.
|
||||||
|
- Step 6 at version `0.4.33` scopes keyboard shortcut helpers and event handlers without changing their Preferences integration.
|
||||||
- The current IPC/DAV validation changes pass the full suite: 108 tests.
|
- The current IPC/DAV validation changes pass the full suite: 108 tests.
|
||||||
- While work continued, `package.json` and `package-lock.json` reflected a version bump to `0.4.6`; those changes were preserved.
|
- While work continued, `package.json` and `package-lock.json` reflected a version bump to `0.4.6`; those changes were preserved.
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ep-mail",
|
"name": "ep-mail",
|
||||||
"version": "0.4.32",
|
"version": "0.4.33",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ep-mail",
|
"name": "ep-mail",
|
||||||
"version": "0.4.32",
|
"version": "0.4.33",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@capacitor/android": "^8.5.2",
|
"@capacitor/android": "^8.5.2",
|
||||||
"@capacitor/core": "^8.5.2",
|
"@capacitor/core": "^8.5.2",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ep-mail",
|
"name": "ep-mail",
|
||||||
"version": "0.4.32",
|
"version": "0.4.33",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Eternity Project mail client",
|
"description": "Eternity Project mail client",
|
||||||
"homepage": "https://git.eternityproject.fi/thuttu/ep-mail-client",
|
"homepage": "https://git.eternityproject.fi/thuttu/ep-mail-client",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
(() => {
|
||||||
// Configurable keyboard shortcuts for common mail actions.
|
// Configurable keyboard shortcuts for common mail actions.
|
||||||
const shortcutMailUi = window.epMailFeatures.mail;
|
const shortcutMailUi = window.epMailFeatures.mail;
|
||||||
const shortcutProductivityUi = window.epMailFeatures.productivity;
|
const shortcutProductivityUi = window.epMailFeatures.productivity;
|
||||||
@@ -103,3 +104,4 @@ shortcutProductivityUi.wrapOpenPreferences(baseOpenPreferences => function () {
|
|||||||
baseSave?.call(save, event);
|
baseSave?.call(save, event);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
})();
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ test('account and snooze UI consume the explicit mail API instead of selected le
|
|||||||
assert.match(mailUi, /window\.epMailFeatures\.mail = mailUiApi/);
|
assert.match(mailUi, /window\.epMailFeatures\.mail = mailUiApi/);
|
||||||
assert.doesNotMatch(mailUi, /(?<!\.)\bopenPreferences\s*\(|(?<!\.)\bquery\s*=/);
|
assert.doesNotMatch(mailUi, /(?<!\.)\bopenPreferences\s*\(|(?<!\.)\bquery\s*=/);
|
||||||
assert.match(shortcutsUi, /window\.epMailFeatures\.mail/);
|
assert.match(shortcutsUi, /window\.epMailFeatures\.mail/);
|
||||||
|
assert.match(shortcutsUi, /^\(\(\) => \{/);
|
||||||
assert.match(shortcutsUi, /window\.epMailFeatures\.productivity/);
|
assert.match(shortcutsUi, /window\.epMailFeatures\.productivity/);
|
||||||
assert.doesNotMatch(accountUi, /\bconnectedMailAccount\b|\bmailPageOffset\b|(?<!\.)\bsyncMailbox\s*\(/);
|
assert.doesNotMatch(accountUi, /\bconnectedMailAccount\b|\bmailPageOffset\b|(?<!\.)\bsyncMailbox\s*\(/);
|
||||||
assert.doesNotMatch(snoozeUi, /\bconnectedMailAccount\b|(?<!\.)\bactiveFolder\b|(?<!\.)\bselectedIds\b|(?<!\.)\bsyncMailbox\s*\(/);
|
assert.doesNotMatch(snoozeUi, /\bconnectedMailAccount\b|(?<!\.)\bactiveFolder\b|(?<!\.)\bselectedIds\b|(?<!\.)\bsyncMailbox\s*\(/);
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
(() => {
|
||||||
// Configurable keyboard shortcuts for common mail actions.
|
// Configurable keyboard shortcuts for common mail actions.
|
||||||
const shortcutMailUi = window.epMailFeatures.mail;
|
const shortcutMailUi = window.epMailFeatures.mail;
|
||||||
const shortcutProductivityUi = window.epMailFeatures.productivity;
|
const shortcutProductivityUi = window.epMailFeatures.productivity;
|
||||||
@@ -103,3 +104,4 @@ shortcutProductivityUi.wrapOpenPreferences(baseOpenPreferences => function () {
|
|||||||
baseSave?.call(save, event);
|
baseSave?.call(save, event);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user