IdeaHub: Draft Created Message Shows on Drafts Tab Briefly
See original GitHub issueBug Description
The draft created message from new tab is also shown on the drafts tab if we switch there fast enough.
Steps to reproduce
- In new tab, create a draft.
- Switch to drafts tab quickly
- 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 actionremoveActivities
which has a mandatory parameter,activityType
. removeActivities
should remove any item in theactivities
state variable which has the same value asactivityType
parameter.- Using
assets/js/modules/idea-hub/components/dashboard/DashboardIdeasWidget/index.js
, dispatch theremoveActivities
action within thehandleTabUpdate
passingIDEA_HUB_ACTIVITY_CREATING_DRAFT
as value for theactivityType
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 theDrafts
tab
Changelog entry
- Update the IdeaHub widget to not display “Draft created” message on the draft tab.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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/d9d448d685e43ea6d562a63e98e4d5b318702105Which 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.QA Update: ✅
Verified:
Creating draft
Draft created
messages in the Drafts tab.https://user-images.githubusercontent.com/73545194/145410277-5bcbde7e-0cfa-46a0-a9e7-0a4713fadfbd.mp4