Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: clean workspaces code#3241

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dbm03 merged 22 commits intomainfromchore/clean-workspaces-code
Mar 27, 2025
Merged

chore: clean workspaces code#3241

dbm03 merged 22 commits intomainfromchore/clean-workspaces-code
Mar 27, 2025

Conversation

dbm03
Copy link
Member

@dbm03dbm03 commentedMar 17, 2025
edited by github-actionsbot
Loading

PR Type

Enhancement


Description

  • Migrate from workspaces to organizations

  • Update GraphQL queries and mutations

  • Refactor components for organization structure

  • Adjust routing and navigation for orgs


Changes walkthrough 📝

Relevant files
Enhancement
16 files
graphql.ts
Update GraphQL types and queries for organization structure
+84/-1054
MobileNav.tsx
Simplify MobileNav component and update navigation             
+11/-126
ticket.tsx
Update support ticket form for organization structure       
+28/-84 
ApplicationUnknown.tsx
Refactor ApplicationUnknown component for new structure   
+17/-21 
DeleteAccount.tsx
Update imports and remove workspace references                     
+2/-26   
run-one-click-install.tsx
Refactor one-click install for organization structure       
+5/-9     
RemoveApplicationModal.tsx
Update mutation refetch query for organization structure 
+7/-2     
ApplicationInfo.tsx
Update mutation refetch query in ApplicationInfo                 
+8/-3     
useProjectRedirectWhenReady.ts
Update refetch query for organization structure                   
+2/-6     
DatabaseMigrateVersionConfirmationDialog.tsx
Remove workspace refetch query in migration dialog             
+1/-5     
new.tsx
Update new project page for organization structure             
+3/-3     
BreadcrumbNav.tsx
Remove workspace references from BreadcrumbNav                     
+3/-4     
BaseDirectorySettings.tsx
Update refetch query for organization structure                   
+4/-4     
DeploymentBranchSettings.tsx
Update refetch query for organization structure                   
+4/-4     
DeploymentListItem.tsx
Update refetch query for organization structure                   
+2/-2     
index.tsx
Update mutations to refetch organization data                       
+4/-3     
Tests
2 files
mocks.ts
Update mock data for organization structure                           
+10/-27 
testUtils.tsx
Add new test utilities for GraphQL mocking                             
+50/-0   
Documentation
1 files
useNotFoundRedirect.ts
Update comment to reflect organization structure                 
+1/-3     
Additional files
77 files
env.ts+1/-1     
ContactUs.tsx+0/-102 
index.ts+0/-2     
InviteNotification.tsx+0/-200 
index.ts+0/-1     
TimePicker.test.tsx+1/-1     
AuthenticatedLayout.tsx+0/-3     
OrgsComboBox.tsx+2/-9     
PinnedMainNav.tsx+2/-2     
DisplayNameSetting.tsx+1/-1     
EmailSetting.tsx+1/-1     
PATSettings.tsx+1/-1     
PasswordSettings.tsx+1/-1     
CreateOrgFormDialog.tsx+1/-1     
TransferProjectDialog.test.tsx+1/-1     
NotificationsTray.test.tsx+2/-4     
ErrorToast.test.tsx+0/-85   
ErrorToast.tsx+0/-170 
index.ts+0/-1     
useFinishOrgCreation.ts+1/-1     
useRestoreApplicationDatabasePiTR.ts+1/-1     
DeleteAssistantModal.tsx+1/-1     
DisableAIServiceConfirmationDialog.tsx+1/-1     
CreateUserForm.tsx+1/-1     
PointInTimeBackupInfo.test.tsx+1/-1     
AppLoader.tsx+10/-20 
ApplicationErrored.tsx+0/-272 
index.ts+0/-1     
ApplicationPaused.tsx+2/-2     
DeleteServiceModal.tsx+1/-1     
useCheckProvisioning.ts+2/-2     
useIsCurrentUserOwner.ts+2/-2     
index.ts+0/-1     
useNavigationVisible.ts+0/-63   
index.ts+0/-2     
useProjectRoutes.tsx+0/-160 
RolePermissionEditorForm.tsx+1/-1     
DatabasePiTRSettings.test.tsx+1/-1     
DatabaseServiceVersionSettings.tsx+1/-5     
OverviewDeployments.test.tsx+2/-2     
ResourcesForm.test.tsx+1/-5     
ServiceForm.tsx+1/-1     
execPromiseWithErrorToast.tsx+1/-1     
getAllWorkspacesAndProjects.gql+0/-5     
getAppPlansAndGlobalPlans.graphql+0/-39   
getApplicationPlan.graphql+0/-14   
getWorkspaceAndProject.graphql+0/-5     
getWorkspacesAppPlansAndGlobalPlans.graphql+0/-39   
insertApp.graphql+0/-12   
prefetchNewApp.graphql+0/-12   
organization.gql+27/-0   
workspace.gql+0/-18   
getAllOrganizationsAndProjects.gql+5/-0     
deletePaymentMethod.graphql+0/-5     
getPaymentMethods.graphql+0/-27   
insertPaymentMethod.graphql+0/-16   
setNewDefaultPaymentMethod.graphql+0/-17   
deleteWorkspaceMemberInvite.graphql+0/-5     
getWorkspaceMemberInvitesToManage.graphql+0/-14   
insertWorkspaceMemberInvite.graphql+0/-7     
updateWorkspaceMemberInvite.graphql+0/-11   
deleteWorkspaceMember.graphql+0/-5     
getWorkspaceMembers.graphql+0/-31   
updateWorkspaceMember.graphql+0/-8     
deleteWorkspace.gql+0/-5     
insertWorkspace.gql+0/-6     
updateWorkspace.gql+0/-16   
[...slug].tsx+0/-158 
plansQuery.ts+0/-16   
prefetchNewAppQuery.ts+0/-1     
mocks.ts+0/-124 
testUtils.tsx+0/-164 
application.ts+0/-2     
graphite.graphql.ts+5769/-25931
execPromiseWithErrorToast.tsx+0/-62   
index.ts+0/-1     
tailwind.config.js+8/-9     

Need help?
  • Type/help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out thedocumentation for more information.
  • @dbm03dbm03 self-assigned thisMar 17, 2025
    @vercelVercel
    Copy link

    vercelbot commentedMar 17, 2025
    edited
    Loading

    The latest updates on your projects. Learn more aboutVercel for Git ↗︎

    NameStatusPreviewUpdated (UTC)
    dashboard-staging✅ Ready (Inspect)Visit PreviewMar 27, 2025 2:21pm
    example-nextjs-server-components✅ Ready (Inspect)Visit PreviewMar 27, 2025 2:21pm
    example-react-apollo✅ Ready (Inspect)Visit PreviewMar 27, 2025 2:21pm
    example-sveltekit✅ Ready (Inspect)Visit PreviewMar 27, 2025 2:21pm
    example-vue-apollo✅ Ready (Inspect)Visit PreviewMar 27, 2025 2:21pm
    1 Skipped Deployment
    NameStatusPreviewUpdated (UTC)
    dashboard⬜️ Ignored (Inspect)Visit PreviewMar 27, 2025 2:21pm

    @changeset-botchangeset-bot
    Copy link

    changeset-botbot commentedMar 17, 2025
    edited
    Loading

    ⚠️ No Changeset found

    Latest commit:b3f059f

    Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go.If these changes should result in a version bump, you need to add a changeset.

    This PR includes no changesets

    When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

    Click here to learn what changesets are, and how to add one.

    Click here if you're a maintainer who wants to add a changeset to this PR

    @github-actionsGitHub Actions
    Copy link
    Contributor

    github-actionsbot commentedMar 17, 2025
    edited
    Loading

    PR Reviewer Guide 🔍

    (Review updated until commit9422f41)

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Error Handling

    The component now renders a LoadingScreen if project or loading is true, which could hide errors. Consider adding error handling to display meaningful messages to users if loading fails.

    if(!project||loading){return<LoadingScreen/>;}
    Incomplete Logic

    The hook now only checks for orgSlug, potentially missing cases where a project is not found. Consider adding additional checks to ensure all necessary data is present before allowing navigation.

    *Redirectsto404pageifcurrentProjectresolvestoundefined*orifthecurrentpathnameisnotavalidorganization/project.*NotapplicableifrunningdashboardwithlocalNhostbackend.*/
    Data Validation

    The component assumes currentOrg or the first org in the list is valid. Consider adding validation to ensure a valid organization is selected before proceeding with project creation.

    // get pre-selected organization// use query param to get organization or just pick first organizationconstpreSelectedOrg=currentOrg||orgs[0];constpreSelectedRegion=regions.find((region)=>region.active);

    @github-actionsGitHub Actions
    Copy link
    Contributor

    PR Code Suggestions ✨

    @dbm03
    Copy link
    MemberAuthor

    What should we do with theContactUs component that appears when clicking Contact Us inside Mobile Nav?

    https://github.com/nhost/nhost/blob/main/dashboard/src/components/common/ContactUs/ContactUs.tsx

    @dbm03dbm03force-pushed thechore/clean-workspaces-code branch from797f0fe toec10fbdCompareMarch 21, 2025 00:14
    @dbm03dbm03force-pushed thechore/remove-unused-legacy-workspaces branch from4d46855 to4d84ad5CompareMarch 21, 2025 00:16
    @dbm03dbm03force-pushed thechore/clean-workspaces-code branch fromec10fbd to00a8af1CompareMarch 21, 2025 00:17
    @dbm03dbm03force-pushed thechore/clean-workspaces-code branch from4f80e56 tob3f059fCompareMarch 27, 2025 14:16
    @dbm03dbm03 merged commit8ea263e intomainMar 27, 2025
    15 checks passed
    @dbm03dbm03 deleted the chore/clean-workspaces-code branchMarch 27, 2025 15:25
    Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
    Reviewers

    @robertkaszarobertkaszarobertkasza approved these changes

    @nunopatonunopatoAwaiting requested review from nunopatonunopato is a code owner

    Assignees

    @dbm03dbm03

    Labels
    Projects
    None yet
    Milestone
    No milestone
    Development

    Successfully merging this pull request may close these issues.

    3 participants
    @dbm03@robertkasza@nhost-build

    [8]ページ先頭

    ©2009-2025 Movatter.jp