Skip to content

Develop/V2.0 - #38

Open
sebastianMindee wants to merge 9 commits into
mainfrom
build-chain
Open

sebastianMindee wants to merge 9 commits into
mainfrom
build-chain

Conversation

@sebastianMindee

@sebastianMindee sebastianMindee commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

PR Details

BIG PR to bump, rehaul, fix and update most of the repo + add page lazy-loading

Description

Related Issue

Motivation and Context

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have added type hints (flow) to cover my changes.
  • All new and existing tests passed.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Controlled position and options updates are stale, disabled zoom blocks scrolling, and the new lint configuration leaves failing unused imports.

Review effort: Balanced
Findings: 4 Medium severity

Open (4)
What changed in this PR

Modernizes the library’s toolchain and refactors canvas lifecycle, image handling, selection, zoom, and testing for v2.

Changes:

  • Upgrades TypeScript, Vite, ESLint, Prettier, Cypress, and packaging.
  • Refactors viewer/lens rendering and asynchronous image loading.
  • Improves typing, Konva state handling, and component tests.
File Description
vite.config.ts Adds typed Vite library configuration.
vite.config.js Removes legacy Vite configuration.
tsconfig.json Modernizes TypeScript compilation settings.
src/​utils/​zoom.ts Centralizes zoom state and tightens guards.
src/​utils/​zoom.spec.ts Updates type-only imports.
src/​utils/​useMultiSelection.ts Refactors modifier handling around stage refs.
src/​utils/​useEventListener.ts Simplifies typed event-listener management.
src/​utils/​selection.ts Moves selection metadata into weak maps.
src/​utils/​selection.spec.ts Updates type-only imports.
src/​utils/​orientation.ts Simplifies rotation and adds error handling.
src/​utils/​layer.ts Updates type-only imports.
src/​utils/​image.ts Improves image typing, errors, and zoom access.
src/​utils/​image.spec.ts Updates test typing.
src/​utils/​getPDFPageCount.ts Converts PDF counting to async/await.
src/​utils/​getPDFPageCount.spec.tsx Tightens rejected-error typing.
src/​utils/​getImagesFromPDF.ts Refactors PDF rendering with async/await.
src/​utils/​getImagesFromPDF.spec.tsx Tightens rejected-error typing.
src/​utils/​functions.ts Improves Konva node lookup safety.
src/​utils/​canvas.ts Stores annotation metadata outside Konva attributes.
src/​utils/​canvas.spec.ts Simplifies test casts.
src/​index.ts Exports the zoom-scale accessor.
src/​components/​dynamicZoom.spec.tsx Updates dynamic zoom test component.
src/​components/​AnnotationViewer.tsx Refactors stage, image, callback, and shape lifecycles.
src/​components/​AnnotationViewer.spec.tsx Updates event assertions and imports.
src/​components/​AnnotationLens.tsx Refactors lens rendering and image lifecycle.
src/​components/​AnnotationLens.spec.tsx Modernizes test types.
src/​common/​types.ts Strengthens public TypeScript types.
src/​common/​constants.ts Updates type imports and Konva accessors.
README.md Reorders example imports.
pnpm-workspace.yaml Documents the disabled canvas build.
package.json Upgrades tooling and changes ESM packaging.
ISSUE_TEMPLATE.md Normalizes Markdown lists.
eslint.config.ts Adds strict flat ESLint configuration.
cypress/​support/​index.d.ts Updates Cypress mount typing.
cypress/​support/​component.ts Migrates Cypress snapshot integration.
cypress/​support/​component-index.html Formats component-runner HTML.
cypress/​assets/​shapes.ts Uses a type-only import.
cypress.config.ts Updates snapshot plugin configuration.
CONTRIBUTING.md Normalizes Markdown lists.
CODE_OF_CONDUCT.md Applies formatting corrections.
.prettierrc Updates import-sorting configuration.
.prettierignore Adds repository-wide formatting exclusions.
.eslintrc Removes the legacy ESLint configuration.
.eslintignore Removes legacy ignore configuration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/components/AnnotationLens.tsx Outdated
Comment thread src/components/AnnotationViewer.tsx Outdated
Comment thread src/components/AnnotationViewer.tsx Outdated
Comment thread src/utils/zoom.ts Outdated
@sebastianMindee
sebastianMindee force-pushed the build-chain branch 2 times, most recently from 723b427 to a907016 Compare October 1, 2026 13:48
@sebastianMindee
sebastianMindee marked this pull request as ready for review October 8, 2026 09:01
@sebastianMindee sebastianMindee changed the title [DRAFT] V2.0 Release/V2.0 Oct 8, 2026
@sebastianMindee
sebastianMindee requested review from despprie and ianardee and a balanced review from Copilot October 8, 2026 09:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The release still publishes version 1.7.0, and the lens does not apply the new TIFF/HEIF preparation path.

2 open findings
4 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread docs/docs/migration.md
Comment thread src/components/AnnotationLens.tsx Outdated
try {
const image = await rotateImage(annotationData.current)
imageDataObject.current.element.src = image
const src = await rotateImage(image, orientation);
@sebastianMindee sebastianMindee changed the title Release/V2.0 Develop/V2.0 Oct 8, 2026
@sebastianMindee
sebastianMindee requested a balanced review from Copilot October 8, 2026 10:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Small fitted images cannot zoom reliably, and modifier release can incorrectly enable stage dragging.

3 open findings
1 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread src/utils/useMultiSelection.ts Outdated
useEventListener('keyup', (event) => {
event.stopPropagation();
if (isSelectionModifier(event)) {
stageRef.current?.draggable(true);
Comment thread src/utils/zoom.ts Outdated

This branch has not been deployed

No deployments
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