feat(profile)!: replace sidebar and add avatar navigation
Rename the global Sidebar route, UI, assets, analytics, and payment return context to Profile. Add accessible message-avatar navigation and preserve the source character across auth and logout flows. BREAKING CHANGE: /sidebar has been removed; use /profile instead.
This commit is contained in:
@@ -69,9 +69,9 @@ describe("FeedbackScreen", () => {
|
||||
).toBe("feedback-content-hint");
|
||||
expect(
|
||||
container.querySelector<HTMLAnchorElement>(
|
||||
'[data-analytics-key="feedback.back_to_sidebar"]',
|
||||
'[data-analytics-key="feedback.back_to_profile"]',
|
||||
)?.getAttribute("href"),
|
||||
).toBe("/sidebar?returnTo=%2Fcharacters%2Fmaya%2Fchat");
|
||||
).toBe("/profile?returnTo=%2Fcharacters%2Fmaya%2Fchat");
|
||||
});
|
||||
|
||||
it("submits valid text and renders the feedback id", async () => {
|
||||
@@ -106,7 +106,7 @@ describe("FeedbackScreen", () => {
|
||||
});
|
||||
expect(container.textContent).toContain("feedback-123");
|
||||
expect(container.textContent).toContain("Thank you for helping us.");
|
||||
expect(container.textContent).toContain("Back to Sidebar");
|
||||
expect(container.textContent).toContain("Back to Profile");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -77,11 +77,11 @@ export function FeedbackScreen({ returnTo }: FeedbackScreenProps) {
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
data-analytics-key="feedback.back_to_sidebar"
|
||||
data-analytics-key="feedback.back_to_profile"
|
||||
className={styles.primaryButton}
|
||||
onClick={() => navigator.replace(navigation.sidebarUrl)}
|
||||
onClick={() => navigator.replace(navigation.profileUrl)}
|
||||
>
|
||||
Back to Sidebar
|
||||
Back to Profile
|
||||
</button>
|
||||
</section>
|
||||
</main>
|
||||
@@ -102,10 +102,10 @@ export function FeedbackScreen({ returnTo }: FeedbackScreenProps) {
|
||||
|
||||
<header className={styles.header}>
|
||||
<BackButton
|
||||
href={navigation.sidebarUrl}
|
||||
href={navigation.profileUrl}
|
||||
variant="soft"
|
||||
ariaLabel="Back to sidebar"
|
||||
analyticsKey="feedback.back_to_sidebar"
|
||||
ariaLabel="Back to profile"
|
||||
analyticsKey="feedback.back_to_profile"
|
||||
/>
|
||||
<div className={styles.headingBlock}>
|
||||
<h1 className={styles.title}>Help us improve CozSweet</h1>
|
||||
|
||||
Reference in New Issue
Block a user