question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IdeaHub: Draft Created Message Shows on Drafts Tab Briefly

See original GitHub issue

Bug Description

The draft created message from new tab is also shown on the drafts tab if we switch there fast enough.

Steps to reproduce

  1. In new tab, create a draft.
  2. Switch to drafts tab quickly
  3. Notice that it says Draft Created before changing to View Draft

https://user-images.githubusercontent.com/373931/129885002-52251398-299c-4977-85af-da85d36fba1f.mp4


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The timeout on the “Draft created” message in the Idea Hub widget (after successfully creating a draft) should be immediately stopped/cleared if the user navigates to another tab in the widget. It basically should be ensured that this contextual hint is no longer visible once seeing the same idea in another tab (realistically the “Drafts” tab, since that’s where such an idea would land then).

Implementation Brief

  • Using assets/js/modules/idea-hub/datastore/idea-state.js, add a new action removeActivities which has a mandatory parameter, activityType.
  • removeActivities should remove any item in the activities state variable which has the same value as activityType parameter.
  • Using assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/index.js, dispatch the removeActivities action within the handleTabUpdate passing IDEA_HUB_ACTIVITY_CREATING_DRAFT as value for the activityType parameter.

Test Coverage

  • Add tests for the newly added action.

Visual Regression Changes

  • N/A

QA Brief

  • Follow the repro steps and ensure you can no longer see Creating draft / Draft created messages in the Drafts tab

Changelog entry

  • Update the IdeaHub widget to not display “Draft created” message on the draft tab.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ivankruchkoffcommented, Dec 8, 2021

@eugene-manuilov I don’t like the idea of putting presentation logic in an action.

I went down the path of not showing DRAFT_CREATED in the drafts tab, with the following commit: https://github.com/google/site-kit-wp/pull/4412/commits/d9d448d685e43ea6d562a63e98e4d5b318702105

Which gives us the following experience:

https://user-images.githubusercontent.com/373931/145134707-3984ecc6-9170-4198-a4f8-35dd53a06417.mp4

Which still allows for the temporary messaging on the New tab when we switch back to it within the two seconds.

0reactions
wpdarrencommented, Dec 9, 2021

QA Update: ✅

Verified:

  • When following the steps you can no longer see Creating draft Draft created messages in the Drafts tab.
  • Tested this on desktop and mobile, and the behaviour was the same.

https://user-images.githubusercontent.com/73545194/145410277-5bcbde7e-0cfa-46a0-a9e7-0a4713fadfbd.mp4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Draft responses to messages don't appear in Drafts folder
I'm loosing track of my draft responses to collogues in my Inbox. I will start a response then need to leave it to...
Read more >
Sent mail messages being saved as draft - CNET
One relatively common problem people have with Mail is that the program seems to collect messages in its Drafts mailbox.
Read more >
Save a draft in Mail on iPad - Apple Support
View all your current email drafts · Tap the Show Sidebar button in the upper-left corner. · Tap Edit at the top of...
Read more >
When i click on the draft icon and say the idea is the only one ...
Go to the Site Kit dashboard and locate the Idea Hub dashboard widget. Start with the New tab. Create a scenario where there...
Read more >
Quick Tip: How To Save & Find Email Drafts on iOS Devices
Quick Tip: How To Save & Find Email Drafts on iOS DevicesWarning: You may discover a whole bunch of emails you forgot about...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found