chore(core): removed obsolete TODO (#7337)

Cleaned up some TODOs that no longer need to be done
This commit is contained in:
JimmFly
2024-06-27 06:30:28 +00:00
parent e892d55134
commit 4af6223dc3
11 changed files with 6 additions and 16 deletions

View File

@@ -1,3 +1,4 @@
import { notify } from '@affine/component';
import { updateReadyAtom } from '@affine/core/hooks/use-app-updater';
import { apis } from '@affine/electron-api';
import type { useI18n } from '@affine/i18n';
@@ -24,7 +25,10 @@ export function registerAffineUpdatesCommands({
preconditionStrategy: () => !!store.get(updateReadyAtom),
run() {
apis?.updater.quitAndInstall().catch(err => {
// TODO(@JimmFly): add error toast here
notify.error({
title: 'Failed to restart to upgrade',
message: 'Please restart the app manually to upgrade.',
});
console.error(err);
});
},

View File

@@ -81,10 +81,6 @@ export const LabelsPanel = () => {
condition: workspace.flavour === 'affine-cloud',
label: 'syncCloud',
},
//TODO(@JimmFly): add these labels
// { status==="synced", label: 'availableOffline' }
// { workspace.flavour === 'affine-Docker', label: 'syncDocker' }
// { workspace.flavour === 'self-hosted', label: 'selfHosted' }
];
return (

View File

@@ -29,7 +29,6 @@ export const descriptionStyle = style({
});
export const buttonStyle = style({
marginTop: '18px',
// todo(@JimmFly): new color scheme should be used
});
export const actionsStyle = style({
display: 'flex',

View File

@@ -66,7 +66,6 @@ globalStyle(`[data-draggable=true][data-dragging=true] ${dndCell}:before`, {
opacity: 1,
});
// TODO(@JimmFly): remove global style
globalStyle(`${root} > :first-child`, {
paddingLeft: '16px',
});

View File

@@ -109,7 +109,6 @@ export const CollectionListItem = (props: CollectionListItemProps) => {
props.title,
]);
// TODO(@JimmFly): use getDropItemId
const { setNodeRef, attributes, listeners, isDragging } = useDraggable({
id: getDNDId('collection-list', 'collection', props.collectionId),
data: {

View File

@@ -66,7 +66,6 @@ globalStyle(`[data-draggable=true][data-dragging=true] ${dndCell}:before`, {
opacity: 1,
});
// TODO(@JimmFly): remove global style
globalStyle(`${root} > :first-child`, {
paddingLeft: '16px',
});

View File

@@ -167,7 +167,6 @@ export const PageListItem = (props: PageListItemProps) => {
props.title,
]);
// TODO(@JimmFly): use getDropItemId
const { setNodeRef, attributes, listeners, isDragging } = useDraggable({
id: getDNDId('doc-list', 'doc', props.pageId),
data: {

View File

@@ -65,7 +65,6 @@ globalStyle(`[data-draggable=true][data-dragging=true] ${dndCell}:before`, {
opacity: 1,
});
// TODO(@JimmFly): remove global style
globalStyle(`${root} > :first-child`, {
paddingLeft: '16px',
});

View File

@@ -98,7 +98,6 @@ export const TagListItem = (props: TagListItemProps) => {
);
}, [props.color, props.onSelectedChange, props.selectable, props.selected]);
// TODO(@JimmFly): use getDropItemId
const { setNodeRef, attributes, listeners, isDragging } = useDraggable({
id: getDNDId('tag-list', 'tag', props.tagId),
data: {

View File

@@ -74,9 +74,7 @@ export type TagListItemProps = {
export interface ItemListHeaderProps {}
// TODO(@JimmFly): a temporary solution. may need to be refactored later
export type ItemGroupByType = 'createDate' | 'updatedDate'; // TODO(@JimmFly): can add more later
// TODO(@JimmFly): a temporary solution. may need to be refactored later
export type ItemGroupByType = 'createDate' | 'updatedDate';
export interface SortBy {
key: 'createDate' | 'updatedDate';
order: 'asc' | 'desc';

View File

@@ -22,7 +22,6 @@ export const affineDocViewport = style({
flexDirection: 'column',
userSelect: 'none',
containerName: 'viewport',
// TODO(@JimmFly): find out what this does in bs
containerType: 'inline-size',
background: cssVar('backgroundPrimaryColor'),
'@media': {