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

fix: improve ts codegen and formatting for ts/tsx files #311

Merged
merged 10 commits into from
Jun 17, 2024

Conversation

c12i
Copy link
Collaborator

@c12i c12i commented Jun 13, 2024

This PR improves TypeScript and tsx code generation and formatting. It includes several key changes and fixes:

  • Replaces template-derived types.ts files with Rust-generated ones.
  • Implements programmatic formatting for initially generated ts/tsx files as well as the script block of vue sfcs but not the template block, svelte programmatic formatting not yet supported

Closes #309

@c12i c12i requested review from pdaoust and matthme June 13, 2024 17:43
Copy link
Collaborator

@matthme matthme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very nice!

@c12i c12i merged commit 3fc6f21 into holochain:develop Jun 17, 2024
8 checks passed
@c12i c12i added the ShouldBackport/0.3 This change should be backported to develop-0.3 label Jun 19, 2024
c12i added a commit to c12i/scaffolding that referenced this pull request Jun 19, 2024
* refactor: replace tempalte derived types.ts files with rust-geneted ones

* fix typo

* add programatic formatting

* fix incorrectly named variable in tests

* ignore formatting EntryTypes

* fix invalid enum types

* fix: improve code formatting in ts/tsx files

* fix clippy warning

* fix failing codgegen tests

* rename tests module
@c12i c12i removed the ShouldBackport/0.3 This change should be backported to develop-0.3 label Jun 19, 2024
c12i added a commit that referenced this pull request Jun 19, 2024
* bump versions

* feat: Add react template (#295)

* WIP

* update ui module

* add react to matched ui framework strings

* hbsify templates

* add base react components

* react collection

* react detail component

* react create component

* react edit template

* react entry type for linked from component

* field types

* react link type components

* fix field types

* template swoop; fix issues

* add missing imports, strip out eslint

* fix images

* refactor holochain provider

* fix entry-type templates

* fix link-type templates

* correctly name field type widgets

* add forum example

* fix holochain context

* check for links lengths before setting state

* fix text field

* styling improvments

* extend base styles

* improve example styling

* fix mismatched components

* remove ui readme

* fix templates

* fix imports

* update elements and imports

* type app signal callback

* test with react template in ci

* update styling

* fix global styles

* rename and move client context

* make client context compatible with holo

* fix indentation in templates

* update client context template

* fix entry-types for linked from component props

* update detail components

* add default field types

* fix example app.tsx

* fix vec detail render

* fix vec edit render

* fix timestamp

* fix client context not updating loading state

* fix vec input

* fix vec input setters in edit components

* Update templates/react/field-types/u32/NumberInput/edit/render.hbs

Co-authored-by: Paul d'Aoust <amillionlobsters@gmail.com>

* Update templates/react/field-types/Timestamp/DateTimePicker/edit/render.hbs

Co-authored-by: Paul d'Aoust <amillionlobsters@gmail.com>

* Update templates/react/field-types/Timestamp/DateTimePicker/edit/render.hbs

Co-authored-by: Paul d'Aoust <amillionlobsters@gmail.com>

* set default and initial values for boolean inputs to false

* ensure previous zip file is deleted

* fix templates

---------

Co-authored-by: Paul d'Aoust <amillionlobsters@gmail.com>

* fix: holochain client error handling (#298)

* fix: holochain client error handling

* fix: typescript failures in lit template

* fix: holo web sdk version not part of ScaffoldWebAppData (#302)

* fix: Add missing web-sdk-version to template data

* rename holo web sdk template field

* fix: Include react in testable templates; bump versions (#310)

* fix: add react to testable templates

* bump crate version; nix flake update

* bump versions

* nix flake update

* fix: improve ts codegen and formatting for ts/tsx files (#311)

* refactor: replace tempalte derived types.ts files with rust-geneted ones

* fix typo

* add programatic formatting

* fix incorrectly named variable in tests

* ignore formatting EntryTypes

* fix invalid enum types

* fix: improve code formatting in ts/tsx files

* fix clippy warning

* fix failing codgegen tests

* rename tests module

* update holonix version

---------

Co-authored-by: Paul d'Aoust <amillionlobsters@gmail.com>
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.

fix: Replace Handlebars-Generated Types with Rust-Generated TypeScript Types
2 participants