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

[WARD] assistant branch - do not merge #52

Draft
wants to merge 51 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
19d02ce
temporarillly disable button detection
softmarshmallow Oct 10, 2021
4a0c277
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Oct 11, 2021
baa2f63
fallbacks `scale` to `min`
softmarshmallow Oct 11, 2021
18da581
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Oct 11, 2021
699286d
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Oct 26, 2021
88051de
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Oct 26, 2021
d3b05ac
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Dec 1, 2021
2594028
bump coli
softmarshmallow Dec 1, 2021
aba8aad
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Dec 2, 2021
5219db1
merge
softmarshmallow Jan 6, 2022
5a4bb8f
merge
softmarshmallow Jan 6, 2022
31939e8
Merge branch 'staging' of https://github.com/gridaco/designto-code in…
softmarshmallow Jan 10, 2022
2de59ae
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Mar 2, 2022
d638708
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 2, 2022
80efc1c
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 2, 2022
8390612
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Mar 14, 2022
188cab9
merge from staging
softmarshmallow Mar 14, 2022
5cfacb4
fix constraint handling for plugin version, boolean operation handling
softmarshmallow Mar 14, 2022
7d85aa6
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 14, 2022
a68a6b6
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 14, 2022
7f5694e
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 15, 2022
1a6dc30
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Mar 17, 2022
618e49a
fix constraint reference error on plugin ver
softmarshmallow Mar 17, 2022
2c69d57
Merge branch 'support-text-field' of https://github.com/bridgedxyz/de…
softmarshmallow Mar 18, 2022
eb2646f
Merge branch 'support-text-field' of https://github.com/bridgedxyz/de…
softmarshmallow Mar 18, 2022
b954858
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 18, 2022
16eff75
Merge branch 'support-slider' of https://github.com/bridgedxyz/design…
softmarshmallow Mar 21, 2022
657e275
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 21, 2022
58a96ae
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 22, 2022
5060316
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 24, 2022
2603b1a
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 24, 2022
df9871f
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 24, 2022
8f9cca5
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 28, 2022
f72ff11
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Mar 28, 2022
3113f7d
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Mar 28, 2022
44ae0ba
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 28, 2022
2ec79df
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 29, 2022
e425335
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 29, 2022
87c8b9d
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 29, 2022
2c12507
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 29, 2022
87c93be
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Mar 29, 2022
89c9b3d
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Mar 29, 2022
e202200
Merge branch 'main' of https://github.com/bridgedxyz/design-to-code i…
softmarshmallow Mar 29, 2022
544b770
Merge branch 'staging' of https://github.com/gridaco/designto-code in…
softmarshmallow Apr 8, 2022
bdd44cc
Merge branch 'staging' of https://github.com/gridaco/designto-code in…
softmarshmallow Apr 8, 2022
e9164fd
Merge branch 'staging' of https://github.com/gridaco/designto-code in…
softmarshmallow Apr 8, 2022
9e64738
Merge branch 'main' of https://github.com/gridaco/designto-code into …
softmarshmallow Apr 11, 2022
ae69761
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Apr 29, 2022
2d2dce4
Merge branch 'staging' of https://github.com/bridgedxyz/design-to-cod…
softmarshmallow Apr 29, 2022
1c74f8f
Merge branch 'main' of https://github.com/gridaco/code into for-assis…
softmarshmallow Mar 11, 2023
ca4ea08
Merge branch 'main' of https://github.com/gridaco/code into for-assis…
softmarshmallow Mar 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions packages/designto-token/token-layout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ function stackChild({
height: _unwrappedChild.height,
};

const _l = ogchild.x;
const _r = container.width - (ogchild.x + ogchild.width);
const _t = ogchild.y;
const _b = container.height - (ogchild.y + ogchild.height);

/**
* "MIN": Left or Top
* "MAX": Right or Bottom
Expand All @@ -313,16 +318,31 @@ function stackChild({
constraint.top = ogchild.y;
// console.error("cannot add constraint to stack: group is not supported");
} else if (!ogchild.constraints) {
console.error(
`${ogchild.toString()} has no constraints. this can happen when node under group item tokenization is incomplete. this is engine's error.`
);
if (ogchild.type == ReflectSceneNodeType.boolean_operation) {
// @platform override. on plugin version, the boolean operation does not have a constraints, just like group.
// TODO: make this recursive, get the root's constraint.
if (ogchild.children[0]?.constraints) {
const res = handlePositioning({
constraints: ogchild.children[0].constraints, // USE THE FIRST CHILD'S CONSTRAINT
pos: { l: _l, t: _t, b: _b, r: _r, x: ogchild.x, y: ogchild.y },
width: ogchild.width,
height: ogchild.height,
containerWidth: container.width,
containerHeight: container.height,
});
constraint = res.constraint;
wh = {
...wh,
...res.wh,
};
}
} else {
console.error(
`${ogchild.toString()} has no constraints. this can happen when node under group item tokenization is incomplete. this is engine's error.`
);
}
// throw `${ogchild.toString()} has no constraints. this can happen when node under group item tokenization is incomplete. this is engine's error.`;
} else {
const _l = ogchild.x;
const _r = container.width - (ogchild.x + ogchild.width);
const _t = ogchild.y;
const _b = container.height - (ogchild.y + ogchild.height);

const res = handlePositioning({
constraints: ogchild.constraints,
pos: { l: _l, t: _t, b: _b, r: _r, x: ogchild.x, y: ogchild.y },
Expand Down