Skip to content
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

Native demos in the docs #1447

Merged
merged 47 commits into from
Nov 6, 2024
Merged

Native demos in the docs #1447

merged 47 commits into from
Nov 6, 2024

Conversation

sequba
Copy link
Contributor

@sequba sequba commented Sep 26, 2024

Changes

After this PR, the basic demo looks like this:
image

  • add vuepress plugins and script necessary for compilation and running native HTML+JS+CSS demos
  • add the Open in Stackblitz button
  • add code-examples-generator script to HyperFormula project
  • migrate all demos to 3-files format in the docs/examples directory in the main HyperFormula repo

Demos migrated:

  • advanced usage
  • basic operations
  • basic usage
  • batch operations
  • clipboard operations
  • date and time handling
  • demo
  • i18n
  • localizing functions
  • named expressions
  • sorting data
  • undo-redo

Exceptions

The framework demos and custom functions demo are more complex and they cannot easily be converted to the 3-files format easily. It's best to keep them as Codesandbox iframes. Stackblitz is not an option since it doesn't work in Safari.

  • react demo
  • angular demo
  • vue demo
  • svelte demo
  • custom functions

hyperformula-demos repo

For now, we still need this repository because of the framework demos. I think we should treat it as a collection of demos and usage examples and keep all the other demos there, but prioritize the maintenance of the ones that are visible in the docs: the react demo, angular demo, vue demo, svelte demo, and custom functions demo.

How did you test your changes?

  • local docs build

Types of changes

  • Breaking change (a fix or a feature because of which an existing functionality doesn't work as expected anymore)
  • New feature or improvement (a non-breaking change that adds functionality)
  • Bug fix (a non-breaking change that fixes an issue)
  • Additional language file, or a change to an existing language file (translations)
  • Change to the documentation

Related issues:

  1. Fixes Migrate documentation demos to native HTML+JS #1441

Checklist:

  • I have reviewed the guidelines about Contributing to HyperFormula and I confirm that my code follows the code style of this project.
  • I have signed the Contributor License Agreement.
  • My change is compliant with the OpenDocument standard.
  • My change is compatible with Microsoft Excel.
  • My change is compatible with Google Sheets.
  • I described my changes in the CHANGELOG.md file.
  • My changes require a documentation update.
  • My changes require a migration guide.

@sequba sequba changed the title Native demos in docs Native demos in the docs Sep 26, 2024
@sequba sequba self-assigned this Sep 26, 2024
@sequba sequba added the Docs Improvements or additions to documentation label Sep 26, 2024
@sequba sequba changed the base branch from master to develop September 26, 2024 09:46
docs/examples/demo/example1.ts Fixed Show fixed Hide fixed
docs/examples/demo/example1.ts Fixed Show fixed Hide fixed
Copy link

github-actions bot commented Sep 27, 2024

Performance comparison of head (bb267d2) vs base (fa09de2)

                                     testName |   base |   head | change
------------------------------------------------------------------------
                                      Sheet A | 511.52 | 521.17 | +1.89%
                                      Sheet B | 173.22 | 173.51 | +0.17%
                                      Sheet T | 154.28 |  148.3 | -3.88%
                                Column ranges | 516.85 | 530.51 | +2.64%
Sheet A:  change value, add/remove row/column |   14.8 |  15.71 | +6.15%
 Sheet B: change value, add/remove row/column | 133.41 | 138.65 | +3.93%
                   Column ranges - add column |  154.8 |  158.7 | +2.52%
                Column ranges - without batch |  468.5 | 461.84 | -1.42%
                        Column ranges - batch | 118.63 | 114.43 | -3.54%

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.22%. Comparing base (d7ee29f) to head (d810cd1).
Report is 25 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1447      +/-   ##
===========================================
- Coverage    97.37%   97.22%   -0.16%     
===========================================
  Files          169      169              
  Lines        14428    14430       +2     
  Branches      3099     3101       +2     
===========================================
- Hits         14049    14029      -20     
- Misses         376      395      +19     
- Partials         3        6       +3     

see 1 file with indirect coverage changes

@sequba sequba marked this pull request as ready for review October 8, 2024 14:56
docs/examples/i18n/example1.ts Fixed Show fixed Hide fixed
docs/examples/i18n/example1.ts Fixed Show fixed Hide fixed
@sequba sequba requested a review from adrianspdev October 15, 2024 10:16
docs/examples/i18n/example1.ts Dismissed Show dismissed Hide dismissed
docs/examples/i18n/example1.ts Dismissed Show dismissed Hide dismissed
docs/examples/localizing-functions/example1.ts Dismissed Show dismissed Hide dismissed
docs/examples/localizing-functions/example1.ts Dismissed Show dismissed Hide dismissed
sequba added a commit to handsontable/hyperformula-staging that referenced this pull request Oct 24, 2024
sequba added a commit to handsontable/hyperformula-staging that referenced this pull request Oct 24, 2024
@sequba sequba merged commit cae8573 into develop Nov 6, 2024
21 of 22 checks passed
@sequba sequba deleted the feature/issue-1441 branch November 6, 2024 10:50
sequba added a commit that referenced this pull request Nov 6, 2024
* Merge hotfix to develop (#1431)

Change publish-docs workflow to use Node 20 instead of 22 due to the temporary npm issue

* Merge hotfix to develop (#1432)

* Change publish-docs workflow to use Node 20 instead of 22 due to the temporary npm issue (#1424)

* Set NODE_OPTIONS=--openssl-legacy-provider for the typedoc command

* Merge hotfix to develop (#1433)

* Change publish-docs workflow to use Node 20 instead of 22 due to the temporary npm issue (#1424)

* Hotfix: Set NODE_OPTIONS=--openssl-legacy-provider for the typedoc command (#1425)

Set NODE_OPTIONS=--openssl-legacy-provider for the typedoc command

* Revert the publish-docs workflow to Node 16

* Add build-docs workflow (#1434)

* Add build-docs workflow

* Add environment variables necessary to build the docs with Node 20

* Use Node 20 in all the build/test workflows (#1435)

* Remove license comments from the UMD build (#1437)

* Install terser plugin explicite to enable extensive customization

* Remove license comment from the UMD builds using string-replace-loader webpack plugin

* Test for the redundant license comments in the UMD build inside the verify:umd script

* Update build badge in readme to show the build workflow status instead of test (#1443)

* Update build badge to show the build workflow status instead of test

* Native demos in the docs (#1447)

* Add markdown-it plugins

* Make HTML+CSS preview work

* Make some of the buttons work

* Add edit-in-stackblitz button

* Make the entire runtime of the demo work (including js)

* Add real HF demo.

* Make HyperFormula import work in runtime of the docs examples

* Add script code-examples-generator

* Style stackblitz button

* Style demo internal buttons

* Remove unused glue-code

* Remove not needed vuepress plugins

* Fix linter error

* Reformat demo/example1.ts file

* Add advanced-usage demo

* Change the framework demos in the docs to use Codesandbox iframe instead of Stackblitz

* Add basic-operations demo

* Add basic-usage demo

* Add batch-operations demo

* Add demo clipboard-operations

* Changed the custom-functions demo to use Codesandbox instead of Stackblitz

* Add date-time demo

* Add demo i18n

* Add localizing-functions guide

* Add named-expressions demo

* Add sorting-data demo

* Add undo-redo demo

* Fix lint errors

* Disable linter for the docs examples

* Tweak the styling of demo example

* Fix row and column counting in the docs examples

* Adjust css of basic-usage demo

* Adjust style of advanced-usage demo

* Fix styles for basic-operations demo

* Fix styles for batch-operations demo

* Fix styles for sorting demo

* Fix height of the table cell in the demos

* Adjust text decoration of the summary row in the i18n demo

* Fix styles for basic-operations demo

* Adjust styles for the inputs

* Disable logging HF version to console in the native examples embedded in the docs

* Update styles for the open-in-stackblitz button

* Fix broken favicon link

* Fix examples.js script to handle newline characters in both unix and windows styles

* Reduce space between buttons and table in the undo-redo demo

* Fix style for checkbox in the batch-operations demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate documentation demos to native HTML+JS
2 participants