Skip to content

Commit

Permalink
Reader: Stop showing daily prompt modal on editor screen (#98743)
Browse files Browse the repository at this point in the history
Remove `new_prompt` query param from the url which will stop showing daily prompt modal on editor screen.
  • Loading branch information
mehmoodak authored Jan 22, 2025
1 parent b15bf2a commit 9f02393
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
4 changes: 2 additions & 2 deletions client/gutenberg/editor/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ function getPressThisData( query ) {
}

function getBloggingPromptData( query ) {
const { answer_prompt, new_prompt } = query;
return answer_prompt || new_prompt ? { answer_prompt, new_prompt } : null;
const { answer_prompt } = query;
return answer_prompt ? { answer_prompt } : null;
}

function getAnchorFmData( query ) {
Expand Down
3 changes: 1 addition & 2 deletions client/landing/stepper/declarative-flow/site-setup-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ const siteSetupFlow: Flow = {
const intent = params[ 0 ];
switch ( intent ) {
case 'firstPost': {
const exitUrl = addQueryArgs( { new_prompt: true }, `/post/${ siteSlug }` );
return exitFlow( exitUrl );
return exitFlow( `/post/${ siteSlug }` );
}
case 'courses': {
return navigate( 'courses' );
Expand Down
4 changes: 2 additions & 2 deletions client/landing/stepper/declarative-flow/start-writing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const startWriting: Flow = {

return redirect(
`https://${ providedDependencies?.siteSlug }/wp-admin/post-new.php?` +
`${ START_WRITING_FLOW }=true&origin=${ siteOrigin }&new_prompt=true` +
`${ START_WRITING_FLOW }=true&origin=${ siteOrigin }` +
`&postFlowUrl=${ getPostFlowUrl( {
flow: START_WRITING_FLOW,
siteId: providedDependencies?.siteId as string,
Expand Down Expand Up @@ -157,7 +157,7 @@ const startWriting: Flow = {

return redirect(
`https://${ providedDependencies?.siteSlug }/wp-admin/post-new.php?` +
`${ START_WRITING_FLOW }=true&origin=${ siteOrigin }&new_prompt=true` +
`${ START_WRITING_FLOW }=true&origin=${ siteOrigin }` +
`&postFlowUrl=${ getPostFlowUrl( {
flow: START_WRITING_FLOW,
siteId: providedDependencies?.siteId as string,
Expand Down
5 changes: 0 additions & 5 deletions test/e2e/specs/onboarding/onboarding__write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@ describe( DataHelper.createSuiteTitle( 'Onboarding: Write Focus' ), function ()
await page.waitForURL( new RegExp( newSiteDetails.blog_details.site_slug ) );
} );

it( 'Close writing topics modal', async function () {
const editorParent = await editorPage.getEditorParent();
await editorParent.getByLabel( 'Close', { exact: true } ).click();
} );

it( 'Enter blog title', async function () {
await editorPage.enterTitle( postTitle );
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ describe( 'Signup: Tailored Start Writing Flow', () => {
it( 'Publish first post', async function () {
const editorPage = new EditorPage( page );
await editorPage.waitUntilLoaded();
await page.getByLabel( 'Close', { exact: true } ).click();
await editorPage.enterTitle( 'my first post title' );
await editorPage.publish();
await page.getByText( "Your blog's almost ready!" ).waitFor();
Expand Down

0 comments on commit 9f02393

Please sign in to comment.