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

spike/project details #27

Merged
merged 28 commits into from
Nov 8, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
75106f2
first draft project viewer with context provider, no styles or conten…
prtcl Nov 5, 2024
b4997c0
Merge branch 'main' into spike/project-details
prtcl Nov 5, 2024
138781d
tweak layout to allow for body scrolling
prtcl Nov 6, 2024
b6ab442
add debounce to resize
prtcl Nov 6, 2024
22f7286
polish up project viewer panel styles
prtcl Nov 6, 2024
ea6dd5d
add panel footer and cute project url with truncation
prtcl Nov 6, 2024
feb8a83
add placeholder icon buttons for project viewer close and nav
prtcl Nov 7, 2024
7aa0e02
add prev next to project viewer with lightweight query
prtcl Nov 7, 2024
1007083
panel animations for project viewer, link and panel refactoring
prtcl Nov 7, 2024
2653f3a
add error boundary to handle convex throws
prtcl Nov 7, 2024
16f64f5
project details and embed schema with internal mutation for populating
prtcl Nov 7, 2024
79c7c7a
errors are any, man
prtcl Nov 7, 2024
547ac4d
first draft media embeds in project viewer panels
prtcl Nov 7, 2024
d77b855
internal mutation for attaching cover images
prtcl Nov 7, 2024
1e06460
add soundcloud to media embed
prtcl Nov 7, 2024
cecddce
set up inner content scrolling for media embeds
prtcl Nov 7, 2024
180e88c
tweak cover image and embed styles, add background colors and shadows
prtcl Nov 8, 2024
7116836
add markdown content to project details
prtcl Nov 8, 2024
59d014c
switch to named exports for everything
prtcl Nov 8, 2024
a028e96
feature flag for project viewer
prtcl Nov 8, 2024
e502402
add feature override and some utility types
prtcl Nov 8, 2024
8617952
extract project item into project feat, rename and reorg a bit
prtcl Nov 8, 2024
144a7d4
consolidate project types and remaining components
prtcl Nov 8, 2024
08ff61c
move media embed to UI dir
prtcl Nov 8, 2024
4e1f80e
small formatting tweaks
prtcl Nov 8, 2024
f48a97a
fix panel footer for firefox
prtcl Nov 8, 2024
dc6f7c7
adjust hovercard zindex
prtcl Nov 8, 2024
8d5b1db
add top level error boundary
prtcl Nov 8, 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
Prev Previous commit
add top level error boundary
prtcl committed Nov 8, 2024
commit 8d5b1dbd6688a0b221dcffaf2b69e62576f1c469
2 changes: 1 addition & 1 deletion src/lib/errors/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ export type ErrorState = {
};

export type ErrorBoundaryProps = PropsWithChildren<{
fallback?: (state: ErrorState) => ReactNode;
fallback: (state: ErrorState) => ReactNode;
}>;

export class ErrorBoundary extends PureComponent<
12 changes: 12 additions & 0 deletions src/lib/errors/Fallback.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Flex } from 'styled-system/jsx';
import { Text } from '~/ui/Text';

export const Fallback = (props: { title: string }) => {
const { title } = props;

return (
<Flex alignItems="center" justifyContent="center" flex={1} width="100%">
<Text>{title}</Text>
</Flex>
);
};
1 change: 1 addition & 0 deletions src/lib/errors/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './ErrorBoundary';
export * from './Fallback';
export * from './helpers';
13 changes: 8 additions & 5 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import { ConvexReactClient, ConvexProvider } from 'convex/react';
import { createRoot } from 'react-dom/client';
import { ProjectProvider } from '~/feat/Projects';
import { ErrorBoundary, Fallback } from '~/lib/errors';
import App from './App';
import './main.css';

const convex = new ConvexReactClient(import.meta.env.VITE_CONVEX_URL);
const root = createRoot(document.getElementById('root'));

root.render(
<ConvexProvider client={convex}>
<ProjectProvider>
<App />
</ProjectProvider>
</ConvexProvider>,
<ErrorBoundary fallback={() => <Fallback title="Error" />}>
<ConvexProvider client={convex}>
<ProjectProvider>
<App />
</ProjectProvider>
</ConvexProvider>
</ErrorBoundary>,
);