fix: Signposting and Welcome tour overlapping issue (#7421)
Fixes: #7405 Fixes #7226
This commit is contained in:
parent
1db152bd5c
commit
cf3b4ae1be
|
|
@ -278,5 +278,8 @@ export const extractAppIdAndPageIdFromUrl = (url = "") => {
|
|||
};
|
||||
}
|
||||
|
||||
return {};
|
||||
return {
|
||||
applicationId: "",
|
||||
pageId: "",
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -81,11 +81,13 @@ import { createOrganizationSubmitHandler } from "../organization/helpers";
|
|||
import UserApi from "api/UserApi";
|
||||
import ImportApplicationModal from "./ImportApplicationModal";
|
||||
import {
|
||||
BUILDER_PAGE_URL,
|
||||
extractAppIdAndPageIdFromUrl,
|
||||
SIGNUP_SUCCESS_URL,
|
||||
} from "constants/routes";
|
||||
|
||||
import { getIsSafeRedirectURL } from "utils/helpers";
|
||||
import history from "utils/history";
|
||||
|
||||
const OrgDropDown = styled.div`
|
||||
display: flex;
|
||||
|
|
@ -940,14 +942,7 @@ class Applications extends Component<
|
|||
);
|
||||
if (applicationId && pageId) {
|
||||
this.props.enableFirstTimeUserOnboarding(applicationId);
|
||||
/*
|
||||
* window.location.replace resets the application, adding
|
||||
* this timeout to store onboarding variables in indexdb
|
||||
*/
|
||||
|
||||
setTimeout(() => {
|
||||
window.location.replace(redirectUrl);
|
||||
});
|
||||
history.replace(BUILDER_PAGE_URL(applicationId, pageId));
|
||||
}
|
||||
} else if (getIsSafeRedirectURL(redirectUrl)) {
|
||||
window.location.replace(redirectUrl);
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ import { setIsGitSyncModalOpen } from "actions/gitSyncActions";
|
|||
import RealtimeAppEditors from "./RealtimeAppEditors";
|
||||
import { EditorSaveIndicator } from "./EditorSaveIndicator";
|
||||
import getFeatureFlags from "utils/featureFlags";
|
||||
import { getIsInOnboarding } from "selectors/onboardingSelectors";
|
||||
|
||||
const HeaderWrapper = styled(StyledHeader)`
|
||||
width: 100%;
|
||||
|
|
@ -169,6 +170,7 @@ type EditorHeaderProps = {
|
|||
isSaving: boolean;
|
||||
publishApplication: (appId: string) => void;
|
||||
lastUpdatedTime?: number;
|
||||
inOnboarding: boolean;
|
||||
};
|
||||
|
||||
export function EditorHeader(props: EditorHeaderProps) {
|
||||
|
|
@ -342,7 +344,7 @@ export function EditorHeader(props: EditorHeaderProps) {
|
|||
</ProfileDropdownContainer>
|
||||
)}
|
||||
</HeaderSection>
|
||||
<OnboardingHelper />
|
||||
{props.inOnboarding && <OnboardingHelper />}
|
||||
<GlobalSearch />
|
||||
{isSnipingMode && (
|
||||
<BindingBanner className="t--sniping-mode-banner">
|
||||
|
|
@ -363,6 +365,7 @@ const mapStateToProps = (state: AppState) => ({
|
|||
currentApplication: state.ui.applications.currentApplication,
|
||||
isPublishing: getIsPublishingApplication(state),
|
||||
pageId: getCurrentPageId(state),
|
||||
inOnboarding: getIsInOnboarding(state),
|
||||
});
|
||||
|
||||
const mapDispatchToProps = (dispatch: any) => ({
|
||||
|
|
|
|||
|
|
@ -32,3 +32,6 @@ export const getIsFirstTimeUserOnboardingEnabled = createSelector(
|
|||
return enabled && currentApplicationId === applicationId;
|
||||
},
|
||||
);
|
||||
|
||||
export const getIsInOnboarding = (state: AppState) =>
|
||||
state.ui.onBoarding.inOnboarding;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user