EDITORCLASSBLOGLOGINOpkleOpkle, the Editor for CreatorsInfiniteExpression,In New Forms.New ContentOpkle makes an editor so anyone can build for the web without code, and share it anywhere.Blending text and screen, we build tools that make the web about imagination, not code.Building Opkle Editor: A Spreadsheet for Table Imagesdev17Building Opkle Editor: One Dataset as Table, Board, Calendardev18Building Opkle Editor: A Publisher for Books on the Webdev19Building Opkle Editor: Publishing the Edit View to the Webdev20Building Opkle Editor: How the EPUB Editor Ties It Togetherdev211213141516...18 Building Opkle Editor: One Dataset as Table, Board, Calendar

Once spreadsheet editing was done, what remained was deciding what results to show that data as. With typed columns and stable records in place, there's no reason to look at the same relation only as a table. A categorical attribute can become the partition of a kanban board, and a date interval can become the time axis of a calendar. A screen isn't the data; it's a query applied to the data.

I didn't build the grid, the kanban board and the calendar as separate documents. I applied selection, grouping, ordering and projection to a single base relation to produce different views. Whichever screen a value is changed on, the change goes back to the base tuple, and the other views reinterpret the same revision. It was more accurate to see this as closed operations of relational algebra than as copying data.

I didn't produce the output by capturing the screen, either. A separate scene graph is built from the view's semantic structure, and vector and raster output are the result of sampling that graph. Even when the screen size and theme change, the original relation stays the same and only the layout constraints change. This is how the table editor grew from a data entry tool into a maker of visual material for publishing.

Relational projection

A view is the combination of a projection `π` that picks only the needed columns from one relation T, a selection `σ` that picks the rows meeting a condition, grouping by category, and an ordering `τ`. The grid is a projection close to T, while the kanban board and the calendar are the results of stronger transformations. As long as a view doesn't copy the base tuples, there's no need to reconcile the consistency of several screens separately.

A view isn't a completely stateless function, though. Which attribute to use as the axis, which properties to display and the order the user set are all query parameters. Keeping these as a declarative query distinct from the base data lets me recompute the same view from the same relation. The screen DOM is only a temporary materialization of the query result.

A materialized view is fast to read but has to be updated when the base changes. I could recompute the whole view on every change, or use incremental view maintenance that applies only the delta. By computing algebraically how inserts and deletes affect grouping counts and sort order, I can update only the changed parts even on a large relation.

What mattered was that an edit started from any screen gets translated into a transaction on the base relation. If card moves and schedule changes were stored as separate state, they would conflict with the grid, but reduced to attribute updates on the base tuple, every view reads the same revision. “One table, many views” was a principle about the oneness of data more than about UI composition.

Identity and Permutation

The positions of rows and columns change under permutations, but identity has to be preserved. n ordered items can be rearranged by a permutation in the symmetric group `S_n`, and if a view uses the coordinate index as the identity, a single permutation changes the meaning of every reference. Separating an object from its current position was the foundation of multiple views.

A tuple in a relation can have a surrogate identity, and attributes can be handled as symbols independent of display order. Sorting is merely a total order defined over a set of identities. Inserting a new item in the middle changes the order relation but not the equivalence of existing identities. That is why a database key and a screen coordinate are different things.

A user's ordering can carry a stronger meaning than a mere sort result. A record the user created has to exist even if its values are empty, and the order in a particular view may not be recomputable from base values alone. Separating the existence set from the order relation lets me account for empty records and user-defined order together.

For undo and migration, too, what has to be preserved is not numeric coordinates but this identity and these relations. If the correspondence of objects before and after a permutation holds, the attributes and tuples a view refers to remain stable. The principle of not using screen coordinates as permanent identifiers meant the same thing in every editing system, not just in tables.

Quotient and Order

A kanban board is a projection in which a categorical function `g:R->K` divides the row set R into a set of lanes K. If rows with the same g value are regarded as equivalent, then `r1 ~ r2 iff g(r1)=g(r2)`, and the lanes become the equivalence classes of the quotient set `R/~`. Values that belong to no category also have to be treated as one explicit class, so that the partition covers all of R.

Multiple categories are closer to an incidence relation than an equivalence relation. A card can belong to several lanes at once, so this becomes a bipartite graph with `M ⊆ R × K`. Moving a card is an operation that adds or removes edges, and whether to keep the edges of other categories or replace them all depends on the meaning of the command.

The order of cards within a lane sometimes follows from the values automatically, but it can also be a total order set by the user. If the order is stored as integer indices, every later item has to change on a mid-list insertion. One could think of fractional indexing, which assigns an order key between two neighbors, or a linked order, but they bring density of the key space and rebalancing costs. Even order itself was a data structure.

Drag and drop translates a screen position into this relation update. It finds the nearest order interval from the pointer's continuous coordinates, and updates the lane membership and the order in a single transaction. If only the membership changed first, the card would briefly vanish, and if only the order changed, it would corrupt the order of another lane. One UI gesture was an operation that changes the quotient and the order relation at once.

The properties visible on a card are a projection of the base tuple. There is no need to build the kanban board as a separate document model. When every action that edits the title, status or date reduces to an update of the original tuple, the grid and the calendar read the same values from the same revision right away. The kanban board became a structured query over the relation, not a board that duplicates data.

Interval algebra

In a calendar, an event is not a point but an interval on the time axis. With a start s and an end e, defining it as a half-open interval like `[s,e)` means a one-day event and an event starting the next day don't overlap at the boundary. Treating date-only values and time-zoned instants as the same kind of number can make the meaning shaky under daylight saving and locale, so the time domain has to be decided first.

The relation between two intervals is richer than merely whether they overlap. Allen's interval algebra has basic relations such as before, meets, overlaps, during, starts and finishes. To place events into lanes on a monthly view, intervals that overlap each other can't use the same lane, and the minimum number of lanes can be thought of as interval graph coloring.

Moving an event is an operation that applies the translation `T_Δ([s,e))=[s+Δ,e+Δ)` to the interval. A move that has to keep the length and a resize that changes one boundary are different transformations. The invariant that the end can't come before the start has to be kept, and the algebra of Δ also differs depending on whether the calendar unit is day or time. A drag in the UI had to be translated into an exact function over a time interval.

Color and title are projections independent of the interval geometry. Per-row overrides, category styles and global defaults can pick the nearest definition like a cascade. When the screen and the output use the same style resolution, the same event relation yields the same visual meaning.

The calendar wasn't a separate event database either. The source of an interval is the base tuple, and edits go back as updates to the date attributes. Even when several events share the same title, identity lives in the tuple, not in the string. On the surface it's a card on a time axis, but computation and history stayed as transactions on the original relation.

Concurrent materialization

View materialization is a combination of asynchronous querying and rendering. A slow computation started at revision r can finish later than a fast computation at revision r+1. Completion time is not evidence of freshness, so a result has to carry the source revision and query parameters it came from. A result that doesn't match the current revision can't be committed.

This is the same as optimistic concurrency control. A job builds an independent candidate scene without locking the shared screen, and at the final commit it checks whether the revision it read is still valid. If it is, the scene is swapped in all at once; if not, the candidate is discarded. The user sees only either the previous complete screen or the new complete screen, never an intermediate scene.

When rendering needs actual viewport measurement, the compute phase and the commit phase can still be kept apart. I prepare the structure and styles first, and evaluate only the minimal part that needs live geometry right before the commit. When measurement alternates with DOM writes, the cost of forced layout grows, so batching reads and writes separately was important.

When leaving a view, the resources of the materialized scene also reach the end of their lifetime. Resources registered at runtime, such as event listeners, external resource handles and observers, aren't all cleaned up automatically just because the garbage collector removes the screen tree. I treated the view lifecycle as a resource scope in which acquisition and release come in pairs.

However the base relation changes, the current view applies the same query to the new revision. The UIs never call each other directly; they meet through a revisioned dataflow. Even with many projections attached to one piece of data, the structure keeps lifecycle and asynchronous completion order from interfering with each other.

Scene graph rendering

For table images, it was more accurate to build a fresh scene graph from the relation than to capture the editing screen. The editing UI is mixed with state that has no meaning in the output, such as selection, inputs and scroll. The output graph should have only primitives that carry document meaning, such as cell backgrounds, text, images and borders. Once source and projection are separated, viewport and zoom no longer change the result.

The prefix sums of row heights and column widths turn grid coordinates into continuous geometry. The start of column j is `x_j = Σ_(k

The order of the scene graph follows the painter's algorithm. Because a primitive drawn later is composited on top of earlier results, the order of background, fill, content and edge decides the visual meaning. With transparency it is not a simple set but an ordered sequence, and a clip acts as a state that restricts the domain of subsequent primitives.

Thin lines are delicate between continuous geometry and the pixel grid. Depending on whether the center of a line falls on a half pixel, which way the stroke spreads, and the output scale, one line can straddle two pixels. I have to keep exact edges in vector coordinates and take the device transform and stroke alignment into account at the rasterization stage.

The preview and the output observe the same scene graph through different cameras. Zoom and pan change only the view transform, not the graph. If the scene is rebuilt only when the content changes and the viewing magnification is left alone, the editing screen and the published result can share a single geometric model.

Shaping geometry

The width of cell text isn't proportional to the number of characters. A Unicode sequence goes through shaping to become a glyph sequence, and ligatures, kerning and script-specific substitution determine the actual advance. Even the same character can produce a different glyph and position depending on the font face, language and direction. Typography geometry had to start from the shaping result, not from the string length.

The width of a line is the sum of glyph advances and positioning adjustments. Line-break candidates have to follow each language's line breaking class and grapheme boundaries, and the rules differ among Korean, CJK and whitespace-based languages. Cutting between arbitrary code units can break combining characters and emoji sequences. Text segmentation was a linguistic step that comes before geometry.

Row height is determined by the sum of line boxes plus padding, but the actual ink bounds can extend beyond the line box. To avoid clipping italic overhang, diacritics and underlines, advance geometry and visual geometry have to be distinguished. In a merged region several rows share their heights, so how one cell's required height gets distributed among the rows becomes its own constraint.

If the preview and the final output use different text engines, line breaks can differ even at the same font size. So the shared inputs, namely the font file, shaping features, language and metrics, have to be fixed, and the results of the two renderers compared at the level of glyph positions. Equality of plain CSS strings doesn't guarantee equality of typography.

An ellipsis is likewise a search problem that exploits the monotonicity of prefix width, not a trick of removing characters one at a time until they fit the remaining width. I find the largest boundary at which the shaped prefix width stays within the limit, taking the advance of the ellipsis glyph into account. By using only correct boundaries as candidates, even across multiple writing systems and combining sequences, the text inside tables was typeset stably.

Planar Edges and Closure

Grid lines aren't independent rectangles per cell but the shared edges of a planar graph. Two adjacent faces own the same edge, so only one stroke should be decided for it. If each cell draws its own border separately, the same edge is duplicated and two styles conflict. It was more accurate to build the topology first and perform edge style resolution once.

Merging is a graph contraction that collapses several faces into one larger face. The internal edges are removed and only the outer boundary remains. By taking the perimeter of the rectangular merged region and applying the style to its outer edges, the interior lines of the pre-merge cells never show up in the output. Table border problems were explained more simply by graph topology than by CSS exceptions.

A stroke spreads to both sides along the center of the path, so the geometric boundary and the visual boundary differ. An outline of width t relates to the Minkowski sum of the original region and extends outward by `t/2`. To fit all of it inside the output box, I have to enlarge the clip or offset the path inward. The problem of the viewBox being cut off depending on line thickness can also be solved with the same geometry.

For an output scene to be an independent document, the transitive closure of the assets it references must come along. If the scene needs image A, A needs color profile B, and the text needs font C, then every vertex reachable from the root must be collected. It was a problem of computing the closure of a dependency graph rather than a trick of inlining a few files.

I separated asset names from runtime addresses as well. A handle from the current session has no meaning in persistent output, and references inside a scene need an identity that can be resolved again within the package. By checking closure and referential integrity before output, I got a self-contained scene in which no images or fonts go missing.

Responsive partition

If a wide table is simply shrunk onto a small screen, the text and the columns become too small to read together. A responsive table wasn't a scaling problem but a partition problem over the column set. A key column that identifies meaning can be repeated in each piece, and the remaining attributes divided into several blocks stacked vertically.

When the column set C is divided into k order-preserving subsets, the width of each block and the height of the whole stack change. If the target aspect ratio is ρ, the cost of a candidate partition P can be built from `|W(P)/H(P)-ρ|`, the imbalance between blocks and the cost of repeated columns. It becomes an optimization that searches k and the boundary positions together to pick the partition that fits the screen.

Semantic relationships between columns can go into the cost too. Values that are read together cost less when placed in the same block, and a very wide column may be better off alone. This can be solved with sequence-partition dynamic programming. By storing the minimum cost of splitting up to a prefix into j blocks, I don't have to enumerate every possible division.

Theme conversion isn't simply inverting colors. I have to distinguish the semantic colors the user specified from the system defaults, and preserve the relative luminance and contrast between background and foreground. Computing the contrast ratio from relative luminance rather than sRGB channel values, and mapping only the default colors to another palette, preserves the design.

Every variant must come from the same relation and the same scene builder. Data, typography and asset closure are shared, and only the viewport constraint and the palette change as parameters. Without building a separate condensed renderer, the responsive output kept the meaning and style of the original table.

Sampling pipeline

Turning a vector scene into a raster image is sampling continuous shapes onto a finite grid. Once the output width and height are set, what area of the scene each pixel represents is determined, and naive point sampling can produce aliasing on thin lines and small text. It is more accurate to integrate the color over the pixel footprint, or to supersample sufficiently and then downscale with a low-pass filter.

A transparent background and an opaque output are also different compositions. An output that preserves alpha can record premultiplied color and coverage together, but an opaque format has to be composited first against a background color B with `C = αF + (1-α)B`. Compositing directly in gamma-encoded channels changes the brightness at edges, so I compute in linear-light space where possible.

Splitting a vertically long scene into several images is pagination of the row sequence. Each piece shares the same column geometry and styles, and the header becomes a repeated template. With the maximum height and semantic units as constraints, dividing the row intervals lets a single-piece output and a split output use the same scene builder.

The kanban board and the calendar also build their scene graphs from their own relational structure, not from the screen DOM. The kanban board projects quotient classes and order into lane geometry, and the calendar projects the result of interval graph coloring onto a time grid. Since the screen and the output use the same base relation and the same mathematical projection, there are no differences caused by the capture environment.

A final asset isn't finished with just the completed result. Only if it records which relation revision, query, viewport and palette it was generated from can it be edited and regenerated later. What mattered in the publishing pipeline was keeping the semantic link between result and source, more than how a large binary gets moved around.

Round-trip equivalence

Even when a raster result goes into a publication, the editing source behind it has to remain as a relation and a query. An image's pixels are a projection computed at a particular revision and are not equivalent to the source document. Linking the result and its provenance lets the reader see a stable picture while the maker can return to the original data.

I defined the correctness of the round trip by semantic equivalence rather than byte identity. If the original state x is sent through a render R and then through an operation O that opens the editing source again, it's impossible for `O(R(x))` to restore x completely, because rasterization loses information. Instead, I let the resulting asset point to x through a separate provenance edge, so I find the source directly rather than guessing an inverse transformation.

When applying the result of a new revision to an existing layout object, I separate identity from value. The position on the page and the user's placement stay on the identity side, while the new scene's aspect ratio and pixels are replaced as the value. The replacement has to be applied atomically after the completed candidate has been verified, so that the previous healthy result doesn't disappear in a mid-way failure.

I reduced both actions performed by a person in the UI and automated input to the same typed commands. Every command that changes the base relation passes through types, invariants and transaction boundaries, and the views and outputs materialize the new revision again. Since I didn't build a separate modification path for each input method, the same mathematical contract held.

I repeatedly reviewed tuple changes among the grid, kanban board and calendar, quotient and interval transformations, consecutive asynchronous materializations, multiple viewports and palettes, font and image closure, long-table partitions and source round trips. I confirmed that the data on screen, each scene output and the results placed into publications all point to the same revision. The table production system, which turns one table's data into several publishing formats and then returns to editing the source, was fully implemented and stabilized.

PreviousListNext
CopyrightAll design outputs and videos on this website are copyrighted by Abstract Cloud and protected under copyright law and related regulations. All content, including web, video, text, cover, and interior designs, is the property of the copyright holder. Unauthorized reproduction, distribution, creation of derivative works, or online sharing without prior consent is strictly prohibited. Violations may result in civil and criminal liability under copyright law. Legitimate purchases and copyright protection preserve creators' rights and fuel better works in return.Copyright: Abstract Cloud | CEO: Bae Changkyu
© Abstract Cloud. All Rights Reserved.
HOMEFAQTerms of ServicePrivacy PolicyRefund PolicySeller Informationhelp@opkle.app
+82 10-2747-3403
Business Name :Abstract Cloud  |  CEO :Bae ChangkyuBusiness Registration Number :249-74-00533E-commerce Registration Number :2025-Uijeongbu Songsan-0634Address :402, 108-dong, 49 Buyong-ro, Uijeongbu-si, Gyeonggi-do, Republic of KoreaAll content, designs, and source code on this website
are copyrighted by Opkle.
Opkle