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

feat(slice-machine-ui): Git integration demo #1274

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
50bba84
feat(manager): add `GitManager`
angeloashmore Jan 17, 2024
7904dd3
test: add initial tests
angeloashmore Jan 18, 2024
71823f4
Merge branch 'main' into aa/dt-1891
angeloashmore Jan 18, 2024
c151915
test: fix broken tests
angeloashmore Jan 18, 2024
675596b
chore: revert `express` version change (no idea how that happened)
angeloashmore Jan 18, 2024
20f115d
chore: fix `express` version
angeloashmore Jan 18, 2024
b07b584
refactor: remove unnecessary edits
angeloashmore Jan 18, 2024
7bd8886
test: remove unnecessary code
angeloashmore Jan 18, 2024
1dbaa48
test: remove unnecessary `logout`
angeloashmore Jan 18, 2024
532cf07
feat: add placeholder settings page
angeloashmore Jan 19, 2024
727e4b5
Merge branch 'main' into aa/dt-1891-demo
angeloashmore Jan 19, 2024
1959c66
feat: add Settings page with Git demo
angeloashmore Jan 22, 2024
dd74d5b
feat: add Write API token methods
angeloashmore Jan 23, 2024
4594a9b
Merge branch 'aa/dt-1891' into aa/dt-1891-demo
angeloashmore Jan 23, 2024
1424963
feat: add Write API token management
angeloashmore Jan 23, 2024
8f8bdc4
fix: update write api token flow
angeloashmore Jan 24, 2024
b45536c
Merge branch 'main' into aa/dt-1891
angeloashmore Jan 24, 2024
6a8dcee
Merge branch 'aa/dt-1891' into aa/dt-1891-demo
angeloashmore Jan 24, 2024
703f2f6
fix: use positional arguments for suspense fetcher arguments
angeloashmore Jan 24, 2024
e8ce657
fix: use correct HTTP method for `manager.git.createGitHubAuthState()`
angeloashmore Jan 24, 2024
214bc85
Merge branch 'aa/dt-1891' into aa/dt-1891-demo
angeloashmore Jan 24, 2024
380a5e8
fix: use internal SM API URL
angeloashmore Jan 24, 2024
131d433
fix: per Baptiste's review
angeloashmore Jan 25, 2024
c0929c4
Merge branch 'main' into aa/dt-1891
bapmrl Jan 25, 2024
127b6e4
Merge branch 'aa/dt-1891' into aa/dt-1891-demo
bapmrl Jan 25, 2024
aef2769
Merge branch 'main' into aa/dt-1891
bapmrl Jan 29, 2024
c4705c8
Merge branch 'aa/dt-1891' into aa/dt-1891-demo
bapmrl Jan 29, 2024
febe281
Merge branch 'main' into aa/dt-1891-demo
angeloashmore Feb 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/manager/src/constants/API_ENDPOINTS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const API_ENDPOINTS: APIEndpoints = (() => {
PrismicOembed: "https://oembed.prismic.io",
PrismicUnsplash: "https://unsplash.prismic.io",
SliceMachineV1:
"https://21vvgrh0s6.execute-api.us-east-1.amazonaws.com/v1/",
"https://rrvzk2wqlh.execute-api.us-east-1.amazonaws.com/v1/",
};
}
}
Expand Down
34 changes: 23 additions & 11 deletions packages/slice-machine/components/Navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,29 @@ const Navigation: FC = () => {
)}

<SideNavList position="bottom">
<SideNavLink
title="Invite team"
href={`${repositoryUrl}/settings/users`}
Icon={(props) => <MathPlusIcon {...props} />}
onClick={() => {
void telemetry.track({
event: "users-invite-button-clicked",
});
}}
target="_blank"
/>
<SideNavListItem>
<SideNavLink
title="Settings"
href="/settings"
Icon={(props) => <MathPlusIcon {...props} />}
active={router.asPath.startsWith("/settings")}
component={Link}
/>
</SideNavListItem>

<SideNavListItem>
<SideNavLink
title="Invite team"
href={`${repositoryUrl}/settings/users`}
Icon={(props) => <MathPlusIcon {...props} />}
onClick={() => {
void telemetry.track({
event: "users-invite-button-clicked",
});
}}
target="_blank"
/>
</SideNavListItem>

<ErrorBoundary>
<Suspense>
Expand Down
32 changes: 32 additions & 0 deletions packages/slice-machine/pages/settings.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from "react";
import Head from "next/head";
import { BaseStyles } from "theme-ui";
import {
AppLayout,
AppLayoutBreadcrumb,
AppLayoutContent,
AppLayoutHeader,
} from "@components/AppLayout";
import { ConnectGitRepository } from "@src/features/git/ConnectGitRepository/ConnectGitRepository";

const Settings: React.FC = () => {
return (
<>
<Head>
<title>Settings - Slice Machine</title>
</Head>
<AppLayout>
<AppLayoutHeader>
<AppLayoutBreadcrumb folder="Settings" />
</AppLayoutHeader>
<AppLayoutContent>
<BaseStyles sx={{ display: "flex", flexDirection: "column" }}>
<ConnectGitRepository />
</BaseStyles>
</AppLayoutContent>
</AppLayout>
</>
);
};

export default Settings;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.root {
max-width: 600px;
}

.buttons {
display: grid;
grid-auto-columns: 1fr;
grid-auto-flow: column;
gap: 8px;
}

.owners {
display: grid;
gap: 8px;
}
Loading
Loading