-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store User Input answers in Site Database #5898
Comments
@hussain-t this is not needed because the parent class The |
Thanks, @hussain-t. IB ✔️ |
@hussain-t Quick question for a little confirmation, so that I don't spend time in the wrong direction. Do you think it'd be wise not to store the CC: @eugene-manuilov |
@nfmohit, it wasn’t mentioned where to store data in the User Input V2 docs. However, based on this point, your suggestion could be right:
@kuasha420, WDYT? |
@hussain-t That is correct and was the intention. Nice. cc @nfmohit |
QA Update: ❌@nfmohit I have a few observations, which might be expected but would like to check.
This leads me to that at the moment, when you login with different users, using different Google accounts, each user is able to submit their own separate answers, is this expected too? |
Thank you for sharing your findings, @wpdarren.
That is very odd and I can't seem to be able to replicate it. Here's a screencast:
That is expected. Only the first question is a site-scoped question. Answers to the other questions vary and are stored separately for each user.
Interesting. I was able to replicate this. However, upon further investigation of the code, it looks like this is happening due to the changes made in #5895. Could we raise it as a potential regression there?
This is expected at this stage. This happens due to my last point in the QA Brief:
|
QA Update:
|
Thank you for the re-confirmation, @wpdarren. I was able to replicate this. Apparently, this only happens when the user has not completed the user input flow yet, which is why I wasn't able to replicate it as I had done it once and was updating it to try and replicate. For more technical context, when the user input is not at a Just to clarify, this isn't a regression from this particular issue. I believe this existed from the initiation. I have opened #6321 to address this. |
…cache Fix User Input question missing scope
QA Update: ✅Verified:
Currently, the user input answers will be wiped out if a user signs into Site Kit. This should be resolved once #5900 is merged. |
Feature Description
Currently, the answers to the User Input questions are being stored in the Site Kit Service and then being synced and cached. Going forward, the answers should be stored on the WordPress Site's Database.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
In
includes/Core/Util/User_Input_Settings.php
, add the following changes:User_Input_Settings
withUser_Setting
abstract class.OPTION
with valuegooglesitekit_user_input_settings
.REST:get_routes
method update the following changes in theuser-input-settings
REST route:User_Input_Settings::get
method to retrieve the user input settings instead of theget_settings
method.User_Input_Settings::set
method to update the user input settings instead of theset_settings
method.get_settings
andset_settings
methods to use theUser_Input_Settings::get
andUser_Input_Settings::set
methods respectively.Authentication::verify_user_input_settings
method with the following changes:User_Input_Settings::get
method to retrieve the user input settings instead of theUser_Input_State::get
method.User_Input_Settings::has
method to check if the user input settings are set instead of theUser_Input_Settings::are_settings_empty
method.Test Coverage
QA Brief
site
scoped question (currently only thePurpose
question) as answered, but the others as not, by a first admin.QA:Eng
_options
and_usermeta
tables.Changelog entry
The text was updated successfully, but these errors were encountered: