Skip to content

Commit 2dbfe78

Browse files
authored
Table - add embed option (#442)
* add embed, fix width/overflow issue * 1.2.11
1 parent 8765812 commit 2dbfe78

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@types/mozilla-readability": "^0.2.0",
2424
"@types/turndown": "^5.0.1"
2525
},
26-
"version": "1.2.10",
26+
"version": "1.2.11",
2727
"samepage": {
2828
"extends": "node_modules/roamjs-components/package.json"
2929
}

src/features/table.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,14 @@ const Configuration = ({
250250
))}
251251
</div>
252252

253-
{/* fix width issue when editing embed block */}
254-
{/* <RadioGroup
253+
<RadioGroup
255254
disabled={hasOptions} // TODO: allow edit
256255
onChange={(e) => setInitialView((e.target as HTMLInputElement).value)}
257256
selectedValue={initialView}
258257
>
259258
<Radio label="Basic Text" value="plain" />
260259
<Radio label="Embed" value="embed" />
261-
</RadioGroup> */}
260+
</RadioGroup>
262261

263262
<div className="text-right mt-4">
264263
<Button
@@ -340,7 +339,7 @@ const DisplayTable = ({ blockUid }: DisplayTableProps) => {
340339
settings.rowsNode.children.map((c) => (
341340
<tr key={c.uid} className={`wbt-row-${sanitizeClassName(c.text)}`}>
342341
{c.children.map((c) => (
343-
<td key={c.uid}>
342+
<td key={c.uid} className="overflow-hidden">
344343
{settings.setView === "embed" ? (
345344
<CellEmbed uid={c.uid} />
346345
) : (
@@ -416,6 +415,9 @@ export const toggleFeature = (flag: boolean) => {
416415
pointer-events: auto;
417416
width: 100%;
418417
}
418+
.roamjs-workbench-table .rm-block-separator {
419+
display: none;
420+
}
419421
`);
420422
unloads.add(() => tableButtonObserver.disconnect());
421423
} else {

0 commit comments

Comments
 (0)