-
Notifications
You must be signed in to change notification settings - Fork 293
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
Connect modules briefly shows another module connected. #2796
Comments
@ivankruchkoff I am unable to reproduce this issue at my end. Would you mind to share more information so we can try to setup same environment & can replicate at our end. |
@ivankruchkoff Just checking in here – are you able to share some more details so that @abdullah1908 can try to run some more tests? Thanks! |
@abdullah1908 @bethanylang An interesting issue that I have recreated, but the steps are not what you would expect a user to go through. That said, I will leave it up to the engineers to make the decision if we fix this. Here are the steps I took to recreate:
It then gets caught up in a bit of a loop. Please note even when you use the latest version of Site Kit this issue still occurs. Here's a screencast in case this helps: Screen.Capture.on.2021-03-17.at.00-20-33.mov |
@felixarntz Reassigning to you for triage. As Darren noted, this looks like a pretty isolated edge case, so probably not a priority. |
So the easier way to resolve this particular issue is a cache invalidation param in the selector causing it to fire again in: const cacheBust = +new Date;
const modulesData = useSelect( ( select ) => select( CORE_MODULES ).getModules( cacheBust ) ); The better solution here is to think of modules as having three states rather than two, currently we have a
What we really need is 2796-2.mp4After the UI update in the video, we are redirected to Google for auth to get permissions to activate What are your thoughts @felixarntz and @aaemnnosttv? |
@ivankruchkoff the state change you highlighted in your last comment is a known issue, but isn't this different than the issue you originally reported above?
I think this is probably the way to go, but the 3rd state should probably be a more generic "transitional" state since the same is possible when deactivating as well. The tricky thing is in settings for example, we want to show lists of all active/inactive modules that are resilient to activation changes. In this case we might need 4 states: active, activating, inactive, and deactivating. Again, this seems to be a separate issue (although similar) to the one in this issue's description which I'm not sure is still an issue or not. |
Just to confirm @aaemnnosttv @ivankruchkoff that I see the original error somewhat frequently! (and I keep ruining my train of thought thinking about this ticket 😂 ) |
Yes, you're quite right. |
@ivankruchkoff all of the the invalidation actions on the store only invalidate the selector's resolver (specifically the "internal" state that keeps track of if it ran) – it doesn't change the related state which is used by the selector. Invalidating site-kit-wp/assets/js/googlesitekit/modules/datastore/modules.js Lines 418 to 426 in df5db33
With that said, I've tried to reproduce the original issue and was not able to. Can you check again to see if this is still possible? cc @wpdarren |
Still an issue @aaemnnosttv, here's a repro screen recording. 2796-3.mp4 |
Thanks a lot for the screencast @ivankruchkoff – I just tried this out myself and wasn't able to reproduce it; when I click "Back" it shows connected for me 🤷♂️ . With that said, if this only happens after navigating back then I would say this isn't worth spending time on, at least any time soon 😄 Thoughts @felixarntz ? |
If it only occurs after navigating "back", I'd agree it's not highly crucial, however I'd say it's still a valid bug - maybe a P2? There may some related improvements also worth making though, for example, maybe the PSI module shouldn't show as connected until the redirect / page reload has happened. This is similar to various other enhancements that we've made (e.g. in the |
@aaemnnosttv For now that's okay, but it still creates an inconsistency in our datastore where it doesn't accurately reflect the current state. So we should for sure have a |
@felixarntz sure, that sounds good to me. In the future, we'll need to add some additional state for modules, or change how we represent the active state to be more flexible than a simple boolean. IB updated 👍 |
IB ✅ |
// Accidentally picked up this ticket thinking it is in the sprint without filtering by current sprint. Oops. Disregard the activity 😮💨 |
QA Update ✅
|
Bug Description
When I click connect service, it always shows the right mode service as connected before redirecting to Google for auth.
Steps to reproduce
Screenshots
Added a video repro, intentionally not showing the Google Auth part:
connected-bug.mp4
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
getModules
when toggling module activationsite-kit-wp/assets/js/googlesitekit/modules/datastore/modules.js
Lines 219 to 222 in 47b723d
TODO
comment to clarify that this should be restored later when Site Kit no longer relies on page reloads between module activation changessite-kit-wp/assets/js/components/settings/SettingsActiveModules.js
Lines 34 to 36 in 47b723d
site-kit-wp/assets/js/components/settings/SettingsInactiveModules.js
Lines 38 to 40 in 47b723d
Test Coverage
QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: