Commit Graph

37 Commits

Author SHA1 Message Date
3bf47a10b8 Fix blob viewer (new UI) (#521)
* Fix blob viewer (new UI)
Fixes #371

* Add step test and update snaps

* Better selector
2024-01-16 04:39:38 -05:00
c7c211112b Fix yarn test: canvas mock (#503)
* Fix `yarn test`: Move canvas to deps so it gets installed on CI

* Try again

* Back to dev

* Test node 20

* Remove canvas, add jest-canvas-mock

* Back to node v18
2024-01-09 06:08:44 -05:00
9494585a2d Bump @primer/react from 35.26.1 to 36.5.0 (#485)
* Bump @primer/react from 35.26.1 to 36.5.0

Bumps [@primer/react](https://github.com/primer/react) from 35.26.1 to 36.5.0.
- [Release notes](https://github.com/primer/react/releases)
- [Changelog](https://github.com/primer/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/primer/react/compare/v35.26.1...v36.5.0)

---
updated-dependencies:
- dependency-name: "@primer/react"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix breaking change

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2024-01-07 07:22:35 -05:00
2468b4900a Bump three-stdlib from 2.23.13 to 2.28.11 (#489)
* Bump three-stdlib from 2.23.13 to 2.28.11

Bumps [three-stdlib](https://github.com/pmndrs/three-stdlib) from 2.23.13 to 2.28.11.
- [Release notes](https://github.com/pmndrs/three-stdlib/releases)
- [Changelog](https://github.com/pmndrs/three-stdlib/blob/main/release.config.js)
- [Commits](https://github.com/pmndrs/three-stdlib/compare/v2.23.13...v2.28.11)

---
updated-dependencies:
- dependency-name: three-stdlib
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix import

* Add 'canvas' as dev dep

* Update snaps (the colors look broken now)

* Downgrade to three 154

* Update snaps

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com>
2024-01-07 07:04:16 -05:00
b53062b3c8 Follow the user's github theme instead of system (#444)
Fixes #443
2023-11-30 07:53:46 -05:00
d3a4f4c27c Update @kittycad/lib to v0.0.35 (#373) 2023-09-01 14:19:00 -04:00
6423e06113 Update kittycad lib (#363)
* Update kittycad lib

* Change output for output["output.obj"]

* Update vitest

* Update e2e snaps

* Disable two tests

* Investigation
2023-09-01 05:02:16 -04:00
67aaae56f0 Unsupported blob pages getting injected (#318)
Fixes #312
2023-07-14 06:41:11 -04:00
3412c1fd69 Add an indicator when Combined mode is loading (#308)
* Add an indicator when Combined mode is loading
Fixes #297

* Proper centering

* Clean up
2023-07-14 06:40:55 -04:00
ae3149e3cb The commit view *within* a PR doesn't get injected (#282)
* The commit view *within* a PR doesn't get injected
Fixes #280

* Add specific return for consistency

* Better test

* Add e2e test

* Typo
2023-07-13 06:49:55 -04:00
5aa3aa4ee6 Use OBJLoader from three-stdlib (#285)
* Use OBJLoader from three-stdlib -> clean up

* Change import
2023-07-12 19:52:48 -04:00
60181540e6 Listen for Return in Settings page (#281)
Fixes #279
2023-07-05 06:42:48 -04:00
0191a07b01 Enable pan (one-liner) (#268)
Enable pan
2023-06-30 14:17:43 -04:00
558639d6cb Add e2e coverage for Combined mode (#259)
* Refactor test functions to later enable cilcks

* Add not-so-clean way to get the combined snap

* Add linux combine snap

* Refactor, add darwin snapshots

* Add linux snapshots

* Remove darwin snapshots

* Disable tracking of darwin snapshots

* WIP reenable failing test

* WIP tests
2023-06-28 05:23:51 -04:00
e6daf99921 Fix native STL Blob Preview (#260)
* Fix existing STL Preview tab

* Add linux snapshots (height 500 and new stl one)

* Add comment
2023-06-28 05:23:28 -04:00
ebafdecae7 Add rich viewer for files (non-diff) (#246)
* Add rich viewer for files (non-diff)
Fixes #74

* Fix test typo

* WIP toolbar and proper blob element injection

* Add working Preview/Code/Blame toggle

* Add missing aria-label

* Add e2e test and classic/reactUI support

* Re-enable headless e2e

* Update e2e snap for linux

* Lint

* Improve style a bit

* Reorg and cleanup
2023-06-23 16:37:02 -04:00
8f7d4697de Add Recenter button (#233)
* Fix other centering issue on .dae file sample

* Clean up redundant three things, add dumb recenter button

* Two refs

* Cleanup and working Recenter on 2-up mode

* Add change detection, clean up

* Clean up

* Revert common sphere compute and cam position/zoom tweaks to avoid clipping

* Update darwin e2e snapshot (we see the clipping pb go away!)

* Update linux e2e snaps
2023-06-15 20:14:19 -04:00
1f62e6f34c More centering fixes (#200)
* More centering fixes

* Fix types

* Break out functions and add tests

* Clean up and lint

* Add missing import

* Add added/removed boundingsphere defaults

* Update darwin e2e snapshots

* Update linux e2e snapshots

* Update names

* Better error message

* Update e2e darwin

* Update e2e linux

* Consistency tweak

* Consistency tweak
2023-06-08 17:51:48 -04:00
85151ffe8f Model centering can be off on Unified mode (#193)
Fixes #182
2023-05-30 06:52:53 -04:00
a8398b1957 Unified diff mode improvements (#167)
* Bump to v0.2.0

* Better colors in unfied mode

* New legend (wip)

* Working prototype

* Clean up

* Consistency tweaks

* Clean up
2023-05-24 04:41:51 -04:00
28eb6ec3f3 Migrate away from CRA (#155)
* Migrate away from CRA
Fixes #128

* Add vitest

* Fix github client, still issues with kittycad

* Working e2e tests when kittycad.ts functions don't call node-fetch

* Remove cross-fetch that was causing issues in the browser (not sure why)

* Node 18, rm custom kittycad.ts, replace node-fetch

* Clean up

* Clean up and lint
2023-05-16 18:20:48 -04:00
41896ae6c3 Add default avatar from website (#145)
* Add default avatar from website
Fixes #134

* Add service avatar as AvatarPair

* Fix test

* Move to descriptive function
2023-05-10 05:22:19 -04:00
8c192e04f8 Unified additions/deletions diff (#96)
* Draft: WIP observer

* Clean up, only one react root

* Typescript 4.9.5

* Clean up

* Better name

* WIP: csg dependencies, error in console

* WIP: working common/additions, no colors yet

* Working colors

* Prepare for toggle between side by side and unified

* Fix position, add 5% transparency for unchanged

* Clean up

* Toggle to enable unified or side by side

* Clean up and better material for standard view

* Update src/components/diff/CadDiff.tsx

Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>

* Remove irrelevant comment

* Make Viewer3D take children

* Introduce BaseModel for camera view stuff

* Comment and clean up

* Remove check needed by an old test

* Add 'Experimental' Beaker icon to Unified button

---------

Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
2023-05-10 04:49:18 -04:00
4267209c9b Improve token login experience (#127)
* Add link with scope built-in

* repo is now a link to get the right token

* Clean up weird yan artifacts

* Add Details component, clean up

* Nicer UI
2023-04-27 18:24:43 -04:00
690343e642 Before and after views are flipped (#95)
* Before and after view are flipped
Fixes #94

* Test e2e artifacts upload

* Revert "Test e2e artifacts upload"

This reverts commit bcecfd5fc2aa22e108a83a00e3f33f698b4ab294.

* Prettier
2023-04-14 15:49:03 -04:00
f79dfda9c5 Add diff observer, rerunning injection if new elements are late (#82)
* Draft: WIP observer

* Clean up, only one react root

* Typescript 4.9.5

* Clean up

* Better name
2023-04-13 04:49:57 -04:00
0ebcbe118d screen.get*ByRole breaking yarn test (#88) 2023-04-11 05:31:38 -04:00
9f45958083 Better error handling and small wait before element queries (#55)
* Proper error handling and more logs

* Lint

* Add 1sec wait before looking for elements

* Clean up
2023-04-03 05:26:32 -06:00
31eef054b6 Re-enable STL support (#61)
* OBJ as the new default viewer format

* Replace deprecated btoa

* Clean up

* Hide existing STL toggle

* No Box if no before/after

* Adds error message when no geometry
2023-03-30 20:55:38 -04:00
f491739193 Adds support for .step extension, disables .stl (#51)
* New structure to map multiple extensions to type, and disable STL

* Clean up
2023-03-30 04:32:29 -04:00
e8d4798c17 Update viewers on window resize (#52)
* Update three on window resize
Fixes #43

* Clean up
2023-03-30 04:31:58 -04:00
3df22f1116 Add toggle between source and rich diff for CAD (#36)
* Remove await on GetFileDiff
Progress towards #28

* n roots instead of 2n

* Lint

* Trying something with portals

* Portal component, one root

* Fix element clean up, prep for later tasks

* Draft: toolbar element injection

* Working click to select rich or source

* Actually working now

* Fixes

* Clean up

* Polishing here and there

* Add SourceRichToggle component

* e2e test with toolbar

* Update linux snapshots

* Remove failing test (WIP)

* Clean up
2023-03-27 16:37:21 -04:00
0be1f4ef30 Improve diff injection performance (#30)
* Remove await on GetFileDiff
Progress towards #28

* n roots instead of 2n

* Lint

* Trying something with portals

* Portal component, one root

* Fix element clean up, prep for later tasks
2023-03-22 04:46:17 -04:00
f4fa083137 e2e tests (#17)
* Setup playwright for e2e tests
Fixes #12

* Chromium

* First working test, clean up

* Merge actions

* New headless mode

* Clean up, bugfix

* Bug fixes, cleaner sendMessage code

* Rebase

* Rebase

* Load tokens and open public page

* Test CI

* Working test

* Lint

* Try to address flakyness

* Clean up test

* Comment

* No export

* More clean up

* More clean up

* Adds authorized pop up test

* Adds comment

* Add snapshots

* New linux screenshots
2023-03-15 04:32:46 -04:00
f8b891cb47 Stealing the website's viewer (#15)
* Stealing the website's viewer

* Cleaned up, diff colors

* fix test

* Clean up unused logic

* Clean up
2023-03-08 05:45:25 -05:00
a1a90a7d2a Support commit diffs (#8)
* cra boilerplate

* Dummy chrome extension

* eslint and working url popup

* content script and dummy messaging

* replace .obj diffs with dummy test

* comment and in-order multiple type support

* get pull api data from url

* README title and desc

* api/elements match with filename check

* github token signin signout

* manifest v3, service request for CORS

* working kittycad api in service worker

* First real background message

* Clean up,  better types

* Fix settings

* multiservice settings

* Tweaks

* WIP: download file

* Working downloads and kittycad conversion

* Inject react, add three dependencies

* Working stl canvas

* primer for github-like style

* Loading before model

* diff colors

* colorMode auto

* Popup clean up

* clean up

* Working loading

* Logos

* Add GitHub CI

* Working test

* yarn test in ci

* Little tweak

* Update README

* component tests

* Better test

* Clean up

* UserCard test

* working caddiff test

* Note

* Rename App to Settings

* storage test

* Clean up

* Clean up content script

* further content cleanup

* Fix test

* Little tweaks to modelview

* More tests and testing

* Regex fix

* LFS file download test

* prettier config from kittycad/website

* Little tweaks

* comment

* log level

* Tweaks

* README update

* more prettier

* comment

* Irrelevant comment

* No .vscode and readme update

* Remove .vscode

* Package.json update after vscode removal

* Working commit diff

* Start cleaning up

* Clean up

* Add artifact upload

* return when matched

* Better test

* Clean up

* prettier

* Clean up html snippet
2023-03-02 21:16:22 -05:00
fd44076a18 Minimal working version (#1)
* cra boilerplate

* Dummy chrome extension

* eslint and working url popup

* content script and dummy messaging

* replace .obj diffs with dummy test

* comment and in-order multiple type support

* get pull api data from url

* README title and desc

* api/elements match with filename check

* github token signin signout

* manifest v3, service request for CORS

* working kittycad api in service worker

* First real background message

* Clean up,  better types

* Fix settings

* multiservice settings

* Tweaks

* WIP: download file

* Working downloads and kittycad conversion

* Inject react, add three dependencies

* Working stl canvas

* primer for github-like style

* Loading before model

* diff colors

* colorMode auto

* Popup clean up

* clean up

* Working loading

* Logos

* Add GitHub CI

* Working test

* yarn test in ci

* Little tweak

* Update README

* component tests

* Better test

* Clean up

* UserCard test

* working caddiff test

* Note

* Rename App to Settings

* storage test

* Clean up

* Clean up content script

* further content cleanup

* Fix test

* Little tweaks to modelview

* More tests and testing

* Regex fix

* LFS file download test

* prettier config from kittycad/website

* Little tweaks

* comment

* log level

* Tweaks

* README update

* more prettier

* comment

* Irrelevant comment

* No .vscode and readme update

* Remove .vscode

* Package.json update after vscode removal
2023-03-02 04:35:07 -05:00