-
Notifications
You must be signed in to change notification settings - Fork 19
[Experimental] Live AsciiDoc editor #96
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
Draft
benjaminleonard
wants to merge
37
commits into
main
Choose a base branch
from
live-asciidoc-notes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
2910331
Rough? Gross? Cool?
benjaminleonard eecdbe0
Pre-demo commit
benjaminleonard 7288132
Merge branch 'tome' into live-asciidoc-notes
benjaminleonard 8fd2114
Switch to monaco
benjaminleonard cea30e3
Continued cleanup
benjaminleonard 5e49280
Tweaks
benjaminleonard bf47ae8
Update API to use env vars and general type fixes
benjaminleonard f8e52a3
More type fixes
benjaminleonard f895851
Licenses
benjaminleonard d7788ee
Ignore notes subfolder
benjaminleonard 2a4357e
Test user for preview
benjaminleonard b5f63d3
Missed an auth check
benjaminleonard a1585d2
Merge branch 'main' into live-asciidoc-notes
benjaminleonard 0826a92
Updates
benjaminleonard 6fedc26
Merge branch 'main' into live-asciidoc-notes
benjaminleonard c4c2791
Update app/routes/notes._index.tsx
benjaminleonard 724ba5a
Lint
benjaminleonard a899da0
Try `noExternal` code mirror basic setup
benjaminleonard 6942ac8
Add `@uiw/codemirror-themes` to `noExternal`
benjaminleonard adca510
API within Remix instead
benjaminleonard 4994518
Switch to liveblocks
benjaminleonard 541d86b
Remove unused deps
benjaminleonard 01a9b70
Auth tweak
benjaminleonard 4d7f5d6
Last updated / tweaks / use storage / live title update
benjaminleonard 2d0071d
Move server stuff into `notes.server`
benjaminleonard 81ff67f
Tweak errors and URL
benjaminleonard c667f14
Title input improvements
benjaminleonard 5dcc881
Merge branch 'main' into live-asciidoc-notes
benjaminleonard 7c00686
Licenses
benjaminleonard 585956b
`allowImportingTsExtensions`
benjaminleonard ccb061f
Use react query for sidebar
benjaminleonard 9837b90
Readd lodash types
benjaminleonard 1be5a8a
Remove upload artifact
benjaminleonard f185d3c
Rough migration to tiptap instead of codemirror
benjaminleonard 6c190d8
Update package-lock.json
benjaminleonard c03ef2d
Add window mode (add focus)
benjaminleonard bf18572
Upgrade DS
benjaminleonard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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 |
|---|---|---|
|
|
@@ -17,3 +17,5 @@ test-results/ | |
| .DS_Store | ||
|
|
||
| /app/components/icons | ||
|
|
||
| .npmrc | ||
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
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 |
|---|---|---|
|
|
@@ -22,4 +22,4 @@ export const opts: Options = { | |
| listing: Listing, | ||
| }, | ||
| customDocument: CustomDocument, | ||
| } | ||
| } | ||
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
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
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 |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /* | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
| * | ||
| * Copyright Oxide Computer Company | ||
| */ | ||
| import { Error12Icon, PrevArrow12Icon } from '@oxide/design-system/icons/react' | ||
| import { Link } from '@remix-run/react' | ||
| import type { ReactNode } from 'react' | ||
|
|
||
| const GradientBackground = () => ( | ||
| <div | ||
| // negative z-index avoids covering MSW warning banner | ||
| className="fixed bottom-0 left-0 right-0 top-0 -z-10" | ||
| style={{ | ||
| background: | ||
| 'radial-gradient(200% 100% at 50% 100%, var(--surface-default) 0%, #161B1D 100%)', | ||
| }} | ||
| /> | ||
| ) | ||
|
|
||
| type Props = { children: ReactNode; backLink?: string } | ||
|
|
||
| export function ErrorPage({ children, backLink }: Props) { | ||
| return ( | ||
| <div className="flex w-full justify-center"> | ||
| <GradientBackground /> | ||
| <div className="relative flex w-full justify-between"> | ||
| <Link | ||
| to={backLink ? backLink : '/'} | ||
| className="flex items-center p-6 text-mono-sm text-default hover:text-raise" | ||
| > | ||
| <PrevArrow12Icon title="Select" className="mr-2 text-secondary" /> | ||
| Back | ||
| </Link> | ||
| </div> | ||
| <div className="absolute left-1/2 top-1/2 flex w-96 -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center space-y-4 rounded-lg border p-8 !bg-raise border-secondary elevation-3"> | ||
| <div className="my-2 flex h-12 w-12 items-center justify-center"> | ||
| <div className="absolute h-12 w-12 rounded-full opacity-20 bg-info motion-safe:animate-[ping_2s_cubic-bezier(0,0,0.2,1)_infinite]" /> | ||
| <Error12Icon className="relative h-8 w-8 text-info-secondary" /> | ||
| </div> | ||
|
|
||
| <div className="space-y-2 text-center">{children}</div> | ||
| </div> | ||
| </div> | ||
| ) | ||
| } |
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
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 |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /* | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
| * | ||
| * Copyright Oxide Computer Company | ||
| */ | ||
| import { Links, Meta, Scripts, ScrollRestoration, useLocation } from '@remix-run/react' | ||
| import cn from 'classnames' | ||
|
|
||
| export const Layout = ({ | ||
| children, | ||
| theme, | ||
| }: { | ||
| children: React.ReactNode | ||
| theme?: string | ||
| }) => { | ||
| const location = useLocation() | ||
| const bodyClass = location.pathname.startsWith('/notes') ? 'note' : 'rfd' | ||
|
|
||
| return ( | ||
| <html lang="en" className={theme}> | ||
| <head> | ||
| <meta charSet="utf-8" /> | ||
| <meta name="viewport" content="width=device-width,initial-scale=1" /> | ||
| <Meta /> | ||
| <Links /> | ||
| <link rel="icon" href="/favicon.svg" /> | ||
| <link rel="icon" type="image/png" href="/favicon.png" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| {/* Use plausible analytics only on Vercel */} | ||
| {process.env.NODE_ENV === 'production' && ( | ||
| <script defer data-domain="rfd.shared.oxide.computer" src="/js/viewscript.js" /> | ||
| )} | ||
| </head> | ||
| <body className={cn('mb-32', bodyClass)}> | ||
| {children} | ||
| <ScrollRestoration /> | ||
| <Scripts /> | ||
| </body> | ||
| </html> | ||
| ) | ||
| } | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.