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

Saved status #812

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Saved status #812

wants to merge 4 commits into from

Conversation

d-nieto246
Copy link
Collaborator

The first implementation for saved status. A bar shows up under the "Connected" text bar when testing locally. Needs some work.

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.
Copy link
Contributor

@curran curran left a 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';
Copy link
Contributor

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"?>
Copy link
Contributor

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',
Copy link
Contributor

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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants