Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespaced Attributes #657

Merged
merged 2 commits into from Apr 25, 2020
Merged

Namespaced Attributes #657

merged 2 commits into from Apr 25, 2020

Conversation

kaalleen
Copy link
Collaborator

@kaalleen kaalleen commented Apr 13, 2020

This is to solve issues #201 and #480

@lexelby
Copy link
Member

lexelby commented Apr 13, 2020

That's so clever, using the attribute namespace transition as a way to handle the underlay default changing!

What happens if they had enabled underlay previously though? I think this would set it to false?

@kaalleen
Copy link
Collaborator Author

kaalleen commented Apr 13, 2020

Ops, so right. I've corrected it.

If no other "embroider_" attribute has been set on the object, fill_underlay will switch it's value from False to True - which, I think it won't be too bad. Also the fill_underlay param will be set on other non-fill-elements. I don't think it's much of a problem though...?!?

@lexelby
Copy link
Member

lexelby commented Apr 13, 2020

Ah, that makes much more sense, thank you!

This is a pretty good time to look over all the other params. Any more defaults we should change?

@lexelby
Copy link
Member

lexelby commented Apr 18, 2020

Also the fill_underlay param will be set on other non-fill-elements. I don't think it's much of a problem though...?!?

Nope, shouldn't be a problem at all.

@lexelby
Copy link
Member

lexelby commented Apr 18, 2020

This looks great so far!

I wonder, do we really need INKSTITCH_ATTRIBS? I'm worried that we'll forget to add new attributes to the list.

I think maybe you created that so that we're not constantly calling addNS over and over again. That may be a good use for a function with the @cache decorator instead?

@kaalleen
Copy link
Collaborator Author

kaalleen commented Apr 25, 2020

Hm, I don't know. I don't think it is possible to forget adding them ... you will get an error if you do and test it only once :)

At first I was annoyed by having to add all the attributes into a list and thought that there must be a better solution for it (like the one you suggested). On the other hand I thought it delivers a good overview of the attributes we have and also we keep the tags all in the same place. I haven't tested your suggested solution yet. Maybe it's the way to go, but I don't think it's all bad to have the ATTRIBS list.

I wouldn't know about any other default setting that need a change.
Until now we have no complaints...

@lexelby
Copy link
Member

lexelby commented Apr 25, 2020

Good argument! You've won me over :)

@kaalleen
Copy link
Collaborator Author

kaalleen commented Apr 25, 2020

Yay, I'll merge it then :)

@kaalleen kaalleen merged commit 3199050 into master Apr 25, 2020
2 of 4 checks passed
@kaalleen kaalleen deleted the kaalleen/namespaced-attributes branch Apr 25, 2020
kaalleen added a commit that referenced this issue May 16, 2020
## New Features

- New Simulator (#531)
- Import Threadlist (#666)
- Export Threadlist in ZIP file (#664)
- Option to include SVG in ZIP file (#648)
- Break Apart and Retain Holes (#653)
- G-Code: option to alternate z-value (#659)
- New Stitch Plan Extension (#640)
- Optionally enable/disable ties (lock down stitches) (#619)
- Multiple Fill Underlays
- Additional Fonts (#683):
    * Geneva
    * DejaVu

## Improvements

- Better Algorithm for Satin Columns (#607)
- Better Algorithm for Fill Stitches (#606)
- Convert to Satin with Loops (#608)
- Adding '@ #' to all fonts (#680)

## Bug Fixes

- Fix Issue with Troubleshoot Pointer Position (#696)
- Inherit Styles (#673)
- Fix Color Palette Issues (#660)
- Preserve Aspect Ratio (#646)
- and more

## Under the Hood

- Namespaced Attributes (#657)
- Remove stub.py (#629)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants