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.

Idea Hub post annotation only shown on drafts

See original GitHub issue

Bug Description

When you trash a draft post, the idea isn’t shown in the trash.

Steps to reproduce

  1. Create a draft from an idea, notice the idea name is in the status.
  2. Trash the post, idea name is not shown.
  3. Restore the trashed post, and see the idea is shown again.

Recording

https://user-images.githubusercontent.com/373931/130031511-4fe045a8-c7f4-4f7a-a4dc-d3ac43fadcb7.mp4


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

Acceptance criteria

  • The Idea Hub annotation added to Idea Hub created posts in the post list table should be shown for posts of all statuses, not only drafts (e.g. trashed, future, pending, private, etc) – how it is added depends on the post status, post state, and post title
  • For draft posts with no title only, the state should be replaced by Idea Hub Draft “{idea-name}”
  • For all other post statuses OR drafts that have titles, the annotation should be simplified to inspired by Idea Hub
  • For all post statuses (except drafts with no title)
    • If there is already content for the post state (e.g. scheduled), combine the original content of the post state by appending the annotation like so: {post-state}, {idea-hub-annotation}
    • If no content exists for the post state, the annotation becomes the post state, rather than appending to it
  • See https://github.com/google/site-kit-wp/pull/4061#discussion_r712384583 for reference

Implementation Brief

$post_states[$post->post_status ] = ... 

Test Coverage

  • Update test name and test in tests/phpunit/integration/Modules/Idea_HubTest.php::test_draft_labels()

https://github.com/google/site-kit-wp/blob/38ae6cb09c82acea56a5bde768028d93b3cc6580/tests/phpunit/integration/Modules/Idea_HubTest.php#L97-L147

Visual Regression Changes

  • N/A

QA Brief

  • Create an idea hub draft, ensure that the posts list table shows its status message as Idea Hub Draft ....
  • Set a title and update the draft, ensure that the status says inspired by Idea Hub.
  • Trash the post and ensure it still has the correct status message.
Screen Shot 2021-09-16 at 4 11 28 PM

Changelog entry

  • Update the post state for Idea Hub posts and enable it for posts of all statuses.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
marrrmarrrcommented, Sep 8, 2021

SGTM for using “inspired by Idea Hub” for all posts with a title updated by the user (including posts in draft state with an updated title).

1reaction
marrrmarrrcommented, Sep 1, 2021

@eugene-manuilov I’m not sure how familiar users will be in the beginning with the Idea Hub icon, and if they would understand why it’s there / what it means. I’d suggest adding the short text for now and revisit to add the icon at a later stage, a few months after we’ve rolled the feature out to 100% of eligible sites.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show Idea Hub context for posts based on Idea Hub ... - GitHub
The WordPress posts list table should indicate which posts are drafts created on an Idea Hub idea. Do not alter or remove anything...
Read more >
How do I view annotation feedback comments from my...
The View Feedback link displays an indicator if annotated comments have been ... If your assignment looks different than what is displayed in...
Read more >
INCEpTION User Guide
INCEpTION supports span layers in order to annotate a span from one character (“letter”) in the text to another, relation layers in order...
Read more >
Introducing Modern Comments in Microsoft Word
After you draft a new comment or reply, click the Post button or use the keyboard shortcut Ctrl+Enter (Windows) or Cmd + Enter...
Read more >
C# Chart Line Annotation disappears when anchor point is off ...
The annotations didn't show when I tried it first, so I added 0.005 to the AnchorX to see if it had to be...
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