1
0
Fork 0
Commit graph

214 commits

Author SHA1 Message Date
Joost De Cock
2f8ee87281 chore(dev): Tweaks to colors 2022-05-15 18:55:19 +02:00
Joost De Cock
8c094dc22e fix(lab): Contain code blocks on mobile screen with break-all 2022-05-15 18:44:36 +02:00
Joost De Cock
7aff532639 fix(lab): Add space in title so it can wrap 2022-05-15 15:12:32 +02:00
Joost De Cock
a395873024 feat(lab): Close navigation when testing options 2022-05-15 15:11:50 +02:00
Joost De Cock
88b19dd2df feat(lab): Require Ctrl-key to zoom with mouse wheel 2022-05-15 15:03:19 +02:00
Joost De Cock
4d59cf59be fix(lab): Be explicit about closing navigation on gist updates 2022-05-15 14:46:03 +02:00
Joost De Cock
c3b9c07236 feat(lab): Close navigation on mobile when switching view in workbench 2022-05-14 19:53:27 +02:00
Joost De Cock
c3e54687fc fix(lab): Add mobile navigation 2022-05-14 19:53:27 +02:00
Joost De Cock
04245fbe3e feat(lab): Keep track of available versions 2022-05-14 15:43:52 +02:00
Joost De Cock
2c5f0fa332 fix(lab): Layout improvements 2022-05-14 14:53:29 +02:00
Joost De Cock
ed535bbe8c feat(lab): Tweaks to pattern overview pages 2022-05-14 14:13:35 +02:00
Joost De Cock
932fa62103 feat(lab): Updated homepage 2022-05-13 21:11:39 +02:00
Joost De Cock
71d03bfb45 chore(freesewing.dev): Layout tweaks 2022-05-12 19:17:51 +02:00
Joost De Cock
be08f0a695 feat(freesewing.dev) Homepage tweaks 2022-05-12 10:27:42 +02:00
Joost De Cock
e4a61c6502 chore(freesewing.dev): Layout composition changes 2022-05-11 17:41:24 +02:00
Joost De Cock
7af63ed65f feat(freesewing.dev): Updated gradients and loading indicators 2022-05-11 16:58:18 +02:00
Joost De Cock
6c41b1d941 feat(freesewing.dev): ToC and layout changes 2022-05-11 16:29:46 +02:00
Joost De Cock
428507c668 fix(shared): yaml-loader config 2022-04-30 14:12:38 +02:00
Joost De Cock
b7b970e40a chore(lab): Do not build all versions for each lab build 2022-03-26 20:27:46 +01:00
Joost De Cock
2793ca45e2 fix(lab): Issues in prebuild script 2022-03-26 19:30:14 +01:00
Joost De Cock
d4833fb6a4 feat(lab): Add support for multiple versions in the lab 2022-03-26 18:06:14 +01:00
Joost De Cock
1ccb1ae4b8 feat(lab): Console log options in xray 2022-03-26 18:06:14 +01:00
Joost De Cock
b505e6123f fix(lab): Grammar issue in error message
Shout-out to @anna-puk for reporting this
2022-03-24 12:45:27 +01:00
Joost De Cock
a912008117 wip(lab): Tweaks to events display 2022-03-24 11:43:00 +01:00
Joost De Cock
9495e9207c wip(lab): Moved error to its own component 2022-03-24 11:43:00 +01:00
Joost De Cock
8a2a13f240 wip(lab): Working on crash reporting in the new dev env 2022-03-18 19:11:00 +01:00
Joost De Cock
5cfcd2e274 wip(lab): Working on preloading pattern settings 2022-03-17 19:05:19 +01:00
Joost De Cock
643b50703b
Merge pull request #1995 from freesewing/joost/customlayout
feat: First stab at custom layout
2022-03-14 08:22:35 +01:00
Joost De Cock
c639f50a62 fix: Linter warnings 2022-03-13 17:29:22 +01:00
Joost De Cock
10adb33402 fix(lab): Issues after linter fixes 2022-03-13 14:38:48 +01:00
Joost De Cock
9fc3752d8d
Update packages/freesewing.shared/components/workbench/layout/print/pagesize-picker.js
Co-authored-by: Nick Dower <nicholasdower@gmail.com>
2022-03-13 14:33:20 +01:00
Joost De Cock
9bb6dbe179
Update packages/freesewing.shared/components/workbench/layout/print/pagesize-picker.js
Co-authored-by: Nick Dower <nicholasdower@gmail.com>
2022-03-13 14:33:15 +01:00
Joost De Cock
a254baa747
Update packages/freesewing.shared/components/workbench/layout/draft.js
Co-authored-by: Nick Dower <nicholasdower@gmail.com>
2022-03-13 14:33:10 +01:00
Joost De Cock
74cf28b871 chore: Fixed linter warnings 2022-03-13 08:48:21 +01:00
Joost De Cock
67da7dd595 feat(lab): First stab at custom layout
This adds a React component to handle custom layouts.
This React component is a long way from perfect, but it's a start.

There are two reasons that (at least in my opinion) implementing this is non-trivial:

1) React re-render vs DOM updates

   For performance reasons, we can't re-render with React when the user drags a
   pattern part (or rotates it). It would kill performance.
   So, we don't re-render with React upon dragging/rotating, but instead manipulate
   the DOM directly.

   So far so good, but of course we don't want a pattern that's only correctly laid
   out in the DOM. We want to updat the pattern gist so that the new layout is stored.
   For this, we re-render with React on the end of the drag (or rotate).

   Handling this balance between DOM updates and React re-renders is a first contributing
   factor to why this component is non-trivial

2) SVG vs DOM coordinates

   When we drag or rotate with the mouse, all the events are giving us coordinates of
   where the mouse is in the DOM.

   The layout uses coordinates from the embedded SVG which are completely different.
   So we need to make this translation and that adds complexity.

3) Part-level transforms

   It's not just that the DOM coordinates and SVG coordinate system is different, each
   part also has it's own transforms applied and because of this behaves as if they have
   their own coordinate system.

   In other words, a point (0,0) in the part is not the top-left corner of the page.
   In the best-case scenario, it's the top-left corner of the part. But even this is
   often not the case as parts will have transforms applied to them.

4) Flip along X or Y axis

   Parts can be flipped along the X or Y axis to facilitate a custom layout.
   This is handled in a transform, so the part's coordinate's don't actually change. They
   are flipped late into the rendering process (by the browser displaying the SVG).

   Handling this adds yet more mental overhead

5) Bounding box

   While moving and rotating parts around is one thing. Recalculating the bounding box
   (think auto-cropping the pattern) gets kinda complicated because of the reasons
   outlined above.

   We are currently handling a lot in the frontend code. It might be more elegant to move
   some of this to core. For example, core expects the custom layout to set the widht and height
   rather than figuring it out on its own as it does for auto-generated layouts.

 Known issues

 - Rotating gets a little weird sometimes as the part rotates around it's center in the
   SVG coordinate system, but the mouse uses it's own coordinates as the center point that's
   used to calculate the angle of the rotation

 - Moving parts into the negative space (minus X or Y coordinated) does not extend the bounding box.

 - Rotation gets weird when a part is mirrored

 - The bounding box update when a part is rotated is not entirely accurate

I've sort of left it at this because I'm starting to wonder if we should perhaps re-think
how custom layouts are supported in the core. And I would like to discuss this with the core team.
2022-03-12 18:54:47 +01:00
Joost De Cock
b948904de1 wip(lab): Working on handling layout 2022-03-06 18:54:30 +01:00
Joost De Cock
dd5599c5d6 wip(lab): Working on layout feature 2022-02-25 08:30:03 +01:00
Joost De Cock
23f70b4b59 release: FreeSewing 2.20.7
This fixes an issue in our workbench component that caused an error for
people using our development environment.
2022-02-20 19:35:36 +01:00
Joost De Cock
a4906eac64 feat(workbench): Show page count on layout 2022-02-20 19:29:14 +01:00
Joost De Cock
99232fe020 chore(workbench): move xray to _state in gist 2022-02-20 19:02:25 +01:00
Joost De Cock
34c8a6b2a5 wip(shared): Working on custom layout 2022-02-20 18:46:21 +01:00
Joost De Cock
2473e225ed feat(workbench): Added export 2022-02-19 17:01:28 +01:00
Joost De Cock
e260d9c634 feat(shared): Added link components 2022-02-19 17:01:05 +01:00
Joost De Cock
daa0c7b488 feat(shared): Popout now takes compact, noP props 2022-02-19 17:00:46 +01:00
Joost De Cock
60321d2342 fix(shared): Correct namespace for translation 2022-02-19 14:21:54 +01:00
Joost De Cock
a7e81fea2c fix(www): No longer load daisyui/colors in tailwind config 2022-02-19 14:17:42 +01:00
Joost De Cock
47bfd60ffe release: v2.20.6
**Date:** 2022-02-22

- Set units on fontsizes to support scale setting

- Handle unset props.pattern in DraftConfigurator option.hide check
2022-02-17 19:37:00 +01:00
Joost De Cock
1bdae6b002 release: v2.20.5 2022-02-17 19:11:27 +01:00
Joost De Cock
cbf258bb6e chore: Reconfigure packages 2022-02-16 20:45:38 +01:00
dependabot[bot]
3378835fb8
chore(deps): bump daisyui from 1.25.4 to 2.0.6
Bumps [daisyui](https://github.com/saadeghi/daisyui) from 1.25.4 to 2.0.6.
- [Release notes](https://github.com/saadeghi/daisyui/releases)
- [Changelog](https://github.com/saadeghi/daisyui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/saadeghi/daisyui/compare/v1.25.4...v2.0.6)

---
updated-dependencies:
- dependency-name: daisyui
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-16 16:28:41 +00:00