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
Do not show user input flow after having already completed it #2603
Comments
@felixarntz IB is ready for review, but I just wanted to point out that it seems there is a contradiction in the ACs:
This seems to be contradicted by:
Would you please clarify? Also, it seemed that adding a user-specific flag (user setting) didn't seem to be necessary for this purpose, but perhaps I'm misunderstanding what's needed. |
@aaemnnosttv I don't think there's a contradiction in the ACs, maybe they were slightly unclear: We should basically move the entire check from before starting setup to after completing setup. We can almost leave
Yes this is indeed not necessary, I've updated the ACs. Regarding your IB:
Instead of removing
This is correct according to what my original ACs said, however, given what we realized the other week in our team call, this proxy-specific feature flag should not be based on the remote-controlled feature flag. We can only determine the latter during the setup flow, so anything sent before may not be accurate. Let's use this |
@felixarntz thanks for clarifying, although your last comment seems to conflict with the last point in the current ACs which says that the entry should only be added to the supported features if the feature flag is set. I'll go with what you said and add it unconditionally, but please confirm and update the ACs if necessary. IB updated and ready for another pass 👍 |
@aaemnnosttv Good catch, I've updated this in the ACs too. IB almost ✅, but it's missing a note on removing the bit about the |
@felixarntz ah you're right – updated 👍 I assume this is good to go now since you moved it forward to the backlog? |
Yes, all good - was expecting that update to be trivial :) |
QA Update: Engineer confirmation
|
@wpdarren This is intended behavior. The user input questionnaire answers are stored on the Site Kit service outside of the plugin, so that they are truly persistent even beyond reset/disconnects. In other words, you only respond once per WordPress site per user, ever. The idea is, when you reset your site, you often do it to try fixing an issue or so. It would be tedious to be always asked for the responses again in such a case. |
@felixarntz thank you, I did wonder if that was the case but did not want to make any assumptions. QA Update: Pass ✅Verified: For a new site, user input questions appear, and are completed. The site is then disconnected. When reconnected, the user input screens does not appear. When I look in the admin settings tab, the answers provided are displayed. |
Via #2316, when a user starts the Site Kit setup flow, the user input state flag is now set to
required
whenever it is not already set to completed. This needs to be refined as it results in unexpected behavior when the user disconnects themselves or resets the plugin because:required
.There is no case where somebody would access the setup screen unless they're disconnected. So the current logic basically is pointless, as it will always result in the user input state flag set to
required
.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
required
in any situation). Also themode=user_input
query parameter should never be added to the proxy setup URL.userInput
feature flag is enabled, the plugin should check to refresh the user input state flag (which would basically happen right when getting redirected back from the proxy). If that check results in anything other thancompleted
(orrequired
), the user input state flag should be updated to sayrequired
. This will then result in the redirect to the user input flow, similar to today.OAuth_Client::get_proxy_setup_supports()
method should be expanded to include a feature "user_input_flow". The proxy will then determine that on its own.Implementation Brief
Authentication::require_user_input
call from within theGoogle_Proxy::ACTION_SETUP
callback in the same class’Authentication::register
Authentication::require_user_input
as a callback on thegooglesitekit_authorize_user
action (using method proxy) inAuthentication::register
Authentication::require_user_input
:User_Input_Settings::set_settings( null )
to refresh the user input state from the proxy before reading theuser_input_state
(but only if theuserInput
flag is enabled)googlesitekit_proxy_setup_url_params
site-kit-wp/includes/Core/Authentication/Authentication.php
Lines 1109 to 1115 in 8b83400
OAuth_Client::get_proxy_setup_supports
to include a newuser_input_flow
unconditionallyTest Coverage
AuthenticationTest
to cover the new behavior hooked ontogooglesitekit_authorize_user
Visual Regression Changes
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: