- Notifications
You must be signed in to change notification settings - Fork1.1k
chore: update workspaces top bar to display org name#14596
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
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
17 commits Select commitHold shift + click to select a range
f90f088 chore: move schedule controls to the right side of the screen
Parkreiner4956ebb chore: add org display to workspace topbar
Parkreiner43ce786 fix: force organizations to be readonly array
Parkreiner6570b51 Merge branch 'main' into mes/filter-work-1
Parkreinerb2512a7 fix update type mismatch for organizations again
Parkreiner6829017 fix: update quota querying logic to use new endpoint
Parkreinerdcfb84f fix: add logic for handling long workspace or org names
Parkreiner836a2d4 chore: add links for workspaces by org
Parkreiner6696c0a chore: expand tooltip styling for org
Parkreinerde554d6 chore: expand tooltip styling for owner
Parkreiner3b410f7 refactor: split off breadcrumbs for readability
Parkreinerc8f9226 fix: display correct template version name in dropdown
Parkreiner36eba47 fix: update overflow styling for breadcrumb segments
Parkreiner5e0689d fix: favor org display name
Parkreiner7c1e859 fix: centralize org display name logic
Parkreiner17a9e8c Merge branch 'main' into mes/filter-work-1
Parkreiner775486f fix: ensure that mock query cache key and component key are properly …
ParkreinerFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
4 changes: 3 additions & 1 deletionsite/src/api/api.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletionssite/src/api/queries/workspaceQuota.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionsite/src/modules/dashboard/DashboardProvider.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletionssite/src/pages/ManagementSettingsPage/GroupsPage/GroupsPage.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletionssite/src/pages/ManagementSettingsPage/ManagementSettingsLayout.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletionssite/src/pages/ManagementSettingsPage/OrganizationProvisionersPage.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletionssite/src/pages/ManagementSettingsPage/OrganizationSettingsPage.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletionssite/src/pages/TemplatePage/TemplateRedirectController.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletionssite/src/pages/WorkspacePage/WorkspaceNotifications/WorkspaceNotifications.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
11 changes: 7 additions & 4 deletionssite/src/pages/WorkspacePage/WorkspaceScheduleControls.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
37 changes: 32 additions & 5 deletionssite/src/pages/WorkspacePage/WorkspaceTopbar.stories.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| import type { Meta, StoryObj } from "@storybook/react"; | ||
| import { expect, screen, userEvent, waitFor, within } from "@storybook/test"; | ||
| import { getWorkspaceQuotaQueryKey } from "api/queries/workspaceQuota"; | ||
| import type { Workspace, WorkspaceQuota } from "api/typesGenerated"; | ||
| import { addHours, addMinutes } from "date-fns"; | ||
| import { | ||
| MockOrganization, | ||
| MockTemplate, | ||
| MockTemplateVersion, | ||
| MockUser, | ||
| @@ -11,9 +13,12 @@ import { | ||
| import { withDashboardProvider } from "testHelpers/storybook"; | ||
| import { WorkspaceTopbar } from "./WorkspaceTopbar"; | ||
| // We want a workspace without a deadline to not pollute the screenshot. Also | ||
| // want to make sure that the workspace is synced to our other mock values | ||
| const baseWorkspace: Workspace = { | ||
| ...MockWorkspace, | ||
| organization_name: MockOrganization.name, | ||
| organization_id: MockOrganization.id, | ||
| latest_build: { | ||
| ...MockWorkspace.latest_build, | ||
| deadline: undefined, | ||
| @@ -262,15 +267,37 @@ export const WithFarAwayDeadlineRequiredByTemplate: Story = { | ||
| }, | ||
| }; | ||
| export constWithQuotaNoOrgs: Story = { | ||
| parameters: { | ||
| showOrganizations: false, | ||
| queries: [ | ||
| { | ||
| key: getWorkspaceQuotaQueryKey( | ||
jaaydenh marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| MockOrganization.name, | ||
| MockUser.username, | ||
| ), | ||
| data: { | ||
| credits_consumed: 2, | ||
| budget: 40, | ||
| } satisfies WorkspaceQuota, | ||
| }, | ||
| ], | ||
| }, | ||
| }; | ||
| export const WithQuotaWithOrgs: Story = { | ||
| parameters: { | ||
| showOrganizations: true, | ||
| queries: [ | ||
| { | ||
| key: getWorkspaceQuotaQueryKey( | ||
| MockOrganization.name, | ||
| MockUser.username, | ||
| ), | ||
| data: { | ||
| credits_consumed: 2, | ||
| budget: 40, | ||
| } satisfies WorkspaceQuota, | ||
| }, | ||
| ], | ||
| }, | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.