Skip to content

Commit 8edac6e

Browse files
authored
fix: only add borderless css when not published (#3066)
## 📝 Summary <!-- Provide a concise summary of what this pull request is addressing. If this PR fixes any issues, list them here by number (e.g., Fixes #123). --> There is a bad bug when you're in app view, since the borders are removed, so hovering over the cell will cause borders to be re-added. Borderless view is not needed in 'present' or 'view' mode. ## 🔍 Description of Changes <!-- Detail the specific changes made in this pull request. Explain the problem addressed and how it was resolved. If applicable, provide before and after comparisons, screenshots, or any relevant details to help reviewers understand the changes easily. --> ## 📋 Checklist - [X] I have read the [contributor guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md). - [ ] For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on [Discord](https://marimo.io/discord?ref=pr), or the community [discussions](https://github.com/marimo-team/marimo/discussions) (Please provide a link if applicable). - [ ] I have added tests for the changes made. - [X] I have run the code and verified that it works as expected. ## 📜 Reviewers <!-- Tag potential reviewers from the community or maintainers who might be interested in reviewing this pull request. Your PR will be reviewed more quickly if you can figure out the right person to tag with @ --> @akshayka OR @mscolnick
1 parent 2de1e49 commit 8edac6e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

frontend/src/components/editor/Cell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ const CellComponent = (
421421
stopped: stopped,
422422
disabled: cellConfig.disabled,
423423
stale: status === "disabled-transitively",
424-
borderless: isMarkdownCodeHidden,
424+
borderless: isMarkdownCodeHidden && editing,
425425
});
426426

427427
const HTMLId = HTMLCellId.create(cellId);

frontend/src/components/editor/renderers/vertical-layout/vertical-layout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,13 @@ const VerticalCell = memo(
259259
const kioskFull = kiosk && mode !== "present";
260260

261261
const isPureMarkdown = new MarkdownLanguageAdapter().isSupported(code);
262+
const published = !showCode && !kioskFull;
262263
const className = cn("Cell", "hover-actions-parent empty:invisible", {
263-
published: !showCode && !kioskFull,
264+
published: published,
264265
interactive: mode === "edit",
265266
"has-error": errored,
266267
stopped: stopped,
267-
borderless: isPureMarkdown,
268+
borderless: isPureMarkdown && !published,
268269
});
269270

270271
const HTMLId = HTMLCellId.create(cellId);

0 commit comments

Comments
 (0)