Skip to content

feat: text/markdown cell improvements - #455

Merged
dmitriy-kostianetskiy merged 7 commits into
mainfrom
copilot/fix-text-markdown-cell
Mar 12, 2026
Merged

dmitriy-kostianetskiy merged 7 commits into
mainfrom
copilot/fix-text-markdown-cell

Conversation

Copilot AI commented Mar 11, 2026 •

Copy link
Copy Markdown
Contributor

This pull request introduces improvements to cell rendering and editing behavior in the notebook and cells packages. The main changes add support for optionally hiding cell headers (now via a showHeader flag), streamline the editing UX for text cells, and update ESLint configurations for better TypeScript support.

Cell rendering and header customization:

  • Added a showHeader prop (default true) to the CellContainer components in both notebook and cells packages, allowing cells to be rendered without a header. When showHeader is false, cell controls (delete, move) are shown in a floating toolbar that remains visible while the cell is focused. (packages/notebook/src/cells/CellContainer.tsx, packages/cells/src/types.ts, [1] [2] [3] [4]
  • Updated the CellView and cell registry rendering logic to pass the new showHeader prop, enabling flexible cell layouts. (packages/notebook/src/cells/CellView.tsx, packages/notebook/src/cells/CellView.tsxL17-R23)

Text cell editing UX improvements:

  • Removed the header and edit/save button from TextCellContent, switching to a double-click-to-edit model. Editing is now triggered by double-click, and changes are saved on blur or with the Escape key to cancel edits. (packages/cells/src/components/TextCellContent.tsx, [1] [2])

ESLint configuration updates:

  • Changed ESLint configs in both cells and notebook packages to export an array of configs, setting the tsconfigRootDir for improved TypeScript parsing and compatibility. (packages/cells/eslint.config.js, packages/notebook/eslint.config.js, packages/cells/eslint.config.jsL3-R13)

These changes collectively improve cell customization and editing workflows, and ensure proper linting support for TypeScript projects.

DEMO:

Screen.Recording.2026-03-12.at.09.32.11.mov

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…y controls, remove border/bg when not focused

Co-authored-by: dmitriy-kostianetskiy <[email protected]>
@dmitriy-kostianetskiy

Copy link
Copy Markdown
Collaborator

@copilot if text cell is in focus let's also show remove and reorder icons.

add the changes to this PR

Copilot AI commented Mar 11, 2026

Copy link
Copy Markdown
Contributor Author

@dmitriy-kostianetskiy The model claude-sonnet-4.6 is not available for your account. This can happen if the model was disabled by your organization's policy or if your Copilot plan doesn't include access to it.

You can try again without specifying a model (just @copilot) to use the default, or choose a different model from the model picker.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: e4959987-fe75-49c9-b95a-56b2d3252218

@dmitriy-kostianetskiy

Copy link
Copy Markdown
Collaborator

@copilot if text cell is in focus let's also show remove and reorder icons.

add the changes to this PR

Co-authored-by: dmitriy-kostianetskiy <[email protected]>

Copilot AI commented Mar 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot if text cell is in focus let's also show remove and reorder icons.

add the changes to this PR

Done—delete/reorder icons now stay visible whenever a text cell is focused (not just on hover). Change in commit 9cfa621. Screenshot: https://github.com/user-attachments/assets/1b9d6ee5-2202-4338-a44d-9e0c5dd0d162

@dmitriy-kostianetskiy dmitriy-kostianetskiy changed the title [WIP] Fix text/markdown cell improvements feat: text/markdown cell improvements Mar 12, 2026
@dmitriy-kostianetskiy
dmitriy-kostianetskiy marked this pull request as ready for review March 12, 2026 08:29
children?: React.ReactNode;
className?: string;
}> = ({id, header, footer, children, className}) => {
hideHeader?: boolean;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add showHeader instead and default to true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot fix this. add changes to this PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed the prop to showHeader (default true) and updated text cells to pass showHeader: false. Change in commit 11bcd47. Screenshot: https://github.com/user-attachments/assets/1b9d6ee5-2202-4338-a44d-9e0c5dd0d162

@ilyabo ilyabo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, aside from hideHeader => showHeader (we use this in several other places)

Co-authored-by: dmitriy-kostianetskiy <[email protected]>
@dmitriy-kostianetskiy
dmitriy-kostianetskiy merged commit 37b1327 into main Mar 12, 2026
@dmitriy-kostianetskiy
dmitriy-kostianetskiy deleted the copilot/fix-text-markdown-cell branch March 12, 2026 10:57
mihajlo-stojkovic pushed a commit that referenced this pull request Mar 12, 2026
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: dmitriy-kostianetskiy <[email protected]>
Co-authored-by: Dmitriy Kostianetskiy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants