Skip to content

Release via semantic-release, fix production build, merge upstream - #5

Closed
SaiFi0102 wants to merge 117 commits into
masterfrom
upstream-merge
Closed

SaiFi0102 wants to merge 117 commits into
masterfrom
upstream-merge

Conversation

@SaiFi0102

Copy link
Copy Markdown
Member

What changed

1. Fix the production build (fix:). src/datamanager.js used [this.rows, this.flatData] = this.prepareRows(...). uglify-es@3.0.3 crashes on array destructuring into this.* properties, which broke NODE_ENV=production rollup -c (*.min.js) and made every CI run fail at the build step. The fix destructures into locals first. Upstream uses the same toolchain and never hit this.

2. Switch to upstream's CI/CD model (ci:).

  • dist/ is gitignored again and built in CI only. npm still ships it via "files".
  • semantic-release publishes on push to master. .releaserc.json sets tagFormat: pl-v${version}, because upstream already has v1.20.6, v1.20.7 and v1.21.x tags on unrelated commits.
  • version is 0.0.0-development (set at publish time), and publishConfig.access is public for the scoped package.
  • Cypress Dashboard recording is gone, so no record key is needed. After the merge the workflows are upstream's Playwright ones anyway.

3. Add CLAUDE.md. It covers the build and release process, how paralogic_v15 consumes the package, the fork's own features, and notes for future upstream merges.

4. Merge frappe/master (7c27012). This brings in Playwright tests, frappe-ui default styles, sticky columns, fuzzy and exact filters, column auto-width, column.sortValue and tree-aware sorting. Conflict resolutions:

  • datamanager.js: kept the fork's group/flatData/getData handling and added upstream's is_total_row. Took upstream's _sortTreeRows/sortValue sorting and dropped the fork's treeSort. Upstream's version keeps the hierarchy and also keeps empty padding rows in place.
  • body-renderer.js: upstream's total-row filter plus the fork's excludeFromTotal.
  • rowmanager.js: took upstream's scrollToRow, which replaces the fork's fix.
  • style.css: kept the fork's zero header padding and took upstream's font-weight: 500.
  • Workflows: took upstream's.

Testing

  • yarn lint-and-build passes, including the minified bundle.
  • yarn test (Playwright): 60 passed, 1 skipped (the skip is upstream's).
  • Browser check of fork-only features against the built min.js:
    • grouped tree data and list-view padding rows
    • getData() returns the original row
    • the totals row excludes group totals
    • tree sort keeps groups intact (by number, both directions, and by text)

Before merging (merging publishes to npm)

  1. Configure the npm trusted publisher for @paralogic/frappe-datatable: repo ParaLogicTech/datatable, workflow test-and-release.yml. An NPM_TOKEN secret also works.
  2. Push the baseline tag. Without it, semantic-release treats this as the first release and publishes 1.0.0 as latest:
    git tag pl-v1.20.7 b7160fa && git push origin pl-v1.20.7
  3. Expect the first release to be a minor (1.21.0), because upstream's feat: commits come in with the merge.

Reviewer notes

  • Visual change: upstream's frappe-ui styles change the default --dt-* colours and the header font weight. Check the query reports in paralogic_v15.
  • After release, bump @paralogic/frappe-datatable in paralogic_v15/apps/frappe and run bench build --app frappe.

🤖 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 25 commits November 22, 2026 22:36
…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
uglify-es 3.0.3 crashes on `[this.rows, this.flatData] = ...`, which broke
the production build (dist/*.min.js) and therefore CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- build dist in CI only; dist is gitignored again
- fork tags use pl-v${version} to avoid clashing with upstream v* tags
- version stays 0.0.0-development, semantic-release sets it on publish
- publishConfig.access public for the scoped package
- drop Cypress Dashboard recording (no record key needed)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict resolutions:
- workflows: take upstream (Playwright replaces Cypress)
- 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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fork-only helper, unused since taking upstream's scrollToRow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grouped data (tree and list), getData/flatData incl. appendRows, tree sort
within groups, padding rows on sort, _excludeFromTotal in the total row and
columnTotal hook, and shift+arrow at the table edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SaiFi0102

Copy link
Copy Markdown
Member Author

Closing for now: the build fix, semantic-release switch and fork tests will land first in a separate PR against the current (pre-merge) version. This branch stays as a reference for the upstream merge afterwards.

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.