1
0
Fork 0
Commit graph

19 commits

Author SHA1 Message Date
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
joostdecock
e0386a441b wip(sde): Handle package dependencies 2023-09-29 18:20:28 +02:00
Joost De Cock
b7b543fda0 fix(react-components): Accept data-render-always attributes on points 2023-09-13 11:58:00 +02:00
joostdecock
61a674f517 feat(react-components): Do not render snippets by default when complete is false 2023-09-06 08:57:57 +02:00
joostdecock
3e4a576be7 fix(react-components): removed debug output 2023-07-15 10:39:09 +02:00
joostdecock
9863ac21d8 fix(react-components): Bug in how defs is added 2023-06-24 10:39:09 +02:00
joostdecock
6da48ce4aa feat(react-components): Added PatternXray component 2023-06-17 13:20:05 +02:00
joostdecock
264a441c35 fix(shared): Check for text attributes before using them 2023-06-11 18:04:28 +02:00
joostdecock
a99f14e7ac chore(react-components): Fix linter warning 2023-06-09 18:19:00 +02:00
joostdecock
f2bfcf81f2 fix(react-component): Removed backed up code 2023-06-08 20:38:02 +02:00
joostdecock
50f7df93bb fix(react-components): Avoid use of dangerouslySetInnerHTML in Defs 2023-06-08 20:29:52 +02:00
Enoch Riese
3503d97fae lint fixes for react-components 2023-06-07 10:06:30 -05:00
Enoch Riese
5905e999a1 remove opinionated changes from react-components 2023-06-06 13:24:20 -05:00
Enoch Riese
15c4201906 cutting layout view 2023-06-06 11:17:14 -05:00
Enoch Riese
b879e23018 movable pattern for print layout 2023-06-05 16:08:58 -05:00
joostdecock
17725ff941 fix(react-components): Paperless grid in Pattern 2023-06-04 17:28:02 +02:00
joostdecock
57457ee841 chore(react-components): Tweaks to pattern 2023-06-04 16:52:20 +02:00
joostdecock
4075e35641 wip(shared): Points support in Inspector 2023-06-02 18:21:40 +02:00
joostdecock
e146e55c69 feat(react-components): Added Pattern component 2023-06-01 18:28:22 +02:00