Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Include view #5489

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class PasswordResetRequest {
private static getResetRedirectLink(token: string, user: UserEntity, src?: PasswordResetFlowEnum): string {
// ensure that only users without passwords are allowed to reset
if (src === PasswordResetFlowEnum.USER_PROFILE && !user.password) {
return `${process.env.FRONT_BASE_URL}/settings/profile?token=${token}`;
return `${process.env.FRONT_BASE_URL}/settings/profile?token=${token}&view=password`;
}

/**
Expand Down
1 change: 1 addition & 0 deletions apps/web/cypress/tests/organization-brand.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
describe('Organization Brand Screen', function () {
beforeEach(function () {
// TODO: remove after Information Architecture is fully enabled
cy.mockFeatureFlags({ IS_INFORMATION_ARCHITECTURE_ENABLED: true });
cy.initializeSession().as('session');
cy.visit('settings/brand');
Expand Down
11 changes: 7 additions & 4 deletions apps/web/src/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import { useSettingsRoutes } from './SettingsRoutes';

export const AppRoutes = () => {
const isImprovedOnboardingEnabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_IMPROVED_ONBOARDING_ENABLED);
const isInformationArchitectureEnabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_INFORMATION_ARCHITECTURE_ENABLED);

return (
<Routes>
Expand Down Expand Up @@ -116,10 +117,12 @@ export const AppRoutes = () => {
<Route path={ROUTES.TEAM} element={<MembersInvitePage />} />
<Route path={ROUTES.CHANGES} element={<PromoteChangesPage />} />
<Route path={ROUTES.SUBSCRIBERS} element={<SubscribersList />} />
<Route path={ROUTES.BRAND} element={<BrandPage />}>
<Route path="" element={<BrandingForm />} />
<Route path="layouts" element={<LayoutsListPage />} />
</Route>
{!isInformationArchitectureEnabled && (
<Route path={ROUTES.BRAND} element={<BrandPage />}>
<Route path="" element={<BrandingForm />} />
<Route path="layouts" element={<LayoutsListPage />} />
</Route>
)}
<Route path={ROUTES.LAYOUT} element={<LayoutsPage />}>
<Route path="" element={<LayoutsListPage />} />
</Route>
Expand Down
4 changes: 1 addition & 3 deletions apps/web/src/SettingsRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ export const useSettingsRoutes = () => {
path=""
element={isInformationArchitectureEnabled ? <Navigate to={ROUTES.PROFILE} replace /> : <ApiKeysCard />}
/>
<Route path="billing/*" element={<BillingRoutes />} />
<Route path="billing/*" element={isInformationArchitectureEnabled ? <BillingPage /> : <BillingRoutes />} />
<Route path="email" element={<EmailSettings />} />
<Route path="team" element={<MembersInvitePageNew />} />
<Route path="brand" element={<BrandingFormOld />} />
{/* ensure legacy routes re-route to base settings page */}
<Route
path="permissions"
Expand Down Expand Up @@ -93,7 +92,6 @@ export const useSettingsRoutes = () => {
<Route path={ROUTES.BRAND_SETTINGS} element={<BrandingPage />} />
<Route path={ROUTES.ORGANIZATION} element={<OrganizationPage />} />
<Route path={ROUTES.TEAM_SETTINGS} element={<TeamPage />} />
<Route path={`${ROUTES.BILLING}/*`} element={<BillingPage />} />
<Route path={ROUTES.WEBHOOK} element={<WebhookPage />} />
<Route path={ROUTES.SECURITY} element={<AccessSecurityPage />} />
<Route path={`${ROUTES.SETTINGS}`} element={<Navigate to={ROUTES.PROFILE} replace />} />
Expand Down