Skip to content

Commit bf4dc49

Browse files
aaspinwallclaude
andauthored
feat(addon): show the add-on version on the add-on's pages (#970) (#973)
Surface the Thunderbird add-on version as a small tag on the add-on's own surfaces — the management page (AddonManagementPage) and the popup (ExtensionPage) — so it's easy to tell which add-on version is running. The tag renders the build's __APP_VERSION__ via a small shared VersionTag.vue. In the add-on build that value is the packages/addon version (the add-on version). It is intentionally NOT added to the standalone web app's own surfaces (main footer, web management page): the web build has its own version, so showing the add-on version there would be misleading and would require cross-package version wiring. Keeping each build to its own __APP_VERSION__ keeps this change simple. Verified on the running dev app: the popup renders the version tag and the web management page does not; all touched components compile. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 198c6c0 commit bf4dc49

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

packages/addon/src/apps/AddonManagementPage.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { BASE_URL } from '@send-frontend/apps/common/constants';
55
import { useAuth } from '@send-frontend/lib/auth';
66
import AuthButtons from '@send-frontend/lib/auth/AuthButtons.vue';
77
import { useAuthStore } from '@send-frontend/stores';
8+
import VersionTag from '@send-frontend/apps/common/VersionTag.vue';
89
import AdminPage from './AdminPage.vue';
910
1011
const authStore = useAuthStore();
@@ -40,6 +41,8 @@ async function openLoginPage() {
4041
</div>
4142
<AdminPage v-else />
4243
</WithLoader>
44+
45+
<VersionTag />
4346
</div>
4447
</template>
4548

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<script setup lang="ts">
2+
// Renders the version of the build this component is compiled into, injected at
3+
// build time via the __APP_VERSION__ define. In the add-on build (where this is
4+
// used, on the management page and popup) that's the add-on version — making it
5+
// easy to tell which add-on version is running.
6+
const version = __APP_VERSION__;
7+
</script>
8+
9+
<template>
10+
<span class="addon-version-tag" data-testid="addon-version">
11+
v{{ version }}
12+
</span>
13+
</template>
14+
15+
<style scoped>
16+
.addon-version-tag {
17+
display: inline-block;
18+
font-family: Inter, sans-serif;
19+
font-size: 0.6875rem;
20+
font-weight: 400;
21+
letter-spacing: 0.02em;
22+
/* Inherit the surrounding text color (dark footer vs. light pages) and dim
23+
it so the tag is present but unobtrusive. */
24+
color: currentColor;
25+
opacity: 0.6;
26+
}
27+
</style>

packages/send/frontend/src/apps/send/ExtensionPage.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { onMounted } from 'vue';
77
88
import { useMetricsUpdate } from '@send-frontend/apps/common/mixins/metrics';
99
import useMetricsStore from '@send-frontend/stores/metrics';
10+
import VersionTag from '@send-frontend/apps/common/VersionTag.vue';
1011
import PopupView from './views/PopupView.vue';
1112
1213
const userStore = useUserStore();
@@ -27,6 +28,7 @@ useMetricsUpdate();
2728
<template>
2829
<div id="send-page" class="container">
2930
<PopupView />
31+
<VersionTag />
3032
</div>
3133
</template>
3234

0 commit comments

Comments
 (0)