Implement Idea Hub setup UI
See original GitHub issueWhile the Idea Hub module does not have any settings for now (see #3521), it still needs to have a setup screen, for now with just a note about privacy and terms of service of this API that the user has to acknowledge.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The Idea Hub module should have its basic information (in
Idea_Hub::setup_info) updated:- The
descriptionshould be: _ Idea Hub suggests what you can write about next, based on searches that haven’t been answered yet_ - The
homepageshould be entirely removed.
- The
- The Idea Hub module should have a new setting
tosAcceptedwhich expects a boolean. The module should only consider itself connected (viaIdea_Hub::is_connected) if the value in that settings istrue. - The Idea Hub module should have a setup screen via a
SetupMaincomponent inassets/js/modules/idea-hub/components/setup/SetupMain.js.- It should follow the design in the Figma file, with two exceptions:
- Instead of the first sentence below the Idea Hub heading, the same description that is present above should be used (taken directly from the Idea Hub module’s data).
- Instead of “Done”, the submit button should say “Continue”, for consistency with e.g. the AdSense setup.
- The checkbox on that screen should control the above
tosAcceptedsetting. Until the checkbox is clicked, the submit button should be disabled.
- It should follow the design in the Figma file, with two exceptions:
Implementation Brief
- Using
includes/Modules/Idea_Hub.php,- Update the
descriptionin thesetup_infomethod as per the AC and removehomepage. - Add the
tosAcceptedto the$required_keysarray of theis_connectedmethod.
- Update the
- Using
includes/Modules/Idea_Hub/Settings.php,- Add
tosAcceptedto the array found inget_default, withfalseas default value.
- Add
- Using
assets/js/modules/idea-hub/datastore/base.js,- Add
tosAcceptedto thesettingSlugsarray when calling thecreateModuleStorefunction.
- Add
- Create
assets/js/modules/idea-hub/components/setup/SetupMain.jswith exports theSetupMainfunctional component with the following details:- The component should be rendered as per the designs in Figma.
- Most of the code can be taken from the
OptimizeSetupMaincomponentassets/js/modules/optimize/components/setup/SetupMain.jswith the following changes:- SVG for the logo can be found here:
assets/svg/idea-hub.svg
- SVG for the logo can be found here:
- Create
assets/js/modules/idea-hub/components/setup/SetupForm.jswhich exports theSetupFormfunctional component with the following details:- The component will be responsible for rendering the content between the logo and the cancel button and styled as per the designs in Figma.
- The submit button should be “Continue” instead of “Done” as per the AC.
- The
SetupFormof other modules (Optimize) can be taken as example. - To get the module description, query the
core/modulesdata store via thegetModuleselector, passingidea-hubas the module slug and then accessing thedescriptionproperty of the result. - Get the value of the
tosAcceptedsetting via thegetTosAcceptedselector of the module’s data store. - The
Checkboxcomponent is used to render the checkbox with the label as per the designs in Figma.- The
valueprop should be1. - The
checkedprop should be dependent of thetosAcceptedvalue. - Upon change, the
setTosAcceptedaction of the module’s data store should be dispatched with the checked state of the checkbox.
- The
- The
Continuebutton should be disabled iftosAcceptedis false.
- Create
assets/sass/components/idea-hub/_googlesitekit-idea-hub-setup.scsswhich will contain all the styles for above components, namely:- The notice found in
SetupForm(“Idea Hub is only available in the US for now”).
- The notice found in
Storybook coverage
- Add Storybook coverage for the two components under
assets/js/modules/idea-hub/components/setup/Setup.stories.js - Use
Modules/Idea Hub/Setup/SetupFormas the title
Test Coverage
- No tests to be added.
Visual Regression Changes
- N/A
QA Brief
Already done
- Enable the
ideaHubModulefeature flag. - You should see the Idea Hub CTA widget on the main Site Kit dashboard.
- Click the ‘set up’ button, and the setup form should be rendered.
- Verify that the submit button is disabled unless the checkbox is checked.
- Checking the checkbox and hitting the submit button should connect Idea Hub and return you to the Site Kit dashboard.
- Verify that the components match the Figma design (there is a Story as well).
Follow-up
- Activate the Idea Hub module and verify that you can complete the module setup as expected.
Changelog entry
- Add Idea Hub setup UI.
Issue Analytics
- State:
- Created 2 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Huawei Cloud Meeting - IdeaHub User Guide
Huawei IdeaHub integrates the HUAWEI CLOUD Meeting service and provides the meeting, whiteboard, projection, bulletin board, and application ...
Read more >Ideas - UiPath Documentation Portal
Explore Ideas Short description:This video presents how to explore the idea from a tenant. The main topics are: Who can access this feature?...
Read more >1-Platform/idea-hub: A hub to share ideas and innovations
Idea Hub SPA for One Platform. Idea Hub is a place to share ideas and innovations, with feedbacks from other users. This repository...
Read more >Take Part in the New UI Preview for Your JetBrains IDE
Go to Settings | Appearance & Behavior | New UI to enable it. Last year IntelliJ IDEA celebrated its 20th birthday. Over these...
Read more >How do I enable the high contrast user interface a...
In User Navigation, click the Account link. Then click the Use High Contrast UI toggle. Reload Page. Reload Page. For the high contrast...
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

I like the updated first clause, I’d just replace the “should” with a different modal verb – we can’t really tell them what to do (: So, combining the two, we have: Idea Hub suggests what you can write about next, based on searches that haven’t been answered yet
@johnPhillips @wpdarren @Pratheep-lab Following up here on my end: Points 1., 3., and 4. are good to go for now as is.
Only point 2. should be re-examined. I haven’t been able to replicate it, for me the checkbox is disabled initially. I wonder whether it is because somehow the setting value still persisted from before?
Moving back to QA to double-check on point 2.