mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 03:56:23 +08:00
chore: assign todos (#7297)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user