1
0
Fork 0
Commit graph

95 commits

Author SHA1 Message Date
Joost De Cock
c20ed9743d
Merge pull request #6076 from BenJamesBen/include-setname-in-titles-and-pdf
fix(shared, plugins): Provide measurement set name to patterns
2024-02-17 16:31:33 +01:00
Benjamin Fan
a8e51a278b fix(shared, plugins): Provide measurement set name to patterns 2024-02-14 12:35:45 -08:00
Benjamin Fan
1730d34bd1 fix(plugin-annotations): Use non-special characters in scaleboxes to work around #5874 2024-02-13 09:52:03 -08:00
joostdecock
0d45d22447 chore: Updated title unit tests 2024-01-07 16:06:48 +01:00
joostdecock
66b8bf3a06 fix(plugin-annotations): Typo on var name 2024-01-07 15:52:50 +01:00
joostdecock
c06a18e06e feat: Support notes in title macro
This started out as a fix for #5753 after I felt the approach in #5760
was not the best way to handle this.

The problem lies in the way the cutlist data is added to the pattern by
the title plugin. The whole cutlist thing was added by a less
experienced contributor, and they were a little too focussed on what
they were trying to accomplish, rather than keeping an eye on the big
picture.

In this case, a bunch of points get added to the part to anchor all of
the text for the cutlist. This causes problems when inheriting parts
because points are added per material, and now we don't know what
materials were used and how to remove these points.

I appreciate @woutervdub effort to resolve this in #5760 but as I
mentioned above, I don't love the approach.
Rather than finding a clever way to remove these points, I am of the
opinion that they should never have been added in the first place.

Specifically, all we are doing is adding one or more lines of text. The
idea that you need multiple points for this is an incorrect assumption,
and therein lies the root of this problem.

So, this refactor adds support to the title macro for 'notes'. These
notes will be added below the title. The cutlist info is now just
prepended to the notes. So it stops being something 'special' (which it
never should have been) and instead just behaves like other text that is
placed on the part by the title macro.

The only flanking measure required to make this happen was to add
support for nested arrays in handling text.
This way, you can pass a nested array to concatenate strings in such a
way that each part will still be individually translated.

And as all text in FreeSewing, to force a linebreak, you just use "\n"
as The Dark Lord intended.
2024-01-06 17:54:11 +01:00
Joost De Cock
4689f56626 fix: Rename removeGrainline to removeGrain 2023-11-20 15:44:59 +01:00
joostdecock
ac054b8115 fix(plugin-annotations): Remove unneeded partName 2023-11-18 19:06:29 +01:00
joostdecock
bf0cd0f835 fix(plugin-annotations): Ensure grainline is removed
This builds on the fix by @woutervdub in #5449 that ensures the
rmcutonfold macro removes the cutonfold info from the store.

However, the same problem applies to the grainline data which can be set
by both cutonfold and grainline.

So I've added that. And while I was at it also created explicit methods
to remove this data instead of having to pass in false which I found
counterintuitive and a throwback to the v2-ways.

In addition, the grainline can be set by both grainline and cutonfold
macros. So when we remove either of them, we should only remove the
grainline info if it was actually set by them. But there's no way to
know that at remove time.
So I've also added the logic to set grainOrigin in the store which will
be `cutonfold` or `grainline` depending on the macro that set the grain.
2023-11-10 18:10:12 +01:00
Wouter van Wageningen
406ac84c2b
Fix bug #5448 2023-11-09 20:48:08 -08:00
joostdecock
283dec780d fix(plugin-annotations): Add force to default settings 2023-10-29 17:21:37 +01:00
joostdecock
3b3d313fe8 fix(shared): Import logo path from non-JSX file 2023-10-28 21:49:28 +02:00
joostdecock
ef94458e20 Merge branch 'develop' into joost 2023-10-28 21:45:30 +02:00
Soham Tembhurne
a25df39508
fix line spacing 2023-10-28 00:52:36 +05:30
sohamtembhurne
84f1befd83 logo.mjs: fix transform issues 2023-10-28 00:38:11 +05:30
sohamtembhurne
cda517fd04 updated path to use {logoPath} instead of string 2023-10-26 14:10:08 +05:30
Joost De Cock
e33d3c1499 chore: Remove lint 2023-10-18 17:27:30 +02:00
Joost De Cock
207dd9008b chore(plugin-annotations): Remove lint 2023-10-18 16:32:35 +02:00
Joost De Cock
cb106578b3 feat(core): Better support for macro removal an node id tracking 2023-10-18 16:00:15 +02:00
Joost De Cock
e808375b60 chore(plugin-banner): Fix typo in code comment 2023-10-17 08:14:52 +02:00
Joost De Cock
d739e8f5bd Merge branch 'joost' into plugins-scale 2023-10-15 16:05:28 +02:00
joostdecock
18042c8f3d feat(core): Return from macros 2023-09-28 13:26:32 +02:00
woutervdub
d06a91a4a7 Implement #4951 2023-09-22 02:15:35 +00:00
Joost De Cock
ef41c23379 feat(plugin-annotations): Added eyelet snippet 2023-09-18 11:04:22 +02:00
joostdecock
b8458362b0 fix(plugin-annotations): Fix issue with rotating scalebox 2023-09-16 13:04:22 +02:00
joostdecock
4198c35ea8 feat(plugin-annotations): Add setCut method 2023-09-16 10:33:20 +02:00
Joost De Cock
7432dd37ad fix(plugin-annotations): Avoid self-closing tags in defs 2023-09-15 16:58:13 +02:00
Joost De Cock
967bebdaf5 chore(plugin-annotations): Another flag preset 2023-09-15 16:57:42 +02:00
Joost De Cock
b3b0d4b7bc fix(plugin-annotations): Wrong macro names in umbrella rm macro 2023-09-15 16:57:01 +02:00
Joost De Cock
9955784078 fix(plugin-annotations): Circle syntax in defs 2023-09-15 08:43:57 +02:00
Joost De Cock
8dab0cdb4e fix(plugin-annotations): Fix bnotch syntax 2023-09-14 16:54:32 +02:00
Joost De Cock
799352f2b7 chore(plugin-annotations): Update title macro to cutlist changes 2023-09-13 17:50:53 +02:00
Joost De Cock
6d5c21e4e1 fix(plugin-annotations): Set bias/cutonfold explicity in cutlist
The cutlist methods were being clever by deducing whether a part should
be cut on the fold from info set by the cutonfold macro.

This is a footgun, because this only works when the cutlist is set after
the cutonfold macro is run.

We can't expect designers to know they should add this annotation before
that annotation so now you need to add it explicitly.

The current keys to pass are:

 - cut
 - from (used to be material)
 - onBias (used to be bias)
 - onFold (replaced ignoreOnFold)
2023-09-13 17:41:03 +02:00
Joost De Cock
d9e85d03ca fix(plugin-annotations): Better check for material 2023-09-13 15:12:22 +02:00
Joost De Cock
d9e566ad12 fix(plugin-annotations): Force rendering points for title 2023-09-13 11:48:34 +02:00
Joost De Cock
b8efc700e7 chore(plugin-annotations): Prefer from over material and support multiple cuts 2023-09-13 11:48:10 +02:00
Joost De Cock
87aaf1f2d9 feat(plugin-annotations): Allow setting title and desc via msg 2023-09-12 16:02:37 +02:00
Joost De Cock
f5edf74936 chore(chared): Updated flag UI and api 2023-09-09 15:31:53 +02:00
joostdecock
b43145ac89 chore(plugin-annotations): No space between v and version 2023-09-08 10:35:53 +02:00
joostdecock
415aabb09d fix(plugin-annotations): Allow overriding scalbox box classes 2023-09-08 10:15:41 +02:00
joostdecock
5a99c1b5ef fix(plugin-annotations): Let banner start and end with text 2023-09-08 09:05:27 +02:00
joostdecock
a253920dd5 chore: Linter issues 2023-09-07 20:15:40 +02:00
joostdecock
36e4062297 feat(core-plugins): Set macro id on dimension path 2023-09-07 18:35:06 +02:00
joostdecock
7a98de5797 fix(plugin-annotations): Desctructure Point and log 2023-09-07 14:46:28 +02:00
joostdecock
4528e1bc88 feat(shared): Added support for flags 2023-09-07 10:29:19 +02:00
joostdecock
4aa3c2786b fix: Handle loading of plugin i18n data in workbench 2023-09-06 10:30:52 +02:00
joostdecock
9f081eebb1 chore(plugins): Migrate from log.warning to log.warn 2023-09-06 08:29:59 +02:00
joostdecock
9ae94abd02 feat(plugin-annotations): Add i18n 2023-09-06 08:14:49 +02:00
joostdecock
3f6a5b4116 chore(plugin-annotations): Migrate title 2023-09-05 20:38:47 +02:00
joostdecock
d33139c6d0 chore(plugin-annotations): Migrate sewtogether 2023-09-05 20:38:14 +02:00