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

Updating Elastic UI #102

Closed
jusa3 opened this issue Jul 5, 2024 · 3 comments
Closed

Updating Elastic UI #102

jusa3 opened this issue Jul 5, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jusa3
Copy link
Collaborator

jusa3 commented Jul 5, 2024

Pros:

Cons:

  • possible deprecations of functions/parameters - check change logs
  • a lot of work to check all widgets after update
@jusa3 jusa3 added the enhancement New feature or request label Jul 5, 2024
@jusa3
Copy link
Collaborator Author

jusa3 commented Nov 19, 2024

In the current Elastic UI version (^97), the package includes some JSON files (like logicals.json), which define styles or other configuration data. These files are not JavaScript files, but the esbuild-dynamic-import plugin in esbuild (to build the JS widgets) is by default trying to process them as if they were. As a result, when it tries to parse these JSON files, it encounters an invalid syntax and we get the error:

Building terminology-service-suite.min.js
✘ [ERROR] Expected ";" but found ":"

    node_modules/@elastic/eui/es/global_styling/functions/logicals.json:2:10:
      2 │   "height": "block-size",
        │           ^
        ╵           ;

✘ [ERROR] Expected ";" but found ":"

We need to modify the esbuild-dynamic-import plugin source code to allow JS and JSON files to be processed. This is the first try: ts4nfdi/esbuild-dynamic-import@1012415

@jusa3
Copy link
Collaborator Author

jusa3 commented Nov 20, 2024

The error with the HTML Widgets:

Uncaught TypeError: Cannot set properties of undefined (setting 'Symbol(Symbol.toStringTag)')
    at Vsn (terminology-service-suite.min.js:377:17232)

Could be solved with ts4nfdi/esbuild-dynamic-import@cca171f

@jusa3
Copy link
Collaborator Author

jusa3 commented Nov 21, 2024

The icons are not visible in the HTML Storybook and we get the error:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'icon')
    at terminology-service-suite.min.js:374:21172

Solved by ts4nfdi/esbuild-dynamic-import@4d38ce3

@jusa3 jusa3 self-assigned this Nov 25, 2024
@rombaum rombaum closed this as completed Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants