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

fix(dashboard): Opt-in new orgs created from org switcher in v2 #7277

Open
wants to merge 3 commits into
base: next
Choose a base branch
from

Conversation

scopsy
Copy link
Contributor

@scopsy scopsy commented Dec 11, 2024

What changed? Why was the change needed?

  • Fixes the redirect to old dashboard when new org created from v2

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

netlify bot commented Dec 11, 2024

Deploy Preview for dashboard-v2-novu-staging ready!

Name Link
🔨 Latest commit 04e335a
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/675a89a43bc1460008b883f5
😎 Deploy Preview https://deploy-preview-7277.dashboard-v2.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 11, 2024

Deploy Preview for dev-web-novu ready!

Name Link
🔨 Latest commit 04e335a
🔍 Latest deploy log https://app.netlify.com/sites/dev-web-novu/deploys/675a89a4f2cb6600081d353c
😎 Deploy Preview https://deploy-preview-7277.dashboard.novu-staging.co
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Comment on lines +15 to +26
organizationSwitcherPopoverInvitationActionsBox: 'p-0 pr-2',
organizationSwitcherInvitationAcceptButton: '!text-[10px] !min-w-[90px] !w-[90px] px-0',
organizationPreviewMainIdentifier: 'text-foreground-950 text-base',
organizationPreviewAvatarContainer: 'size-6 rounded-full',
organizationPreviewAvatarBox: 'rounded-full size-6',
organizationPreview: 'py-1.5 px-4 gap-2',
organizationSwitcherPopoverActionButton: 'py-1.5 px-4 -ml-1.5 text-sm gap-0',
organizationPreview: 'py-1.5 px-2 gap-2',
organizationSwitcherPopoverActionButton: 'py-1 px-2 -ml-1.5 text-sm gap-0',
organizationSwitcherPopoverCard: 'w-64',
organizationSwitcherPreviewButton: 'p-0 [&>svg]:mr-2 !border-0',
organizationPreviewSecondaryIdentifier: 'hidden',
organizationSwitcherPopoverActions:
'py-2 [&_.cl-organizationPreviewMainIdentifier]:text-sm [&>div:nth-child(2)]:!border-0',
'py-0.5 [&_.cl-organizationPreviewMainIdentifier]:text-sm [&>div:nth-child(2)]:!border-0',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Something was cmpletly off when a new invitation is available to a user to join an org. Fixed the excess paddings

<ClerkOrganizationSwitcher
hidePersonal
skipInvitationScreen
afterCreateOrganizationUrl={ROUTES.USECASE_SELECT + '?v2_opt_in=true'}
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 want to redirect the user and skip the questionnaire straight to the usecase select page

Comment on lines +14 to +18
if (hasV2OptIn) {
(async () => {
await optIn();
})();
} else {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Allowing to force opt in if a query param was passed to the url

@scopsy scopsy changed the title fix(dashboard): clerk selector for new orgs created fix(dashboard): Opt-in new orgs created from org switcher in v2 Dec 11, 2024
@scopsy scopsy requested review from LetItRock and ChmaraX December 11, 2024 16:14
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