Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
bd6d2c6
First version of docs
weaverryan Mar 22, 2023
0989010
docs tweaks
weaverryan Mar 22, 2023
a6fb175
[Live] Renaming methods for clarity: add -> set
weaverryan Mar 22, 2023
6a3c4e0
removing unused arg
weaverryan Mar 22, 2023
92d6432
[Live] Updating method name for clarity
weaverryan Mar 22, 2023
8d7f3b2
[Live] Initial coding of emit() feature
weaverryan Mar 22, 2023
a1490fc
[WIP] Adding invoice demo
weaverryan Mar 22, 2023
8d6ce4d
Fixing children rendering to make sure tag name always matches
weaverryan Mar 23, 2023
49523b7
[Live] Working around "bug" with null Doctrine objects
weaverryan Mar 23, 2023
42aa6bc
[Live] Improving parent-child fingerprint system by making it opt-in
weaverryan Mar 23, 2023
dc017a6
[Live] Making validation system easier to use
weaverryan Mar 23, 2023
70b4e9d
[Live] Minor validation fixes
weaverryan Mar 23, 2023
496bbf5
[Live] Fixing bug where new props from parent made the child fail che…
weaverryan Mar 23, 2023
2f49564
[Live] A lot more progress on Invoice demo
weaverryan Mar 23, 2023
b473394
Much simpler version of invoice component
weaverryan Mar 24, 2023
1dcbe84
Track edit modes on parent component and don't allow saving
weaverryan Mar 24, 2023
0a26063
Adding a save icon
weaverryan Mar 24, 2023
c536234
[Live] Fixing wrong target in emits
weaverryan Mar 24, 2023
452bcbd
Adding "key" to help with collection of child components
weaverryan Mar 24, 2023
2d1bff0
Tweaking error message
weaverryan Mar 24, 2023
aa1ed10
[WIP] Simplified (de)hydration system
weaverryan Mar 24, 2023
ecb38c3
Adding error for a non-scalar inside an array
weaverryan Mar 25, 2023
9bbf4c5
[Site] Adding an error message/state
weaverryan Mar 29, 2023
0a46a31
Merge remote-tracking branch 'origin/2.x' into live-emit-events
weaverryan Mar 31, 2023
9b7ed60
removing not needed method
weaverryan Mar 31, 2023
de2ff3b
Merge remote-tracking branch 'origin/2.x' into live-emit-events
weaverryan Apr 11, 2023
6967a69
removing meaningless changes
weaverryan Apr 11, 2023
c990d21
Merge remote-tracking branch 'origin/2.x' into live-emit-events
weaverryan Apr 12, 2023
b46c53f
Merge remote-tracking branch 'origin/2.x' into live-emit-events
weaverryan Apr 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/LiveComponent/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ LiveProp for Entities & More Complex Data
like ``DateTime`` objects, enums & Doctrine entity objects. When ``LiveProp``s
are sent to the frontend, they are "dehydrated". When Ajax requests are sent
to the frontend, the dehydrated data is then "hydrated" back into the original.

Doctrine entity objects are a special case for ``LiveProp``::

use App\Entity\Post;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
use Symfony\UX\LiveComponent\Util\TwigAttributeHelperFactory;
use Symfony\UX\TwigComponent\ComponentFactory;
use Symfony\UX\TwigComponent\ComponentRenderer;

use function Symfony\Component\DependencyInjection\Loader\Configurator\tagged_iterator;

/**
Expand Down
2 changes: 2 additions & 0 deletions ux.symfony.com/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"symfony/notifier": "6.2.*",
"symfony/proxy-manager-bridge": "6.2.*",
"symfony/runtime": "6.2.*",
"symfony/translation": "6.2.*",
"symfony/twig-bundle": "6.2.*",
"symfony/ux-autocomplete": "2.x-dev",
"symfony/ux-chartjs": "2.x-dev",
Expand All @@ -44,6 +45,7 @@
"symfony/webpack-encore-bundle": "^1.14",
"symfony/yaml": "6.2.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/intl-extra": "^3.5",
"twig/markdown-extra": "^3.4",
"twig/twig": "^2.12|^3.0"
},
Expand Down
250 changes: 249 additions & 1 deletion ux.symfony.com/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions ux.symfony.com/config/packages/translation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
framework:
default_locale: en
translator:
default_path: '%kernel.project_dir%/translations'
fallbacks:
- en
# providers:
# crowdin:
# dsn: '%env(CROWDIN_DSN)%'
# loco:
# dsn: '%env(LOCO_DSN)%'
# lokalise:
# dsn: '%env(LOKALISE_DSN)%'
59 changes: 59 additions & 0 deletions ux.symfony.com/migrations/Version20230322181630.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20230322181630 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE invoice (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, customer_name VARCHAR(255) NOT NULL, customer_email VARCHAR(255) NOT NULL, tax_rate INTEGER NOT NULL)');
$this->addSql('CREATE TABLE invoice_item (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, invoice_id INTEGER NOT NULL, product_id INTEGER NOT NULL, quantity INTEGER NOT NULL, CONSTRAINT FK_1DDE477B2989F1FD FOREIGN KEY (invoice_id) REFERENCES invoice (id) NOT DEFERRABLE INITIALLY IMMEDIATE, CONSTRAINT FK_1DDE477B4584665A FOREIGN KEY (product_id) REFERENCES product (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('CREATE INDEX IDX_1DDE477B2989F1FD ON invoice_item (invoice_id)');
$this->addSql('CREATE INDEX IDX_1DDE477B4584665A ON invoice_item (product_id)');
$this->addSql('CREATE TABLE product (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name VARCHAR(255) NOT NULL, price INTEGER NOT NULL)');
$this->addSql('CREATE TEMPORARY TABLE __temp__food AS SELECT id, name, votes FROM food');
$this->addSql('DROP TABLE food');
$this->addSql('CREATE TABLE food (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name VARCHAR(255) NOT NULL, votes INTEGER NOT NULL)');
$this->addSql('INSERT INTO food (id, name, votes) SELECT id, name, votes FROM __temp__food');
$this->addSql('DROP TABLE __temp__food');
$this->addSql('CREATE TEMPORARY TABLE __temp__todo_item AS SELECT id, todo_list_id, description, priority FROM todo_item');
$this->addSql('DROP TABLE todo_item');
$this->addSql('CREATE TABLE todo_item (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, todo_list_id INTEGER NOT NULL, description VARCHAR(255) NOT NULL, priority INTEGER NOT NULL, CONSTRAINT FK_40CA4301E8A7DCFA FOREIGN KEY (todo_list_id) REFERENCES todo_list (id) NOT DEFERRABLE INITIALLY IMMEDIATE)');
$this->addSql('INSERT INTO todo_item (id, todo_list_id, description, priority) SELECT id, todo_list_id, description, priority FROM __temp__todo_item');
$this->addSql('DROP TABLE __temp__todo_item');
$this->addSql('CREATE INDEX IDX_40CA4301E8A7DCFA ON todo_item (todo_list_id)');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE invoice');
$this->addSql('DROP TABLE invoice_item');
$this->addSql('DROP TABLE product');
$this->addSql('CREATE TEMPORARY TABLE __temp__food AS SELECT id, name, votes FROM food');
$this->addSql('DROP TABLE food');
$this->addSql('CREATE TABLE food (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, name VARCHAR(255) NOT NULL, votes INTEGER DEFAULT 0 NOT NULL)');
$this->addSql('INSERT INTO food (id, name, votes) SELECT id, name, votes FROM __temp__food');
$this->addSql('DROP TABLE __temp__food');
$this->addSql('CREATE TEMPORARY TABLE __temp__todo_item AS SELECT id, todo_list_id, description, priority FROM todo_item');
$this->addSql('DROP TABLE todo_item');
$this->addSql('CREATE TABLE todo_item (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, todo_list_id INTEGER NOT NULL, description VARCHAR(255) NOT NULL, priority INTEGER NOT NULL)');
$this->addSql('INSERT INTO todo_item (id, todo_list_id, description, priority) SELECT id, todo_list_id, description, priority FROM __temp__todo_item');
$this->addSql('DROP TABLE __temp__todo_item');
$this->addSql('CREATE INDEX IDX_40CA4301E8A7DCFA ON todo_item (todo_list_id)');
}
}
Loading