chore: assign todos (#7297)

This commit is contained in:
forehalo
2024-06-21 07:54:14 +00:00
parent e085b927f6
commit 7b3673ae82
121 changed files with 137 additions and 157 deletions
@@ -18,7 +18,7 @@ export const useAllPageListConfig = () => {
const shareDocs = useLiveData(shareDocService.shareDocs?.list$);
useEffect(() => {
// TODO: loading & error UI
// TODO(@eyhn): loading & error UI
shareDocService.shareDocs?.revalidate();
}, [shareDocService]);
@@ -4,7 +4,7 @@ import { useSWRConfig } from 'swr';
export function useMutateCloud() {
const { mutate } = useSWRConfig();
return useCallback(async () => {
// todo: should not mutate all graphql cache
// TODO(@eyhn): should not mutate all graphql cache
return mutate(key => {
if (Array.isArray(key)) {
return key[0] === 'cloud';
@@ -69,7 +69,7 @@ export function useRegisterBlocksuiteEditorCommands() {
const preconditionStrategy = () =>
PreconditionStrategy.InPaperOrEdgeless && !trash;
// TODO: add back when edgeless presentation is ready
// TODO(@Peng): add back when edgeless presentation is ready
// this is pretty hack and easy to break. need a better way to communicate with blocksuite editor
// unsubs.push(
@@ -134,7 +134,7 @@ export function useRegisterBlocksuiteEditorCommands() {
})
);
// todo: should not show duplicate for journal
// TODO(@Peng): should not show duplicate for journal
unsubs.push(
registerAffineCommand({
id: `editor:${mode}-duplicate`,
@@ -12,7 +12,7 @@ const useReactiveAdapter = (adapter: WorkspacePropertiesAdapter) => {
// hack: delay proxy creation to avoid unnecessary re-render + render in another component issue
const [proxy, setProxy] = useDebouncedState(adapter, 0);
useEffect(() => {
// todo: track which properties are used and then filter by property path change
// TODO(@Peng): track which properties are used and then filter by property path change
// using Y.YEvent.path
function observe() {
setProxy(getProxy(adapter));
@@ -127,7 +127,7 @@ export const useAppUpdater = () => {
if (updateReady) {
setAppQuitting(true);
apis?.updater.quitAndInstall().catch(err => {
// TODO: add error toast here
// TODO(@Peng): add error toast here
console.error(err);
});
}
@@ -18,7 +18,7 @@ function defaultNavigate(to: To, option?: { replace?: boolean }) {
}, 100);
}
// todo: add a name -> path helper in the results
// TODO(@eyhn): add a name -> path helper in the results
export function useNavigateHelper() {
const navigate = useContext(NavigateContext) ?? defaultNavigate;
@@ -111,7 +111,7 @@ export function useQueryInfinite<Query extends GraphQLQuery>(
const loadingMore = size > 0 && data && !data[size - 1];
// todo: find a generic way to know whether or not there are more items to load
// TODO(@Peng): find a generic way to know whether or not there are more items to load
const loadMore = useCallback(() => {
if (loadingMore) {
return;