1
0
Fork 0
Commit graph

20 commits

Author SHA1 Message Date
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
cb106578b3 feat(core): Better support for macro removal an node id tracking 2023-10-18 16:00:15 +02:00
joostdecock
18042c8f3d feat(core): Return from macros 2023-09-28 13:26: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
d9e566ad12 fix(plugin-annotations): Force rendering points for title 2023-09-13 11:48:34 +02:00
joostdecock
b43145ac89 chore(plugin-annotations): No space between v and version 2023-09-08 10:35:53 +02:00
joostdecock
4528e1bc88 feat(shared): Added support for flags 2023-09-07 10:29:19 +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
637b2ecaba feat(plugin-annotations): Check complete in title macro 2023-09-05 12:05:47 +02:00
joostdecock
e60362935c feat(plugin-annotations): Allow overriding classes, set name/nr in store 2023-09-05 11:18:19 +02:00
joostdecock
577af2df6b feat(plugin-anotations): Keep macro ids in store for easy removal 2023-09-05 11:05:14 +02:00
Joost De Cock
2a6652a67b
Merge pull request #3989 from BenJamesBen/title-macro-align
enhancement(title): Add alignment property
2023-05-22 09:48:18 +02:00
Benjamin F
e972c72793 enhancement(title): Add alignment property 2023-05-04 15:24:48 -07:00
Benjamin F
39ad4bbef2 fix(plugin-title): Supress warning message if cutlist not defined 2023-05-03 19:11:21 -07:00
Enoch Riese
46b167ea34 chore (plugin-annotations) add cutlist title support back in 2023-04-20 10:23:27 -04:00
joostdecock
182c4f4d64 chore: Linter warnings 2023-04-15 15:31:25 +02:00
joostdecock
d0447c0f77 breaking: New annotation plugin replaces others
This wraps up the initial work on a new annotations plugin that replaces
other plugins that provide annotations. As a result, the following
plugins are now no longer available:

- plugin-banner
- plugin-bartack
- plugin-buttons
- plugin-cutonfold
- plugin-dimension
- plugin-grainine
- plugin-logo
- plugin-notches
- plugin-scalebox
- plugin-title

The new plugin-annotations package provides all these plugins used to
provide. In addition, it also includes the following new macros:

- bannerbox
- pleat
- sewTogether
2023-04-15 15:14:56 +02:00