Skip to content

Migrate to Grid2#188

Merged
antoinebhs merged 6 commits into
mainfrom
migrate-grid2
Jul 3, 2026
Merged

Migrate to Grid2#188
antoinebhs merged 6 commits into
mainfrom
migrate-grid2

Conversation

@antoinebhs

@antoinebhs antoinebhs commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Using Stack instead of Grid container direction column. However the Stack should be wrapped inside a Grid item if it was inside a Grid container (direction row)

@antoinebhs antoinebhs requested a review from thangqp June 26, 2026 12:55
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@antoinebhs, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a55c6da2-65dc-4d7f-82c2-de1836502af8

📥 Commits

Reviewing files that changed from the base of the PR and between 986b931 and 11240aa.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json
📝 Walkthrough

Walkthrough

MUI Grid usage is migrated to Grid2 across components and containers. Several layouts switch to size-based props, some vertical wrappers become Stack, Header drops addElement/addTooltip, and style selectors are updated to target .MuiGrid2-root.

Changes

MUI Grid → Grid2 Migration

Layer / File(s) Summary
Header prop removal and Grid2 update
src/components/2-molecules/Header.jsx
Removes addElement/addTooltip destructuring, AddIconButton import and conditional render, and their PropTypes entries. Switches the remaining layout to Grid2 with size="grow"/size="auto".
Molecule layout updates
src/components/2-molecules/AttachDialog.jsx, src/components/2-molecules/ModelSelect.jsx, src/components/2-molecules/SetGroupSelect.tsx, src/components/2-molecules/rhf/dialogs/new-mapping/NewMappingForm.tsx, src/components/2-molecules/rhf/dialogs/rename-mapping/RenameMappingForm.tsx
These components switch to Grid2 sizing props or replace vertical Grid wrappers with Stack, while keeping the same inputs, buttons, and conditional rendering.
Organism layout and style updates
src/components/3-organisms/Automaton.jsx, src/components/3-organisms/AutomatonStyle.js, src/components/3-organisms/Filter.jsx, src/components/3-organisms/Rule.jsx, src/components/3-organisms/RuleStyle.js, src/components/3-organisms/SetEditor.jsx, src/components/3-organisms/SetGroupEditor.jsx, src/components/3-organisms/SetSearch.jsx, src/components/3-organisms/automaton/AutomatonProperties.tsx, src/components/3-organisms/automaton/AutomatonPropertiesStyle.ts
These organism components switch to Grid2-based layout structures. AutomatonStyle.js and RuleStyle.js update selectors to .MuiGrid2-root, RuleStyle.js removes legacy nested Grid overrides, and AutomatonPropertiesStyle.ts renames gridContainer to container.
Container layout updates
src/containers/MappingContainer.jsx, src/containers/ParametersContainer.jsx
The mapping tabs and parameter dialog columns move from Grid item xs to Grid2 size props, with justify replaced by justifyContent.

Suggested reviewers

  • FranckLecuyer
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: migrating the codebase to Grid2.
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.
Description check ✅ Passed The description matches the PR’s Grid2/Stack layout migration and related wrapper adjustments.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates multiple UI components/containers from MUI Grid to Grid2 to align with the updated grid API and prop naming (e.g., size, justifyContent) while preserving existing layouts.

Changes:

  • Replaced Grid imports/usages with Grid2 as Grid and updated item sizing from item/xs to size.
  • Updated deprecated layout props (e.g., justifyjustifyContent) and adjusted some wrappers to ensure full-width grid behavior.
  • Updated styling selectors to target MuiGrid2-* classnames and moved some layout styling inline where appropriate.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/containers/ParametersContainer.jsx Switches dialog layout grids to Grid2 and size props.
src/containers/MappingContainer.jsx Updates grid imports/props for centered controls and tab/header rows.
src/components/3-organisms/SetSearch.jsx Migrates accordion form layout to Grid2 and adjusts wrappers for width/layout.
src/components/3-organisms/SetGroupEditor.jsx Updates editor row layout to Grid2 with size semantics.
src/components/3-organisms/SetEditor.jsx Migrates per-parameter row layout to Grid2 and updated layout props.
src/components/3-organisms/RuleStyle.js Updates style selectors to match Grid2 root classnames.
src/components/3-organisms/Rule.jsx Migrates rule card layout to Grid2, including responsive size objects.
src/components/3-organisms/Filter.jsx Updates filter header/content layout to Grid2 and justifyContent.
src/components/3-organisms/AutomatonStyle.js Updates style selectors to match Grid2 root classnames.
src/components/3-organisms/automaton/AutomatonProperties.tsx Migrates automaton property grid layout to Grid2 and size.
src/components/3-organisms/Automaton.jsx Migrates automaton card layout to Grid2 with responsive sizing.
src/components/2-molecules/SetGroupSelect.tsx Updates selection row layout to Grid2 and size usage.
src/components/2-molecules/ModelSelect.jsx Migrates model selector row to Grid2 with grow/auto sizing.
src/components/2-molecules/Header.jsx Migrates header layout to Grid2 and adjusts width handling.
src/components/2-molecules/AttachDialog.jsx Migrates attach dialog form rows to Grid2 sizing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/3-organisms/SetEditor.jsx Outdated
Comment thread src/components/3-organisms/SetEditor.jsx Outdated
Signed-off-by: Thang PHAM <phamthang37@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

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

⚠️ Outside diff range comments (1)
src/components/3-organisms/SetEditor.jsx (1)

53-80: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add a stable key to each parameter row.
The mapped Grid has no key, so React can reuse the wrong row when this sorted/filtered list changes. definition.name looks like the natural stable key here.

🤖 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/components/3-organisms/SetEditor.jsx` around lines 53 - 80, The parameter
row rendered in SetEditor’s mapped Grid is missing a stable React key, which can
cause incorrect row reuse when the list is sorted or filtered. Add a key to the
outer row element in the SetEditor mapping, using the stable identifier already
available on each item such as definition.name, so React can track each
parameter row correctly.

Source: Linters/SAST tools

🤖 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/components/3-organisms/Automaton.jsx`:
- Around line 55-60: The wrappers in Automaton are using MUI Grid2 as a column
layout, which is not officially supported for this usage. Replace the Grid-based
wrapper(s) in the Automaton component with Stack or another non-Grid layout for
the sections using direction="column", and keep the existing alignment/spacing
behavior intact. Make the same change for the repeated Grid2 wrappers referenced
by the Automaton structure so the layout no longer depends on unsupported Grid2
column direction.

In `@src/components/3-organisms/automaton/AutomatonProperties.tsx`:
- Line 49: The vertical wrapper in AutomatonProperties should not use Grid2 with
direction="column" because it can fall back to row layout; replace the outer
list wrapper and each property block wrapper with Stack so the property rows and
dividers remain vertically stacked. Update the wrappers around the
AutomatonProperties layout and any related property-block container usage to
keep the same spacing/structure while using Stack instead of Grid.

In `@src/components/3-organisms/Filter.jsx`:
- Line 38: The vertical layout in the Filter component is using Grid2 with
direction="column", which is not supported. Replace the wrapper in Filter.jsx
with Stack or Box and keep the same spacing/alignment behavior using the
appropriate layout props. Use the surrounding Filter component structure to
locate the current Grid2 container and update it so the layout relies only on
supported props.

In `@src/components/3-organisms/Rule.jsx`:
- Around line 41-46: The Grid2 containers in Rule.jsx are using column-based
layout props that Grid2 does not support, so these wrappers should be replaced
with a vertical layout component. Update the affected containers in the Rule
component to use Stack or a plain flex column wrapper instead of Grid2 where
direction is set to column or column-reverse, and keep the same child structure
and spacing behavior for the sections around the referenced Grid usages.

---

Outside diff comments:
In `@src/components/3-organisms/SetEditor.jsx`:
- Around line 53-80: The parameter row rendered in SetEditor’s mapped Grid is
missing a stable React key, which can cause incorrect row reuse when the list is
sorted or filtered. Add a key to the outer row element in the SetEditor mapping,
using the stable identifier already available on each item such as
definition.name, so React can track each parameter row correctly.
🪄 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: CHILL

Plan: Pro

Run ID: b6757bf7-3088-4f7f-b1e1-5c04190f633d

📥 Commits

Reviewing files that changed from the base of the PR and between 459cd37 and d52d87c.

📒 Files selected for processing (15)
  • src/components/2-molecules/AttachDialog.jsx
  • src/components/2-molecules/Header.jsx
  • src/components/2-molecules/ModelSelect.jsx
  • src/components/2-molecules/SetGroupSelect.tsx
  • src/components/3-organisms/Automaton.jsx
  • src/components/3-organisms/AutomatonStyle.js
  • src/components/3-organisms/Filter.jsx
  • src/components/3-organisms/Rule.jsx
  • src/components/3-organisms/RuleStyle.js
  • src/components/3-organisms/SetEditor.jsx
  • src/components/3-organisms/SetGroupEditor.jsx
  • src/components/3-organisms/SetSearch.jsx
  • src/components/3-organisms/automaton/AutomatonProperties.tsx
  • src/containers/MappingContainer.jsx
  • src/containers/ParametersContainer.jsx

Comment thread src/components/3-organisms/Automaton.jsx Outdated
Comment thread src/components/3-organisms/automaton/AutomatonProperties.tsx Outdated
Comment thread src/components/3-organisms/Filter.jsx Outdated
Comment thread src/components/3-organisms/Rule.jsx Outdated
thangqp added 2 commits June 29, 2026 18:52
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
Signed-off-by: Thang PHAM <phamthang37@gmail.com>
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@antoinebhs antoinebhs merged commit 26545de into main Jul 3, 2026
6 checks passed
@antoinebhs antoinebhs deleted the migrate-grid2 branch July 3, 2026 15:28
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