Repository navigation
fix(author): a Drag and Drop's boxes are laid out by the build (#295) - #296
Conversation
…ts type file says so (#295)
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…, rows of other widths, the label and width wording)
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…idth and growth wording (#295)
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
You’re at about 90% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Closes #295.
A Drag and Drop built in a chat played with its words stacked over each other and over the zones. Its boxes are placed by
xandyin percent of the task and sized bywidthandheightin em, and a model wrote all four as percent. Now the build lays the boxes out itself, and a model is told to leave the four out.What changes
dragQuestioninlib/types.mjs). Words go in centred rows, shared evenly (3 and 2, not 4 and 1), each as wide as its text. Zones go below, as wide as their labels and tall enough for the words right in them. The task grows as tall as they need. Boxes placed by hand keep their places, and the rest go below them. The sizes come from the player: per-character text widths, a draggable's 1.55 by 0.75 em of handle and padding, and a zone's label drawn 1.25 em above its box, all measured in H5P.DragQuestion 1.15.showLabelthe source writes is kept.H5P.DragQuestion.md, says to leave them out, and when to write them: zones on a picture. The skill's table lists the type.size.field: "background", the dimensions widget's own setting, which the content check removes. Every Drag and Drop with no size written carried it.Tested
showLabel: falsestays; that the reported content gets one note; and the picture note. Typecheck andpnpm commentspass, andsync:skill --checkfinds every type file current.apps/skills).Summary by cubic
Fixes Drag and Drop layout so generated boxes no longer stack on each other or the task's zones. The build now places unplaced words and zones itself in rows, growing the task to fit, instead of relying on the model's percent-based coordinates.
ywritten in percent stays in the written pixels, not the grown task's height.x,y,width, andheightout unless placing zones on a picture, via the newH5P.DragQuestion.mdtype file.size.field.Written for commit 520913a. Summary will update on new commits.