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

Organization onboarding welcome message #20577

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft

Conversation

filiptronicek
Copy link
Member

@filiptronicek filiptronicek commented Feb 4, 2025

Description

Adds a customizable welcome message for organization newjoiners.

image

Related Issue(s)

Fixes CLC-1065

How to test

  1. Sign up for https://ft-org-welcome-msg.preview.gitpod-dev.com/workspaces
  2. Observe the org welcome message appear
  3. Try signing out and in again, you should not see the message appear again

Documentation

TBD

/hold

Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
…essage fields

This change modifies the organization onboarding settings to make welcome message fields optional, including:
- Making message, featured member ID, and avatar URL optional
- Removing the footer field
- Adding validation to prevent enabling an empty welcome message

Tool: gitpod/catfood.gitpod.cloud
This commit introduces several improvements to the welcome message feature:
- Split welcome message components into separate files for better organization
- Replace @uiw/react-md-editor with react-markdown
- Update TypeScript to version 5.7.3
- Modify organization member listing to exclude deleted and admin users
- Add OrganizationJoinModal for new user onboarding flow
- Simplify welcome message preview and editor components

Tool: gitpod/catfood.gitpod.cloud
window.opener.postMessage(message + "&newUser=" + newUser, `https://${window.location.hostname}`);

if (newUser === "true") {
localStorage.setItem("newUserOnboardingPending", newUser);
Copy link
Member Author

Choose a reason for hiding this comment

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

we use this localStorage item as a token, which the workspace list redeems in exchange for a modal with the organization join message.

This commit addresses two minor issues:
- Add error handling for localStorage in complete-auth page
- Remove redundant CSS classes for Markdown preview and use Markdown component props instead

Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
- Extract UpdateTeamSettingsOptions type for consistent error handling
- Move gitpodWelcomeSubheading to WelcomeMessageConfigurationField
- Add error state and handling in WelcomeMessageEditor
- Refactor update methods to support optional error throwing

Tool: gitpod/catfood.gitpod.cloud
Unfortunately, this entails having a duplicate `OnboardingSettings` message specified in the proto definition

Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
@@ -151,6 +169,23 @@ message TimeoutSettings {
}

message UpdateOrganizationSettingsRequest {
message OnboardingSettings {
Copy link
Member Author

Choose a reason for hiding this comment

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

unfortunately, I had to make a request / response split for the types here, so there's duplication.

This is because of the following fields:

  • featured_member_resolved_avatar_url is only available in responses
  • update_recommended_repositories is only available in requests

Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
Tool: gitpod/catfood.gitpod.cloud
… add iam session unit test assertions

- Refactor import types to use the updated OrganizationSettings_OnboardingSettings_WelcomeMessage
- Adjust type references in OrgMemberAvatarInput, WelcomeMessageConfigurationField, and WelcomeMessageEditor
- Add newUser flag checks in IAM session app spec
- Remove unused import in organization service

Tool: gitpod/catfood.gitpod.cloud
@filiptronicek filiptronicek self-assigned this Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants