Skip to content

Very basic grid implementation#431

Draft
sloorush wants to merge 36 commits intonew-grid-implfrom
nugrid
Draft

Very basic grid implementation#431
sloorush wants to merge 36 commits intonew-grid-implfrom
nugrid

Conversation

@sloorush
Copy link
Member

No description provided.

@sloorush
Copy link
Member Author

WIP Report

We got claude to write a summary for this PR 🎊 Please bear with AI generated report :)

Architecture Summary

NuGrid re-implements Grid with embedded actual EWC components instead of duplicated cell components.

Aspect Grid NuGrid
Cell components Duplicated (GridEdit, GridButton, etc.) Reuses Edit, Button, Combo, Label
Main file 756 lines 441 lines
Total code ~1,900 lines ~863 lines
Tests None 35 (all passing)

What's Implemented ✅

Core Features

  • Values matrix rendering
  • Column/Row titles (ColTitles, RowTitles)
  • Cell sizing (CellWidths, CellHeights, TitleWidth, TitleHeight)
  • Current cell selection (CurCell) with blue border
  • Header highlighting (selected row/column)

Navigation

  • Arrow keys (Up, Down, Left, Right)
  • Tab / Shift+Tab (with row wrapping)
  • Enter (moves down)
  • Home / End (first/last column)
  • Ctrl+Home / Ctrl+End (first/last cell)
  • PageUp / PageDown (9 rows)
  • Space (activates cell: toggles checkbox, opens combo, focuses edit)
  • Mouse click selection

Scrolling

  • VScroll / HScroll (0=hidden, -1=auto, -3=always)
  • Sticky column headers
  • Sticky row headers
  • Sticky corner cell

Embedded Components

  • Edit (text input)
  • Edit (numeric with locale formatting)
  • Button (checkbox style)
  • Combo (native select dropdown)
  • Label (read-only)
  • CellTypes matrix mapping

Events

  • CellMove (with full Info array, mouseFlag)
  • KeyPress (with shift state)
  • CellChanged
  • Mouse events (Down, Up, Enter, Leave, Move, Wheel, DoubleClick)

Type System

  • Explicit types: TEXT, NUMERIC, BOOLEAN, DATE
  • Type inference from values
  • Type-based alignment (numbers right, text left)
  • Locale-aware number formatting (Thousand, Decimal from EWC Locale)

What's Missing ❌

Cell Styling

  • BCol - Background colors per cell type
  • CellFonts - Fonts per cell type
  • ColTitleBCol / ColTitleFCol - Header colors
  • FCol - Foreground colors

Formatted Values

  • FormattedValues - Server-provided display values
  • FormatString - Format patterns per cell type

Selection Features

  • SelText - Track text selection within Edit cells
  • ShowInput - Control input visibility

Date Handling

  • Date picker integration (Grid uses dayjs + custom picker)
  • Date FieldType support in embedded Edit

Test Coverage

Category Tests Status
Structure 5
Embedded Components 7
Events 5
Interaction (Phase 8) 13
Scrolling 5
Visual Regression 1
Total 35 All passing

Next Steps

Feature Parity (for Grid replacement)

  1. Add BCol support for cell background colors
  2. Add CellFonts support
  3. Add FormattedValues support
  4. Add header color properties
  5. Integration testing with existing Grid demos

New Features (NuGrid-specific)

  1. Column resizing (drag to resize)
  2. Row/Column selection mode
  3. Multi-cell selection
  4. Copy/paste support
  5. Performance testing with large datasets (1000+ rows)
  6. Rename and transfer of nugrid to grid.

@sloorush
Copy link
Member Author

Demo for nugrid:

screen-recording-2026-01-30.mp4

@sloorush sloorush linked an issue Feb 11, 2026 that may be closed by this pull request
@sloorush
Copy link
Member Author

sloorush commented Feb 19, 2026

Bugs w demos:

  • Moving out of the visible grid with the keyboard does not move the visible area.
  • DemoScroll does work but cannot scroll using keyboard but the scrollbars
  • Last row does not unfocus on pressing enter
  • All supported properties of grid are not supported by nugrid
  • Double scrollbars are seen a lot of times
  • When grid uses native browser scrolling it sometimes and captures up/down... to scroll instead of moving by cells. Arrow key inputs should always move it by cell
  • bug with editing cells recently introduced
  • Review state management for nugrid
  • review apl changes to formatcell.aplf
  • Bcol doesn't show up on nugrid (customer)
  • col title formatting
  • Sizing issues between grid and nugrid need to be taken care of (customer)
  • grid should address border property
  • Row and column selections

@sloorush
Copy link
Member Author

Styling is almost the same as ⎕WC/eWC grid now

image

@sloorush
Copy link
Member Author

Demo with new color styling

image

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.

Tracking issue: Grid

2 participants