A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: add experimental support for responsive pane resizing
Abdullah Atta193007370aed
diff --git a/apps/web/src/components/split-pane/index.tsx b/apps/web/src/components/split-pane/index.tsxindex 5ffcb5022..62daab2db 100644--- a/apps/web/src/components/split-pane/index.tsx+++ b/apps/web/src/components/split-pane/index.tsx@@ -204,6 +204,30 @@ export const SplitPane = React.forwardRef<const [entry] = entries;const newSize = entry.contentRect ? entry.contentRect[sizeName] : 0;++ const delta = newSize - wrapSize.current;+ if (delta === 0) return;++ // TODO: responsiveness+ // const nextSizes = [...sizes.current];+ // const i = sizes.current.length - 1;+ // const currentSize = sizes.current[i];+ // const currentPaneLimits = paneLimitSizes.current[i];+ // const prevPaneLimits = paneLimitSizes.current[i - 1];++ // if (+ // delta > 0 &&+ // prevPaneLimits &&+ // prevPaneLimits.max < Infinity &&+ // nextSizes[i - 1] + delta <= prevPaneLimits.max+ // ) {+ // nextSizes[i - 1] += delta;+ // } else if (delta < 0 && currentSize + delta <= currentPaneLimits.min) {+ // nextSizes[i - 1] += delta;+ // } else {+ // nextSizes[i] += delta;+ // }+wrapSize.current = newSize;setSizes(sizes.current, wrapSize.current);});