Skip to content

Comments

release: v2.12.0#757

Merged
kvhnuke merged 5 commits intomainfrom
develop
Sep 18, 2025
Merged

release: v2.12.0#757
kvhnuke merged 5 commits intomainfrom
develop

Conversation

@kvhnuke
Copy link
Contributor

@kvhnuke kvhnuke commented Sep 18, 2025

Summary by CodeRabbit

  • New Features

    • Added an in-app survey popup with a dismiss option; once dismissed, it won’t reappear.
    • Introduced smooth slide-fade transitions for the banner area.
    • Smart display logic: shows the survey if the Solana staking banner isn’t shown, with a brief delay for a less intrusive experience.
  • Improvements

    • Updated banner interactions to better coordinate between staking banner and survey popup.
  • Chores

    • Bumped extension version to 2.12.0.

@coderabbitai
Copy link

coderabbitai bot commented Sep 18, 2025

Walkthrough

Adds a survey popup feature to the app menu with state persistence. Introduces a new banners-state flag and API to control popup visibility, integrates timed display and close handling in the UI, adjusts a Solana banner metric event, and bumps the extension package version.

Changes

Cohort / File(s) Summary
Version bump
packages/extension/package.json
Version updated from 2.11.0 to 2.12.0.
Banners state: survey popup flag & API
packages/extension/src/libs/banners-state/index.ts, packages/extension/src/libs/banners-state/types.ts
Adds isHideSurveyPopup to state; persists under bannersInfo; exposes showSurveyPopup(): Promise and hideSurveyPopup(): Promise; integrates with init/reset.
Survey popup feature integration
packages/extension/src/ui/action/components/app-menu/index.vue, packages/extension/src/ui/action/components/app-menu/components/survey-popup.vue
New survey-popup component; app-menu renders either Solana banner or survey popup with slide-fade Transition; delayed popup display via bannersState.showSurveyPopup(); close hides via bannersState.hideSurveyPopup(); added enter/leave CSS.
Solana banner metric update
packages/extension/src/ui/action/components/app-menu/components/solana-staking-banner.vue
Changes tracked event in openStakingLink from SolanaWalletClicked to NetworkListClicked.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant AM as AppMenu (index.vue)
  participant BS as BannersState
  participant SB as SolanaBanner
  participant SP as SurveyPopup
  participant BR as Browser (openLink)

  rect rgb(241,248,255)
  note over AM: onMounted
  AM->>BS: showSolanaStakingBanner()
  alt Solana banner visible
    AM-->>SB: Render Solana banner
  else Not visible
    AM->>BS: showSurveyPopup()
    BS-->>AM: boolean (can show?)
    alt can show
      AM->>AM: wait 4s
      AM-->>SP: Render Survey popup
    end
  end
  end

  rect rgb(245,255,245)
  note over SB: User clicks banner
  U->>SB: Click
  SB->>BR: openLink(staking URL)
  end

  rect rgb(255,246,240)
  note over SP: User interacts
  U->>SP: Click CTA
  SP->>BR: openLink(survey URL)
  SP-->>AM: emit close
  AM->>BS: hideSurveyPopup()
  end

  rect rgb(255,246,240)
  note over SP: User closes popup (X)
  U->>SP: Close
  SP-->>AM: emit close
  AM->>BS: hideSurveyPopup()
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • gamalielhere

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "release: v2.12.0" is concise and directly reflects the primary change in the changeset (the package.json version bump to 2.12.0) and the PR's intent to publish a release; it is appropriate for a release pull request. While it does not enumerate included feature changes, release PR titles commonly use this format and remain clear to reviewers scanning history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Sep 18, 2025

💼 Build Files
chrome: enkrypt-chrome-a3f5aaba.zip
firefox: enkrypt-firefox-a3f5aaba.zip

💉 Virus total analysis
chrome: a3f5aaba
firefox: a3f5aaba

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
packages/extension/src/ui/action/components/app-menu/components/survey-popup.vue (1)

6-13: Use button elements for clickable UI (a11y, semantics).

Replace a href="javascript:void(0);" with <button> for both CTA and close controls.

Apply:

-      <a href="javascript:void(0);" @click="openSurveyLink" class="button"
-        ><span>Click here</span></a
-      >
+      <button type="button" @click="openSurveyLink" class="button">
+        <span>Click here</span>
+      </button>

-    <a class="survey-popup__close" @click="close">
+    <button type="button" class="survey-popup__close" @click="close" aria-label="Close survey popup">
       <close-icon />
-    </a>
+    </button>
packages/extension/src/libs/banners-state/index.ts (1)

16-26: Backfill new state keys when reading old stored objects.

Merge with defaults on read to persist newly added keys (avoids repeated “show” until first hide).

Apply:

-    if (state) {
-      return state;
-    }
-    const newState: IState = {
+    const defaultState: IState = {
       isHideSolanStakingBanner: false,
       isHideNetworkAssetSolanStakingBanner: false,
       isHideSurveyPopup: false,
     };
-    await this.storage.set(StorageKeys.bannersInfo, newState);
-    return newState;
+    if (state) {
+      const merged: IState = { ...defaultState, ...state };
+      // Persist once if we added new keys
+      if (
+        (state as Partial<IState>).isHideSurveyPopup === undefined ||
+        Object.keys(state).length !== Object.keys(merged).length
+      ) {
+        await this.storage.set(StorageKeys.bannersInfo, merged);
+      }
+      return merged;
+    }
+    await this.storage.set(StorageKeys.bannersInfo, defaultState);
+    return defaultState;
packages/extension/src/ui/action/components/app-menu/index.vue (2)

560-566: Debounce and cancel the survey timer to avoid duplicates and leaks.

Multiple calls to openSurveyPopup() can schedule multiple timers; also cancel on unmount.

Apply:

-const openSurveyPopup = async () => {
-  if (await bannersState.showSurveyPopup()) {
-    setTimeout(() => {
-      isSurveyPopup.value = true;
-    }, 4000);
-  }
-};
+const openSurveyPopup = async () => {
+  if (await bannersState.showSurveyPopup()) {
+    if (surveyTimeout.value) clearTimeout(surveyTimeout.value);
+    surveyTimeout.value = setTimeout(() => {
+      isSurveyPopup.value = true;
+      surveyTimeout.value = null;
+    }, 4000);
+  }
+};

Additions outside this hunk:

// imports
import { PropType, ref, computed, onMounted, onBeforeUnmount } from 'vue';

// near other refs
const surveyTimeout = ref<ReturnType<typeof setTimeout> | null>(null);

// lifecycle
onBeforeUnmount(() => {
  if (surveyTimeout.value) clearTimeout(surveyTimeout.value);
});

568-572: Clear pending timer on close for consistency.

 const closeSurveyPopup = () => {
   isSurveyPopup.value = false;
+  if (surveyTimeout.value) {
+    clearTimeout(surveyTimeout.value);
+    surveyTimeout.value = null;
+  }
   bannersState.hideSurveyPopup();
 };
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4a2ada and a3f5aab.

📒 Files selected for processing (6)
  • packages/extension/package.json (1 hunks)
  • packages/extension/src/libs/banners-state/index.ts (3 hunks)
  • packages/extension/src/libs/banners-state/types.ts (1 hunks)
  • packages/extension/src/ui/action/components/app-menu/components/solana-staking-banner.vue (1 hunks)
  • packages/extension/src/ui/action/components/app-menu/components/survey-popup.vue (1 hunks)
  • packages/extension/src/ui/action/components/app-menu/index.vue (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: buildAll
🔇 Additional comments (6)
packages/extension/src/libs/banners-state/types.ts (1)

8-9: State shape extension — LGTM.

New isHideSurveyPopup key is consistent with existing “hide” flags.

packages/extension/src/ui/action/components/app-menu/components/solana-staking-banner.vue (1)

34-34: Metric event rename: confirm downstream dashboards.

Switching to NetworkListClicked looks intentional; confirm it exists in SolanaStakingBannerEvents and is wired in analytics dashboards.

packages/extension/src/libs/banners-state/index.ts (1)

58-67: Survey popup APIs — LGTM.

API shape mirrors existing banner show/hide; no issues.

packages/extension/src/ui/action/components/app-menu/index.vue (2)

161-173: Transition + keyed branches — LGTM.

Clean exclusivity between banners with proper keys for animations.


583-596: Slide-fade animation — LGTM.

Durations feel reasonable; no jank risks spotted.

packages/extension/package.json (1)

3-3: Version bump only — LGTM. Verify extension manifest alignment.
packages/extension/package.json = 2.12.0; no manifest*.json found under packages/extension — if manifests are generated or located elsewhere, ensure they reflect 2.12.0.

@kvhnuke kvhnuke merged commit c0b090a into main Sep 18, 2025
5 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Sep 24, 2025
kvhnuke added a commit that referenced this pull request Oct 2, 2025
Merge pull request #757 from enkryptcom/develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants