-
Notifications
You must be signed in to change notification settings - Fork 14
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
Saved status #812
base: main
Are you sure you want to change the base?
Saved status #812
Conversation
Included a text file with different methods and will incorporate it into the code at some point next week.
Added helper files to display a saved status.
A bar shows up, but it shows underneath the "Connected" bar. Needs some work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting there!
@@ -0,0 +1,60 @@ | |||
import { createContext, useState, useEffect, useRef } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete this file.
@@ -0,0 +1,107 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add .idea
to .gitignore
and delete these files.
searchToolTipText?: string; | ||
filesToolTipText?: string; | ||
}) => { | ||
createFileTooltipText = 'New File', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run npm run prettier
to format the files. Thanks!
@@ -355,6 +357,9 @@ export const VZCodeProvider = ({ | |||
const [hoveredItemId, setHoveredItemId] = | |||
useState<ItemId | null>(null); | |||
|
|||
// Implement the saving/saved status | |||
const [savingStatus, setSavingStatus] = useState('All changes saved'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const [savingStatus, setSavingStatus] = useState('All changes saved'); | |
const savingStatus = useSavingStatus({shareDBDoc}); |
where useSavingStatus
is pretty much the same as usePending
from the old example.
Delete the duplicated "VZCodeContext" file.
The first implementation for saved status. A bar shows up under the "Connected" text bar when testing locally. Needs some work.