Skip to content
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

[dashboard] increase IDE awareness for onboarding users when starting workspace #9663

Merged
merged 1 commit into from
May 9, 2022

Conversation

mustard-mh
Copy link
Contributor

@mustard-mh mustard-mh commented Apr 29, 2022

Description

🧪 This is a PLG experiment that aims to increase the awareness of IDE/editor variety on Gitpod, for first-time users.

With #9432, we've introduced the IDE/editor selection as one of the very first steps for new users. However, some users start using Gitpod without going through the Dashboard - for example by using the context URL: gitpod.io#REPO-URL

With this PR, we introduce the same modal UI component, but in the "Create Workspace" page (aka landing page when a context URL is used). This is only impacting users who want to start their first workspace, but don't have a preferred IDE/editor.

See GIF below, to preview the new UI

Related Issue(s)

Fixes #9534
Relates to #6707

How to test

Using this preview env: https://hw-9534-onboarding.staging.gitpod-dev.com#<REPO_URL>

Open workspace via URL

  1. [After Reset Account] Default prefix /# will wait until Modal close or choose. After select, will open workspace with choosed IDE.
  2. [After Reset Account] Prefix with special IDE /#referrer will set up user's defaultIde if it's not been set yet. Open with /#referrer is behave like open via JetBrains Gateway UI with choosen IDE.
  3. [After Reset Account] Prefix with special IDE /#referrer but args not correctly fit referrer required will use default ide code to start workspace
  4. After setup defaultIde via prefix workspace starting page, onboarding aware on page /workspaces will not appear.

Test Cases

Every selection from user will change User setting immediately

  1. Choose nothing, refresh page will see modal again
  2. Choose nothing and click continue or X, DB go with code latest:false
  3. Check use latest and click continue or X, DB go with code latest:true
  4. Choose any IDE, DB will change

FYI: Check and reset your ide option

Check: go to preferences page to see current selection IDE

Reset: delete account on settings account page.

OR

# check
SELECT id, name, additionalData->'$.ideSettings' FROM d_b_user WHERE id = '<your_user_id>';

# reset
UPDATE d_b_user SET additionalData='{"emailNotificationSettings":{"allowsChangelogMail":true,"allowsDevXMail":true,"allowsOnboardingMail":true}}' WHERE id = '<your_user_id>';

Release Notes

Prompt onboarding users to choose default IDE during workspace starting

Documentation

Screenshots / GIF

  • /werft without-vm=true

@mustard-mh mustard-mh requested a review from a team April 29, 2022 20:17
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Apr 29, 2022
@akosyakov
Copy link
Member

@mustard-mh I don't understand which problem we are solving here? Could you elaborate in description what this PR does?

@andreafalzetti
Copy link
Contributor

andreafalzetti commented May 4, 2022

/werft run without-vm=true

👍 started the job as gitpod-build-hw-9534-onboarding.13
(with .werft/ from main)

@andreafalzetti
Copy link
Contributor

I am rebasing and fixing merge conflicts

@andreafalzetti
Copy link
Contributor

andreafalzetti commented May 4, 2022

/werft run without-vm=true

👍 started the job as gitpod-build-hw-9534-onboarding.15
(with .werft/ from main)

@andreafalzetti
Copy link
Contributor

andreafalzetti commented May 4, 2022

@mustard-mh I don't understand which problem we are solving here? Could you elaborate in description what this PR does?

@akosyakov I've updated the PR description, in short: it's a follow-up improvement for our experiment around IDE awareness.

Copy link
Contributor

@andreafalzetti andreafalzetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works as advertised: As a first-time user, using a context URL, I am prompted to select my preferred IDE/editore before the workspace starts.

When I initially approached this task before this PR was even created, I tried using the information in context or making an additional call to know if workspaces existed, but I admit that this approach is better because it extends the current architecture.

Perhaps I would rename needOnboardingIde in needUserIdePreference. What do you think, @mustard-mh?

Approved - the rename is not a blocker for me, only a preference and suggestion. I look forward to seeing this in production 🚀

@gtsiolis gtsiolis requested a review from a team May 4, 2022 15:57
Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UX looks flawless! ✨

Thanks, @mustard-mh! 💯

@mustard-mh mustard-mh force-pushed the hw/9534-onboarding branch from 5e66880 to a2011ac Compare May 5, 2022 10:00
@roboquat roboquat added size/S and removed size/M labels May 5, 2022
@mustard-mh mustard-mh force-pushed the hw/9534-onboarding branch from a2011ac to 6caab87 Compare May 5, 2022 10:23
@loujaybee
Copy link
Member

Looks great @mustard-mh and co! I'm currently looking into measurement of the feature. I think there are some improvements that we can make, but I don't think it's necessary to block this from being merged / deployed, we can apply analytics improvements as an addition / follow up change.

@mustard-mh mustard-mh force-pushed the hw/9534-onboarding branch from 58c70e2 to f8a81e1 Compare May 5, 2022 15:31
@mustard-mh
Copy link
Contributor Author

mustard-mh commented May 5, 2022

  1. [After Reset Account] Prefix with special IDE /#referrer but args not correctly fit referrer required will use default ide code to start workspace

Update PR description to add a new test, since our check conditions changed

@mustard-mh mustard-mh force-pushed the hw/9534-onboarding branch from f8a81e1 to 2e186af Compare May 5, 2022 15:53
);
} else {
toRender = <CreateWorkspace contextUrl={hash} />;
}
} else if (isWsStart) {
toRender = <StartWorkspace {...parseProps(hash, window.location.search)} />;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to show Modal while restarting a workspace, because createWorkspace covered most cases

@mustard-mh
Copy link
Contributor Author

mustard-mh commented May 9, 2022

Initially, this PR was created as a quick fix for this bug, as it was simple to modify and would be much sooner than the PR #9663 for review.

In reality, both PRs have been in the review state for a long time.

if #9663 can be merged first, we can close this one.

Reply in wrong place 🙈

@mustard-mh mustard-mh closed this May 9, 2022
@mustard-mh mustard-mh reopened this May 9, 2022
@mustard-mh
Copy link
Contributor Author

mustard-mh commented May 9, 2022

@AlexTugarev Any other input about this PR 🙏?

@AlexTugarev
Copy link
Member

AlexTugarev commented May 9, 2022

/werft run

👍 started the job as gitpod-build-hw-9534-onboarding.21
(with .werft/ from main)

// We don't need to show IDE preference in this case
const shouldUserIdePreferenceShown = User.isOnboardingUser(user) && !hash.startsWith(ContextURL.REFERRER_PREFIX);
if (shouldUserIdePreferenceShown !== showUserIdePreference) {
setShowUserIdePreference(shouldUserIdePreferenceShown);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setting a state here will result in an additional render cycle, AFAIC.

you can simplify with a const here:

const showUserIdePreference = shouldUserIdePreferenceShown !== showUserIdePreference;

Copy link
Contributor Author

@mustard-mh mustard-mh May 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexTugarev Go with const 👍 and removed state.

Update: ‼️ Sorry for not being more cautious. We need state to re-render page, otherwise it'll cause some bugs like this one #9979

Copy link
Contributor Author

@mustard-mh mustard-mh May 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlexTugarev Prev solution is because we have this one in App.tsx, maybe need to change it later? No, we need state to re-render page

const shouldWhatsNewShown = shouldSeeWhatsNew(user);
if (shouldWhatsNewShown !== isWhatsNewShown) {
setWhatsNewShown(shouldWhatsNewShown);
}

Copy link
Member

@AlexTugarev AlexTugarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works nicely!

Left a comment.

/hold
if you want to address anything else.

@mustard-mh mustard-mh force-pushed the hw/9534-onboarding branch from 2e186af to 8857762 Compare May 9, 2022 12:53
@mustard-mh
Copy link
Contributor Author

/hold

Wait for my final test after built

@mustard-mh
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit 037a480 into main May 9, 2022
@roboquat roboquat deleted the hw/9534-onboarding branch May 9, 2022 13:19
@mustard-mh
Copy link
Contributor Author

mustard-mh commented May 9, 2022

It's dangerous that after new commit pushed, review won't dismiss. It means I can rm -rf or change some small things() 🙈

@loujaybee
Copy link
Member

loujaybee commented May 9, 2022

@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/S team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow user to configure IDE configurations when onboarding start workspace
7 participants