Skip to content

Merge upstream frappe/datatable v1.27.1 - #7

Merged
SaiFi0102 merged 112 commits into
masterfrom
merge-upstream-v1.27.1
Nov 26, 2026
Merged

SaiFi0102 merged 112 commits into
masterfrom
merge-upstream-v1.27.1

Conversation

@SaiFi0102

@SaiFi0102 SaiFi0102 commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Merges frappe/master up to upstream v1.27.1 (7c27012), to be released as 1.27.1 so the fork follows upstream's version numbers.

Release steps

Releases are now manual (see below), so merging this PR publishes nothing. GitHub runs the push with the workflow file from the merged commit, which only tests.

  1. Merge with "Create a merge commit". That keeps the upstream merge commit, so later upstream merges don't conflict again.
  2. Run Test and Release → Run workflow on master with version=1.27.1. dry_run is ticked by default, so this is a rehearsal.
  3. Run it again with dry_run unticked to publish 1.27.1. That tags pl-v1.27.1 and creates the GitHub release.
    gh workflow run test-and-release.yml -R ParaLogicTech/datatable --ref master -f version=1.27.1                    # dry run
    gh workflow run test-and-release.yml -R ParaLogicTech/datatable --ref master -f version=1.27.1 -f dry_run=false  # publish
    ⚠️ Don't leave version blank for this release. The computed version would be 1.21.0.

What upstream brings

Playwright tests (replacing Cypress), frappe-ui default styles (new --dt-* colours, header font-weight: 500), sticky columns, fuzzy and exact text filters, column auto-width across all rows, column.sortValue and tree-aware sorting.

Fork features affected

  • Replaced:
    • Tree sorting: the fork's treeSort is replaced by upstream's _sortTreeRows. Same hierarchy behaviour. In addition, blank padding rows and is_total_row rows now keep their place, and asc⇄desc on flat tables reverses the order instead of re-sorting.
    • Scrolling: scrollToRow is upstream's version, which fixes the same bug.
  • Combined:
    • Totals: the fork's _excludeFromTotal filter is merged with upstream's isTotalRow filter in getTotalRow().
    • Header styles: the fork's zero header padding is kept, with upstream's other styles on top.
  • Now identical to upstream: always-bound resize handler, and scrollIntoView in scrollToCell.
  • Unchanged: groups, flatData/getData, this.hooks, focus and editing guards, null checks.
  • Checked against paralogic_v15: all 18 datatable internals that frappe calls still exist, including flatData and getTotalRow.

Fork changes on top of the merge

  • test-and-release.yml: releases are manual-only. A push to master only lints, builds and tests. Run the workflow (workflow_dispatch) to release:
    • version blank: semantic-release computes the version from the commits. Use this for fork fixes, e.g. 1.27.2.
    • version given: that exact version is published through trusted publishing. Use this for upstream merges. It checks the version format, that the version isn't on npm yet, and that an existing tag is in master's history.
    • dry_run, on by default, rehearses the release without publishing, tagging or creating a release. Before publishing, it checks the version format, that the version isn't on npm yet, and that an existing tag is in master's history. It also creates the GitHub release.
  • The fork-feature tests are ported from Cypress to Playwright (playwright/tests/fork_features.spec.js, 9 tests).
  • Removed the unused fork-only $.inVerticalViewport.
  • CLAUDE.md is updated, including the exact-version release procedure.

Testing

  • yarn lint-and-build passes, including the minified bundle.
  • yarn test: 69 passed, 1 skipped (the skip is upstream's).

Before merging, please check

  • Visual: the upstream restyle in paralogic_v15 query reports.
  • Behaviour: keyboard navigation in long reports, saved filters that use = (exact-match semantics changed upstream), and render speed of large reports (auto-width now measures all rows).
  • v14 benches: paralogic_v14 and sundine_v14 use ^1.17.6, which also matches 1.27.1 if their lockfiles get refreshed. Consider pinning them to ~1.17.6.

🤖 Generated with Claude Code

AlexandreLumertz and others added 30 commits May 16, 2024 00:06
Use getStandardColumnCount to dynamically determine if the first column
shoould be disabled, preventing data columns from being  incorrectly
locked when serialNoColumn is false.

✅ Closes: frappe#218
…columns

fix: raise toast z-index above sticky columns
…lumn-freeze

fix: preserve tree expand/collapse state on column freeze
Sorting compares `cell.content`, so a column that renders something other than
its stored value sorts by the value the user cannot see. `compareValue` already
solves this for filtering; `sortValue` is the same idea for sorting.

A column with a `sortValue(cell)` function sorts on what that returns. Columns
without one are unchanged.
feat(sort): sort on a value returned by the column
fix(columnmanager): resize body cells while dragging a column
fix: recompute sticky column offsets on column resize
Sort sibling groups before numbering and drawing tree rows. Add seven
browser regression tests.
fix(reports): keep tree rows grouped when sorting
measureTextWidth left a hidden div in document.body on each call. It now removes the div after it reads the width. An optional container lets the text use the font of that container.
The body uses virtual scroll, so only the visible rows are in the DOM. Columns with no width were sized from the header and the first row only, and longer values in later rows were truncated. Measure the longest value of each column from the row data too.

Fixes frappe/frappe#43219
Double-click auto-fit now uses Style.getColumnContentWidth. It compared content.length before, which is undefined for number values.
The longest value by character count is not always the widest one. A string of narrow characters can be shorter on screen than fewer wide characters, and a formatter can make a short value show a wider text or bold HTML.

Measure the formatted HTML of each value in the DOM. For large data, a canvas first picks the widest few texts, and only those are measured in the DOM.
…idths

feat: preserve resized column widths on refresh
fix(style): auto-size columns from all rows, not only the first row
…lace

feat(tree): keep is_total_row and blank rows in place on sort
…lace

feat: keep total rows in place in flat tables and out of footer
iamejaaz and others added 28 commits November 22, 2026 22:18
…address-10.7.6

chore(deps): bump ip-address from 10.1.0 to 10.7.6
…ici-6.29.1

chore(deps): bump undici from 6.24.1 to 6.29.1
fix: Added isValidDate to filter date range ":"
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.12.0 to 3.15.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/3.15.2/CHANGELOG.md)
- [Commits](nodeca/js-yaml@3.12.0...3.15.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.15.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [handlebars](https://github.com/handlebars-lang/handlebars.js) from 4.7.9 to 4.7.10.
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.10/release-notes.md)
- [Commits](handlebars-lang/handlebars.js@v4.7.9...v4.7.10)

---
updated-dependencies:
- dependency-name: handlebars
  dependency-version: 4.7.10
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.8 to 1.1.22.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@v1.1.8...v1.1.22)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.22
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…ce-expansion-1.1.22

chore(deps): bump brace-expansion from 1.1.8 to 1.1.22
…dlebars-4.7.10

chore(deps): bump handlebars from 4.7.9 to 4.7.10
…yaml-3.15.2

chore(deps): bump js-yaml from 3.12.0 to 3.15.2
…side

fix: end a drag selection when the mouse is released outside the table
docs: add browser support to the readme
perf: auto-size columns without formatting every cell
fix: keep the header line the width of the columns
Brings in upstream up to v1.27.1 (7c27012): Playwright tests (replacing
Cypress), frappe-ui default styles, sticky columns, fuzzy and exact text
filters, column auto-width, column.sortValue and tree-aware sorting.

Conflict resolutions:
- datamanager: keep fork group/flatData handling, add upstream is_total_row;
  take upstream _sortTreeRows/sortValue sorting, drop fork treeSort
- body-renderer: upstream total-row filter plus fork excludeFromTotal
- rowmanager: take upstream scrollToRow (supersedes fork fix)
- style.css: keep fork's zero header padding, take upstream font-weight
- workflows: take upstream (Playwright)
- README: upstream Playwright note plus build step

Fork changes on top:
- test-and-release.yml: workflow_dispatch to publish an exact version
  (to release upstream merges with upstream's version number)
- port fork feature tests from Cypress to Playwright
- drop fork-only $.inVerticalViewport (unused with upstream scrollToRow)
- CLAUDE.md: Playwright, merged behaviour, exact-version release steps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Defaults to true: runs all checks and `npm publish --dry-run` without
publishing, tagging or creating a release. Untick to publish for real.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A push to master now only lints, builds and tests. Releases run from
workflow_dispatch: leave `version` blank for semantic-release's computed
version (fork fixes) or give an exact one (upstream merges). dry_run stays
on by default; the computed path uses `semantic-release --dry-run`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SaiFi0102
SaiFi0102 merged commit 1fbda66 into master Nov 26, 2026
1 check passed
@SaiFi0102
SaiFi0102 deleted the merge-upstream-v1.27.1 branch November 26, 2026 10:37
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.