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

Enable Account without Organization #836

Merged
merged 16 commits into from
Nov 22, 2024
Merged

Conversation

selankon
Copy link
Contributor

@selankon selankon commented Nov 14, 2024

Fixes #844

This PR enables the possibility to have an account without organization and navigate through Dashboard. To do this it refactor protected routes into two different protected routes:

  • AccountProtectedRoute: which check if you are logged in
  • OrganizationProtectedRoute: Checks that an organization is already created

It also refactors a bit the LayoutAuth to be reused for the CreateOrganization form. It implements some Outlet context setters.

Either, changes a bit the UX flux:

  • It permits to skip organization creation just after email verification
  • If you access to organization creation form from the Dashboard, the layout used is Dashboard

Other relevant changes

  • Improves verify component: moved Verify page to elements and use better name to verification pending form

Copy link
Contributor Author

@selankon selankon left a comment

Choose a reason for hiding this comment

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

Review done with @elboletaire. Check all layout elements are not LazyLoaded

src/components/Organization/Dashboard/NoOrganizations.tsx Outdated Show resolved Hide resolved
src/router/ProtectedRoutes.tsx Outdated Show resolved Hide resolved
src/router/routes/dashboard.tsx Show resolved Hide resolved
@selankon
Copy link
Contributor Author

selankon commented Nov 16, 2024

Now the question here is how the "create organization" form should this be displayed.

Should be open inside the dashboard layout? Or should be a single page with its own layout? Also the NoOrganizationPage will need a dessign

Copy link

github-actions bot commented Nov 19, 2024

@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 11:49 Inactive
Copy link

github-actions bot commented Nov 19, 2024

@github-actions github-actions bot temporarily deployed to pull request November 19, 2024 11:49 Inactive
@selankon selankon marked this pull request as ready for review November 19, 2024 11:49
Copy link
Member

@elboletaire elboletaire left a comment

Choose a reason for hiding this comment

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

Other than the minor code changes, there are some issues with the flow right now:

  • After creating an organization using an account which didn't have one related via the dashboard, the app stayed in the "create organization" form, rather than redirecting to the dashboard
  • I've then (manually) accessed the dashboard, and from then trying to go to my created organization crashes imatge
  • We have to review the current signup flow to show the create organization form but allow users to skip it.
  • Assess using a different layout when accessing via the dashboard than from the signup process

src/elements/account/createOrganization.tsx Outdated Show resolved Hide resolved
src/elements/LayoutAuth.tsx Outdated Show resolved Hide resolved
src/router/ProtectedRoutes.tsx Outdated Show resolved Hide resolved
src/elements/account/createOrganization.tsx Show resolved Hide resolved
src/elements/account/createOrganization.tsx Outdated Show resolved Hide resolved
src/router/routes/process-create.tsx Outdated Show resolved Hide resolved
src/router/routes/root.tsx Outdated Show resolved Hide resolved
@selankon selankon marked this pull request as draft November 20, 2024 10:41
@github-actions github-actions bot temporarily deployed to pull request November 21, 2024 14:51 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 21, 2024 14:51 Inactive
@selankon selankon marked this pull request as ready for review November 21, 2024 14:52
@github-actions github-actions bot temporarily deployed to pull request November 21, 2024 15:25 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 21, 2024 15:25 Inactive
@elboletaire elboletaire merged commit c252b71 into develop Nov 22, 2024
3 checks passed
@elboletaire elboletaire deleted the f/refactor-org-not-needed branch November 22, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change create organization flux
2 participants