Repository navigation
HF-359: Import the formula builder core as hyperformula-ui #1832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
92eb968
HF-359: Copy the formula builder core into hyperformula-ui/
claude 25cca42
HF-359: Trim the imported demo and e2e suite to the editor-only route
claude e69a48a
HF-359: Convert the imported packages from pnpm to npm
claude 02021ed
HF-359: Publish the core as hyperformula-ui, under GPL-3.0-only
claude a04d793
HF-359: Add hyperformula-ui to the npm workspace
claude 394bf02
HF-359: Run the hyperformula-ui checks in CI
claude 71830ee
HF-359: Document hyperformula-ui in its own dev-docs
claude 62f8af5
HF-359: Link the hyperformula-ui changelog entry to its pull request
claude a4e81e3
HF-359: Make three hyperformula-ui regexes linear on long input
claude f3a6b55
HF-359: Export hyperformula-ui's source under a private condition
claude 365e835
HF-359: Add a hyperformula-ui skill and UI review checks
claude ef76392
HF-359: Address review on the hyperformula-ui import
claude acf31eb
HF-359: Address the second review of the hyperformula-ui import
claude 0b5da9c
HF-359: Fit the formula bar editor to its cell and add an icons option
claude 34d6ef9
HF-359: Make the hyperformula-ui package installable and typed for ev…
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| --- | ||
| name: hyperformula-ui-dev | ||
| description: > | ||
| Use for ANY work in `hyperformula-ui/`: the formula editor package (`hyperformula-ui`, | ||
| in `hyperformula-ui/packages/core/`), its demo, its end-to-end suite, its build scripts | ||
| and its shared configuration. Covers the editor, the formula bar, the lexer, the kernel, | ||
| reference highlighting, autocomplete and function help popups, keyboard shortcuts, | ||
| `IGridAdapter`, the generated stylesheet and API docs, and releasing the package. Triggers | ||
| on file paths under `hyperformula-ui/`, or when the user describes a symptom in the formula | ||
| editor without naming a file. Its code style is not the engine's: load this skill instead | ||
| of `hyperformula-dev` for anything in this folder. | ||
| --- | ||
|
|
||
| ## 1. Read the relevant files from `dev-docs/` | ||
|
|
||
| Always: | ||
|
|
||
| | File | Why | | ||
| |---|---| | ||
| | [`ARCHITECTURE.md`](../../../hyperformula-ui/dev-docs/ARCHITECTURE.md) | The components, the data flow, and the invariants every change keeps | | ||
| | [`CODE-STYLE.md`](../../../hyperformula-ui/dev-docs/CODE-STYLE.md) | The conventions inside `hyperformula-ui/`, which differ from the engine's | | ||
| | [`DEFINITION-OF-DONE.md`](../../../dev-docs/DEFINITION-OF-DONE.md) | What the change must contain before review | | ||
|
|
||
| Then the page for what you are changing: | ||
|
|
||
| | File | For | | ||
| |---|---| | ||
| | [`EDITOR-TASKS.md`](../../../hyperformula-ui/dev-docs/EDITOR-TASKS.md) | Which files implement tokenization, shortcuts, highlights, popups and the overlay | | ||
| | [`KEYBOARD-SHORTCUTS.md`](../../../hyperformula-ui/dev-docs/KEYBOARD-SHORTCUTS.md) | Any change to what a key does | | ||
| | [`SPEC.md`](../../../hyperformula-ui/dev-docs/SPEC.md) | The public API, the adapter contract, CSS, and the commands | | ||
| | [`TESTING.md`](../../../hyperformula-ui/dev-docs/TESTING.md) | Writing the test the change needs | | ||
| | [`RELEASE.md`](../../../hyperformula-ui/dev-docs/RELEASE.md) | Publishing the package — only when asked to release | | ||
|
|
||
| ## 2. Work through them in order | ||
|
|
||
| 1. Find the files with [`EDITOR-TASKS.md`](../../../hyperformula-ui/dev-docs/EDITOR-TASKS.md), and the invariants they must keep with [Key invariants](../../../hyperformula-ui/dev-docs/ARCHITECTURE.md#key-invariants). | ||
| 2. Write the failing test first — [New behaviour](../../../hyperformula-ui/dev-docs/TESTING.md#new-behaviour) — with skill `test-writing-discipline`. | ||
| 3. Change the code, then run the checks in [Checks while you work](../../../hyperformula-ui/dev-docs/EDITOR-TASKS.md#checks-while-you-work). Name the workspace by path, as [`SPEC.md`](../../../hyperformula-ui/dev-docs/SPEC.md#12-build--commands) says. Regenerate the stylesheet or the API docs when the change affects them. | ||
| 4. Add the entry to [`hyperformula-ui/CHANGELOG.md`](../../../hyperformula-ui/CHANGELOG.md) when the change is user-facing, and finish everything in [`DEFINITION-OF-DONE.md`](../../../dev-docs/DEFINITION-OF-DONE.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| name: HyperFormula UI | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - reopened | ||
| - synchronize # the head branch is updated from the base branch, new commits are pushed to the head branch, or the base branch is changed | ||
| push: | ||
| branches: | ||
| - 'master' | ||
| - 'develop' | ||
| - 'release/**' | ||
|
|
||
| jobs: | ||
| verify: | ||
| strategy: | ||
| matrix: | ||
| node-version: [ '22' ] | ||
| os: [ 'ubuntu-latest' ] | ||
| name: verify | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Setup Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d # https://github.com/actions/setup-node/releases/tag/v1.4.4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Checkout main repository | ||
| uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598 # https://github.com/actions/checkout/releases/tag/v2.0.0 | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build | ||
| run: npm run build:ui | ||
|
|
||
| - name: Check the generated stylesheet is committed | ||
| run: git diff --exit-code -- 'hyperformula-ui/**/cssText.ts' | ||
|
|
||
| - name: Check the generated API docs are committed | ||
| run: | | ||
| npm run docs --workspace=hyperformula-ui/packages/core | ||
| git diff --exit-code -- hyperformula-ui/packages/core/DOCS.md | ||
|
|
||
| - name: Lint | ||
| run: npm run lint --workspace=hyperformula-ui/packages/core | ||
|
|
||
| - name: Typecheck | ||
| run: npm run typecheck --workspace=hyperformula-ui/packages/core | ||
|
|
||
| - name: Run unit tests | ||
| run: npm run test:ui | ||
|
|
||
| - name: Check the package contents | ||
| run: npm pack --dry-run --workspace=hyperformula-ui/packages/core | ||
|
|
||
| e2e: | ||
| strategy: | ||
| matrix: | ||
| node-version: [ '22' ] | ||
| os: [ 'ubuntu-latest' ] | ||
| name: e2e | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Setup Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d # https://github.com/actions/setup-node/releases/tag/v1.4.4 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Checkout main repository | ||
| uses: actions/checkout@722adc63f1aa60a57ec37892e133b1d319cae598 # https://github.com/actions/checkout/releases/tag/v2.0.0 | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| # The demo resolves hyperformula from this workspace, so the engine's bundles and typings must exist. | ||
| - name: Build the engine | ||
| run: npm run bundle-all | ||
|
|
||
| - name: Lint and typecheck the demo and the suite | ||
| run: | | ||
| npm run lint --workspace=demo-js --workspace=@hfe-demo/shared --workspace=e2e | ||
| npm run typecheck --workspace=demo-js --workspace=@hfe-demo/shared --workspace=e2e | ||
|
|
||
| - name: Install Chromium | ||
| run: npm exec --workspace=e2e -- playwright install --with-deps chromium | ||
|
|
||
| - name: Run end-to-end tests | ||
| run: npm run test:e2e | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.