Skip to content

Conversation

weaverryan
Copy link
Owner

WIP - for my own review

michaelKaefer and others added 6 commits June 30, 2022 12:04
…aelKaefer, kbond)

This PR was merged into the 2.x branch.

Discussion
----------

Add LiveProp because I got an error otherwise

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| Tickets       | -
| License       | MIT

Commits
-------

1a39b51 Update src/LiveComponent/src/Resources/doc/index.rst
ddd1f0f Add LiveProp because I got an error otherwise
@weaverryan weaverryan force-pushed the model-rendering-overhaul branch from eaaeb43 to 9dbad3f Compare July 4, 2022 18:39
tgalopin and others added 11 commits July 4, 2022 14:53
This PR was squashed before being merged into the 2.x branch.

Discussion
----------

Allow to use react_component without props

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Tickets       | Fix symfony#364
| License       | MIT

Allow to use react_component without props:

```twig
<div {{ react_component('MyComponent') }}></div>
```

Commits
-------

ca84948 Allow to use react_component without props
… (nexxome)

This PR was merged into the 2.x branch.

Discussion
----------

[Typed] Use stimulus values api to set default values

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Tickets       | None
| License       | MIT

It isn't possible to set some boolean options to "false", because they were always overridden by the default value, for example:

`showCursor: this.showCursorValue || true`

So in this commit the stimulus Values API is used for default values https://stimulus.hotwired.dev/reference/values#default-values

Commits
-------

131a9c2 [Typed] Use stimulus values api to set default values
This PR was merged into the 2.x branch.

Discussion
----------

Fix syntax, missing closing `}}`

| Q             | A
| ------------- | ---
| Bug fix?      | yes in docs
| New feature?  | no
| Tickets       | n/a
| License       | MIT

Tried to copy paste the example, but did't work because of missing closing `}}`.
I also suggests to including the closing `</select>` tag.

Commits
-------

723fe97 Fix syntax, missing closing `}}` and `)`
… (7-zete-7)

This PR was squashed before being merged into the 2.x branch.

Discussion
----------

[Turbo] Fix TypeScript compilation issue... again

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| License       | MIT

_webpack.config.js_:
```js
Encore
    ...
    .enableTypeScriptLoader()
    .enableForkedTypeScriptTypesChecking()
```

Error message on `yarn encore production`:
```
Failed to compile with 1 errors

 error  in vendor/symfony/ux-turbo/Resources/assets/src/turbo_controller.ts:14:8                                                                                                    11:22:22

TS2339: Property 'Turbo' does not exist on type 'Window & typeof globalThis'.
    12 |
    13 | // Expose Turbo to the rest of the app to allow for dynamic Turbo calls
  > 14 | window.Turbo = Turbo;
       |        ^^^^^
    15 |
    16 | /**
    17 |  * Empty Stimulus controller only used for Symfony Flex wiring.
```

Previously, symfony#331 proposed a different solution, but it was rejected due to the changes already being prepared in hotwired/turbo#280. At the moment, the changes in the second package have been made, as a result of which it is possible to change lines that cause a compilation error.

Commits
-------

25482a7 [Turbo] Fix TypeScript compilation issue... again
…creating custom co… (maartendekeizer, weaverryan)

This PR was merged into the 2.x branch.

Discussion
----------

Add information about the query search string when creating custom co…

…ntrollers

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| Tickets       | n/a
| License       | MIT

I was looking how to know what the user was looking (what the user typed). Easy to find with a debug bar, but I think it should be part of the documentation.

Commits
-------

85a411d removing extra word
b48aa4d Use text suggestion from `@weaverryan`
1b7f0f7 Add information about the query search string when creating custom controllers
This PR was squashed before being merged into the 2.x branch.

Discussion
----------

[UxSite] example tabbed-terminal block

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| Tickets       | None
| License       | MIT

The design allows for some live component demos (that need it) to show more than 2 code blocks.

TODO:

* [x] Make dependent form fields render tab over entire area (not just right side)
* [x] Make contents dynamic again

<img width="1245" alt="Screen Shot 2022-06-30 at 12 46 39 PM" src="https://user-images.githubusercontent.com/777948/176733093-1314e2c1-ddb1-49bf-9b17-d8459dd9baca.png">

Commits
-------

b6df5df [UxSite] example tabbed-terminal block
@weaverryan weaverryan force-pushed the model-rendering-overhaul branch from 9dbad3f to be3c396 Compare July 6, 2022 19:50
@weaverryan weaverryan force-pushed the model-rendering-overhaul branch from 75aeef1 to d3aaf4f Compare July 6, 2022 20:17
@weaverryan weaverryan closed this Sep 22, 2022
weaverryan added a commit that referenced this pull request Nov 1, 2022
# This is the 1st commit message:

WIP heavy refactoring to Component

Initial "hook" system used to reset model field after re-render

Adding a 2nd hook to handle window unloaded

reinit polling after re-render

Adding Component proxy

# This is the commit message #2:

fixing some tests

# This is the commit message #3:

Refactoring loading to a hook

# This is the commit message #4:

fixing tests

# This is the commit message #5:

rearranging

# This is the commit message #6:

Refactoring polling to a separate class
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.

8 participants