Skip to content

feat: add prettier-plugin-bootstrap for consistent Bootstrap class ordering#418

Open
pierluigilenoci wants to merge 1 commit into
deepnote:mainfrom
pierluigilenoci:feat/adopt-prettier-plugin-bootstrap
Open

feat: add prettier-plugin-bootstrap for consistent Bootstrap class ordering#418
pierluigilenoci wants to merge 1 commit into
deepnote:mainfrom
pierluigilenoci:feat/adopt-prettier-plugin-bootstrap

Conversation

@pierluigilenoci

@pierluigilenoci pierluigilenoci commented Jun 16, 2026

Copy link
Copy Markdown

Summary

Add prettier-plugin-bootstrap to enforce consistent Bootstrap class ordering across template files.

Benefit

Bootstrap recommends a specific class ordering (layout → spacing → typography → visual). This plugin automatically enforces that ordering during Prettier formatting runs, reducing manual review effort and improving consistency.

Changes

  • package.json: added prettier-plugin-bootstrap@^0.3.1 to devDependencies
  • .prettierrc.cjs: registered plugin in plugins array
  • 6 template files reformatted: data-explorer/index.html, plot/index.html, variable-view/index.html, DataframeRenderer.tsx, Django/Flask test templates

References


Status: draft — awaiting CI

Summary by CodeRabbit

  • Chores

    • Enabled Prettier Bootstrap formatting support by configuring the formatter plugin for consistent HTML/CSS formatting.
  • Style

    • Reformatted HTML templates across multiple webviews (whitespace/indentation and inline CSS/script formatting only; no template content changes).
    • Updated dataframe table styling (layout, borders/padding, and pagination/control-bar alignment).

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

prettier-plugin-bootstrap is added to devDependencies in package.json and registered in .prettierrc.cjs via the plugins array. The plugin's formatting rules are then applied across the codebase: Django and Flask test HTML templates have <body> indentation normalized; the data-explorer, plot, and variable-view webview HTML files have meta tags, <style> blocks, and inline <script> sections reformatted (quote style, indentation, self-closing tags). DataframeRenderer.tsx receives Tailwind class string reordering on the table wrapper, column containers, pagination row, and icon button group.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately describes the main change: adding prettier-plugin-bootstrap for Bootstrap class ordering enforcement.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Updates Docs ✅ Passed PR adds dev tooling (prettier plugin), not a user-facing feature. Development tool configuration changes don't require user documentation updates per the custom check's intent.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx`:
- Around line 143-148: Update the className attribute in the div element (within
the filteredColumns.map function in DataframeRenderer.tsx) by replacing the
older Tailwind utility class `flex-grow-1` with the modern Tailwind v4
convention `grow` to maintain consistency with current best practices.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: aa70c773-7bfe-4aab-94ef-4e32b5589d1d

📥 Commits

Reviewing files that changed from the base of the PR and between ac66c74 and 4fd007e.

📒 Files selected for processing (8)
  • .prettierrc.cjs
  • package.json
  • src/test/testMultiRootWkspc/workspace5/djangoApp/home/templates/index.html
  • src/test/testMultiRootWkspc/workspace5/flaskApp/templates/index.html
  • src/webviews/webview-side/data-explorer/index.html
  • src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx
  • src/webviews/webview-side/plot/index.html
  • src/webviews/webview-side/variable-view/index.html

Comment thread src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx
…dering

Add prettier-plugin-bootstrap@^0.3.1 to devDependencies and .prettierrc.cjs
to enforce consistent Bootstrap class ordering.

Signed-off-by: Pierluigi Lenoci <pierlugi.lenoci@gmail.com>
@pierluigilenoci pierluigilenoci force-pushed the feat/adopt-prettier-plugin-bootstrap branch from 94846a7 to 6895587 Compare June 17, 2026 14:55
@pierluigilenoci pierluigilenoci marked this pull request as ready for review June 17, 2026 14:56
@pierluigilenoci pierluigilenoci requested a review from a team as a code owner June 17, 2026 14:56
@pierluigilenoci

Copy link
Copy Markdown
Author

Hi @DonJayamanne, @rchiodo — this PR is ready for review. Would you be willing to take a look? Thank you!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx (1)

141-231: ⚠️ Potential issue | 🔴 Critical

prettier-plugin-bootstrap is incompatible with Tailwind CSS and should not be used for this project.

The project uses prettier-plugin-bootstrap (globally configured) on Tailwind CSS codebases. Bootstrap and Tailwind class ordering plugins are incompatible—they apply conflicting sorting logic and should not be used together. Since DataframeRenderer and other webview files use Tailwind, either:

  1. Replace prettier-plugin-bootstrap with prettier-plugin-tailwindcss, or
  2. Remove Prettier class sorting entirely and manage manually

Verify no styling regressions occur with current plugin, then address the plugin mismatch.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx` around
lines 141 - 231, The prettier configuration is using prettier-plugin-bootstrap
which conflicts with the Tailwind CSS classes used throughout
DataframeRenderer.tsx and other webview components. Update the Prettier
configuration file (likely .prettierrc or similar) to replace the
prettier-plugin-bootstrap plugin with prettier-plugin-tailwindcss, which
provides correct class ordering for Tailwind utilities. Verify that the class
names in the component (such as the border, flex, and spacing utilities in the
column header and pagination sections) are properly sorted after making this
change, and ensure no styling regressions occur in the rendered dataframe.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx`:
- Around line 141-231: The prettier configuration is using
prettier-plugin-bootstrap which conflicts with the Tailwind CSS classes used
throughout DataframeRenderer.tsx and other webview components. Update the
Prettier configuration file (likely .prettierrc or similar) to replace the
prettier-plugin-bootstrap plugin with prettier-plugin-tailwindcss, which
provides correct class ordering for Tailwind utilities. Verify that the class
names in the component (such as the border, flex, and spacing utilities in the
column header and pagination sections) are properly sorted after making this
change, and ensure no styling regressions occur in the rendered dataframe.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6349920d-ccad-47d9-b043-1bbf88aee7d4

📥 Commits

Reviewing files that changed from the base of the PR and between 94846a7 and 6895587.

📒 Files selected for processing (8)
  • .prettierrc.cjs
  • package.json
  • src/test/testMultiRootWkspc/workspace5/djangoApp/home/templates/index.html
  • src/test/testMultiRootWkspc/workspace5/flaskApp/templates/index.html
  • src/webviews/webview-side/data-explorer/index.html
  • src/webviews/webview-side/dataframe-renderer/DataframeRenderer.tsx
  • src/webviews/webview-side/plot/index.html
  • src/webviews/webview-side/variable-view/index.html

@pierluigilenoci

Copy link
Copy Markdown
Author

Hi @DonJayamanne, @rchiodo — friendly ping! Is this PR on your radar for review? Happy to make any adjustments if needed. Thanks!

@rchiodo

rchiodo commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Hi @DonJayamanne, @rchiodo — friendly ping! Is this PR on your radar for review? Happy to make any adjustments if needed. Thanks!

I don't think Don or I work on this code. It must have been forked from something else and included our commits. Not sure who owns this repository.

@pierluigilenoci

Copy link
Copy Markdown
Author

Hi @rchiodo — thanks for the response! Just to clarify: this repo (deepnote/vscode-deepnote) is original, not a fork — DonJayamanne and you are listed as the top contributors. You may be thinking of a different project. Could you point me to whoever owns the webview/frontend side, or forward this to the right team? Happy to make any adjustments needed. Thank you!

@rchiodo

rchiodo commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Hi @rchiodo — thanks for the response! Just to clarify: this repo (deepnote/vscode-deepnote) is original, not a fork — DonJayamanne and you are listed as the top contributors. You may be thinking of a different project. Could you point me to whoever owns the webview/frontend side, or forward this to the right team? Happy to make any adjustments needed. Thank you!

Sorry but we never actually contributed to this. Like I said somebody copied our commits from somewhere else. It looks like they came from here:

https://github.com/microsoft/vscode-jupyter

Which would explain why it looks like Don and I are top contributors.

For example, this is the last commit I made to https://github.com/microsoft/vscode-jupyter. It's identical to the last commit in this deepnote repository.
microsoft/vscode-jupyter@aac838e

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.

2 participants