Switch Idea Hub module REST route for updating idea states to actually use Idea Hub API
See original GitHub issueBroken out from #3518: Since the Idea Hub API route to update an idea’s state is still not working correctly, the POST:update-idea-state
REST endpoint should be connected to the actual API separately, in this issue.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The
POST:update-idea-state
endpoint should use https://github.com/googleapis/google-api-php-client-services/blob/master/src/Google/Service/Ideahub/Resource/PlatformsPropertiesIdeaStates.php, passing platform and property similar to the other endpoints (see #3518) and the received idea name as the “ideaState” placeholder in the path. The data point should expect a single variableideaState
which needs to be an object / associative array withname
(idea name string, also used in the path as mentioned right above),saved
(boolean) anddismissed
(boolean) fields. - In other words, with this issue, saving/unsaving and dismissing an idea should actually begin to work / result in the idea no longer showing up in the new/saved tab.
Implementation Brief
- Verify that the approach in #3767 works as intended when the corresponding Idea Hub API starts to work correctly. If it doesn’t work as intended (see AC) then make necessary changes and send PR for code review
Test Coverage
- N/A
Visual Regression Changes
- N/A
QA Brief
- Activate Idea Hub module
- Set the custom site URL setting in the Site Kit developer settings to
https://www.elasticpress.io/
- Go to the dashboard and verify that you see new ideas
- Click on the pin icon to save the idea. Verify that the saved idea has been moved to the “Saved” ideas tab.
- Refresh the page and verify that the saved ideas list contains the recently saved idea and the new ideas list doesn’t contain it anymore.
- Now unsave the idea and verify that the idea has been moved to the ideas list (at the end). Plus after refreshing the page you see it in the new ideas list and don’t see it in the saved ideas anymore.
- NOTE: While the above is what should happen here, there appears to be currently a bug with the API that prevents the first sentence above from working. In other words, the (for now broken) accepted functionality is: When unsaving, at first the idea won’t move back to the “New” tab. But it should at least have been moved there once you refresh the page. This likely needs to be fixed at the API level (also see https://github.com/google/site-kit-wp/pull/3767#discussion_r685573564).
- Dismiss an idea and verify that the idea doesn’t re-appear after refreshing the dashboard page.
Changelog entry
- Implement functionality for saving and dismissing an Idea Hub idea.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Switch Idea Hub module REST routes to actually use ... - GitHub
Switch Idea Hub module REST routes to actually use Idea Hub API #3518 ... GET:new-ideas; GET:saved-ideas; POST:update-idea-state.
Read more >Hub REST API Reference - Help - JetBrains
This section contains all currently public REST API methods in Hub. Auth Modules · Auto Join Groups of Auth Module.
Read more >REST API reference - Product Documentation | ServiceNow
The CI Lifecycle Management API provides endpoints to manipulate configuration item (CI) operational states and apply CI actions.
Read more >Zalando RESTful API and Event Guidelines
Embracing 'API as a Product' facilitates a service ecosystem, which can be evolved more easily and used to experiment quickly with new business...
Read more >Understand Open Shortest Path First (OSPF) - Design Guide
OSPF uses IP multicast to send link-state updates. ... The idea behind this is that routers have a central point of contact for...
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
@felixarntz QAB is added.
@eugene-manuilov Can you also add a QA Brief here? It should include some basic testing of saving, unsaving, and dismissing, since that’s now enabled by this API endpoint.