Skip to main content

UI Bug Fix: Expand CMS Popup Modal Width to Reduce Height

Last Updated: 16/07/2026
Type: UI Layout Fix β€” CMS Modal Dimension Adjustments
Screen: CMS Admin Panel β€” Service Create/Edit Modal (Spa Services) & all configuration modals
Severity: 🟠 Medium β€” UX polishing to optimize data entry layouts, preventing excessive vertical scrolling

Feedback Screenshot:


1. Identified Spacing Issue​

On the Service Edit/Create modal in the CMS:

  • The popup modal container is set to a narrow width (approx. 600px).
  • Because of this narrow width, form elements (such as the branch checklist, price input, duration, buffers, description, and status checkboxes) are forced to stack vertically in single or double columns.
  • This creates an excessively tall modal (large height) that requires vertical scrolling to access fields like the "Save" (LΖ°u service) button at the bottom.

2. Redesign & Spacing Specifications​

To optimize readability and form structure, the modal width must be increased, allowing fields to sit side-by-side in multi-column layouts, which reduces the overall height of the box.

2.1 Modal Dimension Target Specs​

  • Width: Increase the modal container width from 600px to 960px (standard Desktop Medium/Large modal width).
  • Height: Remove explicit/restrictive height caps and let the content flow naturally across horizontal columns. Limit maximum height to 90vh with an inner scrollable body if needed.

2.2 Proportional Multi-Column Grid Redesign​

By utilizing a grid system (e.g. 12-column Grid or Flexbox rows), we reorganize the inputs to span horizontally:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Sα»­a service Spa X β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ β”‚
β”‚ TΓͺn service (flex: 2) NhΓ³m dα»‹ch vα»₯ (flex: 1) β”‚
β”‚ [ Body Massage 90 phΓΊt ] [ Body Massage ] β”‚
β”‚ β”‚
β”‚ SKU (flex: 1) Danh mα»₯c (flex: 1) β”‚
β”‚ [ GL-BODY-MASSAGE-90 ] [ Massage β–Ό ] β”‚
β”‚ β”‚
β”‚ Chi nhΓ‘nh Γ‘p dα»₯ng (3-column grid check list) β”‚
β”‚ [ ] Gold Lotus HΖ°ng [ ] Gold Lotus ThαΊ£o Điền [ ] Gold Oriental Spa 1 β”‚
β”‚ [ ] Gold Oriental 2 [ ] Gold Oriental 3 [ ] Gold Meat House β”‚
β”‚ β”‚
β”‚ GiΓ‘ trΖ°α»›c thuαΊΏ Thời lượng Buffer trΖ°α»›c Buffer sau β”‚
β”‚ [ 495000 ] [ 90 ] [ 10 ] [ 10 ] β”‚
β”‚ β”‚
β”‚ MΓ΄ tαΊ£ β”‚
β”‚ [ Golden Lotus Body Massage 90 phΓΊt... ] β”‚
β”‚ β”‚
β”‚ HΓ¬nh Δ‘αΊ‘i diện (Thumbnail) CαΊ§n therapist / phΓ²ng / bαΊ­t β”‚
β”‚ [ πŸ–ΌοΈ Asset Δ‘Γ£ chọn ] [βœ…] Therapist [βœ…] PhΓ²ng [βœ…] β”‚
β”‚ β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ [Huα»·] [LΖ°u service]β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3. Style Adjustments (CSS / SCSS)​

3.1 Before (Tall & Narrow Layout)​

// ❌ WRONG β€” Restrictive width causing vertical stacking
.cms-modal-dialog {
max-width: 600px; // ❌ Too narrow

.form-row {
display: flex;
flex-direction: column; // Stacks all fields vertically
margin-bottom: 12px;
}

.branch-checklist {
display: grid;
grid-template-columns: repeat(2, 1fr); // ❌ 2-column checklist stretches vertically
}
}

3.2 After (Wide & Balanced Layout)​

// βœ… CORRECT β€” Wider modal with multi-column input groups
.cms-modal-dialog {
width: 90%;
max-width: 960px; // βœ… Wider desktop modal width
margin: 30px auto;

.modal-body {
max-height: 80vh;
overflow-y: auto; // Fallback inner scrollbar
padding: 24px;
}

// Flexbox rows for horizontal field alignments
.form-row-grid-4 {
display: grid;
grid-template-columns: repeat(4, 1fr); // price, duration, buffers side-by-side
gap: 16px;
margin-bottom: 16px;
}

.form-row-grid-2 {
display: grid;
grid-template-columns: 2fr 1fr; // e.g. Name (2/3 width) and Group (1/3 width)
gap: 16px;
margin-bottom: 16px;
}

// Branch checklist distributed across 3 or 4 columns
.branch-checklist {
display: grid;
grid-template-columns: repeat(3, 1fr); // βœ… 3 columns reduces vertical list size
gap: 12px;
padding: 12px;
background-color: #F9F9F9;
border-radius: 6px;
margin-bottom: 16px;
}
}

Technical Checklist​

  • Locate the Modal dialog component file for the Service Manager view (typically ServiceEditModal.tsx or similar).
  • Update the modal wrapper component props (or CSS class) to set width: 960px or a wide config token.
  • Re-layout the branch checklist to display in 3 columns (or 4 columns depending on viewport space).
  • Group the numerical inputs (GiΓ‘ trΖ°α»›c thuαΊΏ, Thời lượng, Buffer trΖ°α»›c, Buffer sau) on a single horizontal row (grid-template-columns: repeat(4, 1fr)).
  • Group the Name and Group selector inputs in a 2:1 grid ratio.
  • Group the checkbox switches (CαΊ§n therapist, CαΊ§n phΓ²ng, Đang bαΊ­t) on a single horizontal row.
  • Verify scrolling: ensure that on smaller monitor resolutions, the modal fits the height constraints gracefully by utilizing max-height: 85vh and overflow-y: auto.