|
| 1 | +--- |
| 2 | +title: Timeline Editing |
| 3 | +description: "What you can edit in the Studio timeline today, how those edits map back to HTML, and the current limitations." |
| 4 | +--- |
| 5 | + |
| 6 | +The Studio timeline lets you edit the parts of a HyperFrames composition that can be persisted cleanly back into source HTML. |
| 7 | + |
| 8 | +It is not a separate project format or hidden binary state. Every supported timeline action updates the same `data-*` attributes and inline styles that your composition already uses. |
| 9 | + |
| 10 | +## What the Timeline Can Do |
| 11 | + |
| 12 | +- **Move clips in time** — drag a clip horizontally to update `data-start` |
| 13 | +- **Move clips between rows** — drag a clip vertically to update `data-track-index` |
| 14 | +- **Change visual stacking** — top timeline rows render above lower rows, and that ordering is persisted back into inline `z-index` |
| 15 | +- **Trim the end of a clip** — drag the right handle to reduce `data-duration` |
| 16 | +- **Trim the start of media clips** — drag the left handle on clips backed by media offsets to advance the clip start and playback offset together |
| 17 | + |
| 18 | +## How Timeline Edits Map To Source |
| 19 | + |
| 20 | +The timeline works directly against your HTML: |
| 21 | + |
| 22 | +- horizontal move updates `data-start` |
| 23 | +- vertical move updates `data-track-index` |
| 24 | +- right trim updates `data-duration` |
| 25 | +- media left trim updates `data-start` and `data-media-start` or `data-playback-start` |
| 26 | +- changing row order also updates inline `z-index` so the preview matches the timeline |
| 27 | + |
| 28 | +This means timeline editing stays inspectable and versionable. If you open the file after a move or trim, you can see the exact attributes that changed. |
| 29 | + |
| 30 | +## Current Editing Model By Clip Type |
| 31 | + |
| 32 | +### Generic motion / DOM clips |
| 33 | + |
| 34 | +Examples: |
| 35 | +- `div` |
| 36 | +- `section` |
| 37 | +- `aside` |
| 38 | +- GSAP-driven cards, overlays, and text blocks |
| 39 | + |
| 40 | +Supported: |
| 41 | +- move the clip later or earlier on the timeline |
| 42 | +- move the clip to another row |
| 43 | +- trim the end of the clip |
| 44 | + |
| 45 | +Not supported yet: |
| 46 | +- true front trim that removes the beginning of the animation itself |
| 47 | + |
| 48 | +### Media clips |
| 49 | + |
| 50 | +Examples: |
| 51 | +- `video` |
| 52 | +- `audio` |
| 53 | +- wrappers backed by `data-media-start` / `data-playback-start` |
| 54 | + |
| 55 | +Supported: |
| 56 | +- move the clip later or earlier on the timeline |
| 57 | +- move the clip to another row |
| 58 | +- trim the end of the clip |
| 59 | +- trim the start of the media content itself |
| 60 | + |
| 61 | +## Why Start Trim Is Media-Only |
| 62 | + |
| 63 | +Media clips have a real content-offset model: |
| 64 | + |
| 65 | +- `data-media-start` |
| 66 | +- `data-playback-start` |
| 67 | + |
| 68 | +Those attributes let the Studio say: |
| 69 | + |
| 70 | +> Start this clip later on the timeline, and also start reading the media later inside the source. |
| 71 | +
|
| 72 | +Generic motion clips do not have an equivalent playback-offset model yet. For a GSAP-driven `section` or `div`, the Studio can: |
| 73 | + |
| 74 | +- move the whole clip later by changing `data-start` |
| 75 | +- shorten its visible window by changing `data-duration` |
| 76 | + |
| 77 | +But it cannot yet say: |
| 78 | + |
| 79 | +> Start this animation halfway through its timeline. |
| 80 | +
|
| 81 | +That is why generic motion clips do **not** show an interactive left trim handle. The control is hidden instead of implying behavior the runtime cannot currently represent truthfully. |
| 82 | + |
| 83 | +<Note> |
| 84 | + A useful mental model is: **move** changes when a clip starts, **right trim** changes when it ends, and **left trim** only appears when the clip can actually skip the beginning of its own content. |
| 85 | +</Note> |
| 86 | + |
| 87 | +## Stacking Rule |
| 88 | + |
| 89 | +The Studio follows the normal timeline-editor convention: |
| 90 | + |
| 91 | +- the visually top row renders on top |
| 92 | +- lower rows render underneath |
| 93 | + |
| 94 | +If you want captions, lower-thirds, or overlays to sit above other content, place them on a visually higher timeline row. |
| 95 | + |
| 96 | +## Current Limitations |
| 97 | + |
| 98 | +- **No true front trim for generic motion clips yet.** |
| 99 | + You can move those clips later in time, but you cannot start their internal animation phase partway through. |
| 100 | +- **Layering is still driven by row order plus persisted inline `z-index`.** |
| 101 | + If a clip already has custom CSS stacking rules outside the Studio flow, keep that in mind when editing manually. |
| 102 | +- **Timeline editing is intentionally scoped.** |
| 103 | + The Studio currently focuses on move and trim behavior. It does not yet expose full split, slip, slide, ripple, or roll editing semantics. |
| 104 | + |
| 105 | +## Best Practices |
| 106 | + |
| 107 | +- Use **move** when you want an element to start later but still play its full animation. |
| 108 | +- Use **right trim** when you want the element to end sooner. |
| 109 | +- Use **media left trim** when you want to remove the beginning of a video or audio clip. |
| 110 | +- Put overlays and captions on visually higher rows so they render above base footage. |
0 commit comments