-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
[WIP] LiveUrl #2673
Draft
mbuliard
wants to merge
3,036
commits into
symfony:2.x
Choose a base branch
from
mbuliard:live-url
base: 2.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[WIP] LiveUrl #2673
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ame logic into dedicated methods (to reduce file size) (Kocal) This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Map] Fix and improve TypeScript types, refactor same logic into dedicated methods (to reduce file size) | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> This PRs is purely internal, and aims to: - Making TypeScript happy by fixing types definitions and usages, but also simplify them - Refactoring methods containing the same logic (ex: `this.create*` or `this....ValueChanged`) methods) to dedicated methods: ```js createMarker(definition) { this.dispatchEvent('marker:before-create', { definition }); const marker = this.doCreateMarker(definition); this.dispatchEvent('marker:after-create', { marker }); marker['`@id`'] = definition['`@id`']; this.markers.set(definition['`@id`'], marker); return marker; } createPolygon(definition) { this.dispatchEvent('polygon:before-create', { definition }); const polygon = this.doCreatePolygon(definition); this.dispatchEvent('polygon:after-create', { polygon }); polygon['`@id`'] = definition['`@id`']; this.polygons.set(definition['`@id`'], polygon); return polygon; } createPolyline(definition) { this.dispatchEvent('polyline:before-create', { definition }); const polyline = this.doCreatePolyline(definition); this.dispatchEvent('polyline:after-create', { polyline }); polyline['`@id`'] = definition['`@id`']; this.polylines.set(definition['`@id`'], polyline); return polyline; } ``` becomes ```js this.createMarker = this.createDrawingFactory('marker', this.markers, this.doCreateMarker.bind(this)); this.createPolygon = this.createDrawingFactory('polygon', this.polygons, this.doCreatePolygon.bind(this)); this.createPolyline = this.createDrawingFactory('polyline', this.polylines, this.doCreatePolyline.bind(this)); ``` and ```js markersValueChanged() { if (!this.map) { return; } this.markers.forEach((marker) => { if (!this.markersValue.find((m) => m['`@id`'] === marker['`@id`'])) { this.removeMarker(marker); this.markers.delete(marker['`@id`']); } }); this.markersValue.forEach((marker) => { if (!this.markers.has(marker['`@id`'])) { this.createMarker(marker); } }); if (this.fitBoundsToMarkersValue) { this.doFitBoundsToMarkers(); } } polygonsValueChanged() { if (!this.map) { return; } this.polygons.forEach((polygon) => { if (!this.polygonsValue.find((p) => p['`@id`'] === polygon['`@id`'])) { this.removePolygon(polygon); this.polygons.delete(polygon['`@id`']); } }); this.polygonsValue.forEach((polygon) => { if (!this.polygons.has(polygon['`@id`'])) { this.createPolygon(polygon); } }); } polylinesValueChanged() { if (!this.map) { return; } this.polylines.forEach((polyline) => { if (!this.polylinesValue.find((p) => p['`@id`'] === polyline['`@id`'])) { this.removePolyline(polyline); this.polylines.delete(polyline['`@id`']); } }); this.polylinesValue.forEach((polyline) => { if (!this.polylines.has(polyline['`@id`'])) { this.createPolyline(polyline); } }); } ``` becomes ```js markersValueChanged() { if (!this.isConnected) { return; } this.onDrawChanged(this.markers, this.markersValue, this.createMarker, this.doRemoveMarker); if (this.fitBoundsToMarkersValue) { this.doFitBoundsToMarkers(); } } polygonsValueChanged() { if (!this.isConnected) { return; } this.onDrawChanged(this.polygons, this.polygonsValue, this.createPolygon, this.doRemovePolygon); } polylinesValueChanged() { if (!this.isConnected) { return; } this.onDrawChanged(this.polylines, this.polylinesValue, this.createPolyline, this.doRemovePolyline); } ``` Commits ------- 1d33a5f [Map] Create "onDrawChanged" to refactor methods "markersValueChanged"/"polygonsValueChanged"/"polylinesValueChanged" (not identical but follow the same pattern) d9d9ff9 [Map] Create "createDrawingFactory" to refactor methods "createMarker"/"createPolyline"/"createPolygon" (not identical but follow the same pattern) a443ad8 [Map] Re-organize methods order, simplify types, don't dirty-append ``@id`` anymore
… in DQL joins (HugoSEIGLE) This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Autocomplete] Fix handling of associated properties in DQL joins | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Issues | Fix symfony#2370 | License | MIT Changes: - The alias generation logic has been improved to correctly handle nested associations and avoid alias collisions. - The code was modified to ensure that the parent entity is correctly accounted for when generating aliases, which helps prevent issues in complex joins with multiple associated entities. - A check was added to verify the existence of a parent property before using it as part of the alias. This prevents logical errors in cases where the parent entity is not directly involved in the join. Commits ------- cc87e60 [Autocomplete] Fix handling of associated properties in DQL joins
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Icons] use dedicated cache pool | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT based on `@stof` comment on EasyAdminBundle repository EasyCorp/EasyAdminBundle#6507 (comment) > you should probably create a dedicated cache pool inheriting its configuration from cache.system instead of using cache.system directly. this is how core Symfony components work (allowing them to avoid having to care about conflicting keys between the caches of different component, as the key only needs to be unique inside the cache pool) Commits ------- 62f7c03 [Icons] use dedicated cache pool
…re topics to `turbo_stream_listen` (norkunas, Kocal) This PR was merged into the 2.x branch. Discussion ---------- [Turbo] Add support for providing multiple mercure topics to `turbo_stream_listen` | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | Issues | Fix symfony#213 | License | MIT Commits ------- 2469012 [Turbo] PHPStan 4734757 [Turbo] Simplify $topics e3b72c1 [Turbo] Add support for providing multiple mercure topics to `turbo_stream_listen`
…(dsoriano) This PR was squashed before being merged into the 2.x branch. Discussion ---------- [LiveComponent] fix required select not initialized | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Issues | Fix symfony#1332 | License | MIT Initialize required select(ChoiceType or EntityType) with the first entry. Not applied to multiple or expanded. Commits ------- 9d1dada [LiveComponent] fix required select not initialized
…smnandre) This PR was merged into the 2.x branch. Discussion ---------- [Autocomplete] Fix grouped options order | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Issues | Fix symfony#1616 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT The bug is being caused by TomSelect not preserving the order of the option elements in the select as we select the options in the dropdown. In this case, the MutationObserver callback uses the optgroup element as a parameter to "store" the group (if any) to which the option belongs. However, once the option is selected, it no longer has an optgroup as its parentElement (a problem caused by the aforementioned bug). As I see it, there is no need to "store" the option's group since, in any case, all <option> elements usually have a unique [value], and even if not, it will still work as expected. A callback was added for options added through [addOption](https://github.com/orchidjs/tom-select/blob/69180fa9e79060060f1824fbde85537579d0005d/src/tom-select.ts#L1636), but the caveat is that it needs the parameter user_created=true to trigger the 'option_add' event. Commits ------- 4344a3c Yarn cleanup 07b3eeb Build up to date packages 6424bd4 [Autocomplete] Fix grouped options order
Update 7.2.beta -> 7.2 stable
This PR was merged into the 2.x branch. Discussion ---------- [Site] Update Symfony 7.2 Update 7.2.beta -> 7.2 stable Commits ------- 9df4ed0 [Site] Update Symfony 7.2
…omponent integration (Kocal) This PR was merged into the 2.x branch. Discussion ---------- [Maps] Fix documentations codeblocks for the LiveComponent integration | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Some codeblocks are missing: <img width="842" alt="image" src="https://github.com/user-attachments/assets/c2bf8609-1400-45e6-b038-d4123d4c249c"> (markdown FTW) Commits ------- 795d32d [Maps] Fix documentations docblocks for the LiveComponent integration
….." message (skmedix) This PR was merged into the 2.x branch. Discussion ---------- [Autocomplete] Added polish translation for "Add ..." message | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT The change involves translating the placeholder text for adding items. Commits ------- f5f01f4 [Autocomplete] Added polish translation for "Add ..." message
… disabled (smnandre) This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Icons] Fix LockIconsCommand definition when Iconify disabled | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Issues | Fix symfony#2415 | License | MIT When iconify is disabled, LockIconsCommand definition is accessed without been set first. Commits ------- 6ba36f7 [Icons] Fix LockIconsCommand definition when Iconify disabled
…(Kocal) This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Map] Fix default values of Stimulus Map Controller | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix symfony#2417 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> This issue happens at `doCreateMap` when we called `->fitBoundsToMarkers()` instead of `->center(...)`. The value `center` was supposed to be `null`, but since I forgot to configure the default value of `this.centerValue` to `null`, it automatically used `{}` as default value (https://stimulus.hotwired.dev/reference/values#getters) and it breaks the code. This bug has been introduced in symfony#2385. Commits ------- 4cb91ef [Map] Fix default values of Stimulus Map Controller
This PR was merged into the 2.x branch. Discussion ---------- [Icons] fix small typo in Icons docs | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | n/A | License | MIT Commits ------- bce02be fix small typo in docs
… with Biome and its configuration
…he code base with Biome and its configuration (chadyred) This PR was merged into the 2.x branch. Discussion ---------- Apply natural import order for JS to synchronise the code base with Biome and its configuration | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | License | MIT Hello, `Biome` sounds really good 🧑🔬 , it seems to be a really cool tool, guys ! It applies a rule for ordering import "naturally" (https://biomejs.dev/analyzer/import-sorting/) so, I apply the command to check and fix What about apply it "as is" ? Another alternative will be to disabled the rule. What do you think about that detail ? Maybe, an import needs of a package just above, from another package import, this is what I propose also to disable the rule, WYT ? Thanks ^^ Commits ------- 331a409 chore: Apply natural import order for JS to synchronise the code base with Biome and its configuration
…ce them with check and ci commands Co-authored-by: Florian Cellier <[email protected]>
…int commands, replace them with check and ci commands (Kocal) This PR was merged into the 2.x branch. Discussion ---------- [Meta] Drop format, lint, check-format and check-lint commands, replace them with check and ci commands | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT Following symfony#2423 (comment). When I've migrated from ESLint and Prettier to Biome.js, I kept commands `yarn lint`, `yarn format` (and `yarn check-`) for historical and simplicity reasons, because it was two separate tools. _Now_ that we use a single tool, we can use its two dedicated commands: - [`biome check`](https://biomejs.dev/reference/cli/#biome-check), like `biome format + biome lint + imports sorting` - [`biome ci`](https://biomejs.dev/reference/cli/#biome-ci), for the CI (it does not write files) <img width="1116" alt="image" src="https://github.com/user-attachments/assets/ea3481f8-308a-4a8a-a47f-53692c0a3488"> cc `@chadyred` Commits ------- 36d04ff [Meta] Drop format, lint, check-format and check-lint commands, replace them with check and ci commands
…d HTML, and icons rendering
This PR was merged into the 2.x branch. Discussion ---------- Add documentation check to PR template | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | n/a | License | MIT Hopefully this will prompt contributors to add documentation as required :) Commits ------- 9d86bbf Add documentation check to PR template
This PR was merged into the 2.x branch. Discussion ---------- [Autocomplete] Add EnumType precision | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- d0805f5 Add EnumType precision
…sblondeau, Kocal) This PR was merged into the 2.x branch. Discussion ---------- [Map] Add Marker Icon customization capability | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix symfony#2109 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT A nicely asked feature, adding Marker icon customization, it can be an UX Icon, an URL, or a SVG content: ```php // It can be a UX Icon (requires `symfony/ux-icons` package)... $icon = Icon::ux('fa:map-marker')->width(24)->height(24); // ... or an URL pointing to an image $icon = Icon::url('https://example.com/marker.png')->width(24)->height(24); // ... or a plain SVG string $icon = Icon::svg('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">...</svg>'); $map->addMarker(new Marker( // ... icon: $icon )); ``` ## Rendering  Commits ------- c4f9828 [Map] Rework UxIconRenderer injection 9976692 [Map] Rework SvgIcon and factory method name, UX Icon to get generated HTML, and icons rendering 311689c [Map] Refactor and simplify the way to create a custom Icon 73151f6 [Map] Define IconTypes and IconType in TypeScript dd20dbe feat: custom icon on markers
…n (Kocal) This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Map][Docs] Improve "Interact with the map" section | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> After some public and private interactions on Slack, I think it's time to correctly document `rawOptions` and `extra` features. In bonus, I rewrote and moved some sections in order to be more understandable and logic. Commits ------- 7d82ccb [Map][Docs] Improve "Interact with the map" section
This PR was squashed before being merged into the 2.x branch. Discussion ---------- Fix TwigComponents test when high-deps | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | yes/no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> This PR fixes the following broken checks in high-deps: ``` 1) Symfony\UX\TwigComponent\Tests\Integration\ComponentExtensionTest::testComponentWithConflictBetweenPropsFromTemplateAndClass Failed asserting that exception message 'Cannot define prop "name" in template "components/Conflict.html.twig". Property already defined in component class "Symfony\UX\TwigComponent\Tests\Fixtures\Component\Conflict" in "components/Conflict.html.twig" at line 1.' contains 'Cannot define prop "name" in template "components/Conflict.html.twig". Property already defined in component class "Symfony\UX\TwigComponent\Tests\Fixtures\Component\Conflict".'. 2) Symfony\UX\TwigComponent\Tests\Integration\EmbeddedComponentTest::testAccessingTheHierarchyTooHighThrowsAnException Failed asserting that exception message 'Key "this" for sequence/mapping with keys "app, __embedded" does not exist in "embedded_component_hierarchy_exception.html.twig" at line 2.' contains 'with keys "app, __embedded" does not exist.'. ``` https://github.com/symfony/ux/actions/runs/13929938771/job/38984295237 Commits ------- 11cce99 Fix TwigComponents test when high-deps
…ation (Kocal) This PR was merged into the 2.x branch. Discussion ---------- Document and update CI for Corepack manual installation | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT Yesterday, the Node.js team decided to stop distributing corepack with Node.js, see nodejs/TSC#1697 (comment) There is no other alternative than Corepack for installing Yarn Berry, see https://yarnpkg.com/getting-started/install So, I'm adding the `npm i -g corepack` command where we use/mention `corepack enable`. Commits ------- 2657ecd Document and update CI for Corepack manual installation
…-jean) This PR was merged into the 2.x branch. Discussion ---------- [Turbo] Add Twig Extensions for `meta` tags | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | Docs? | yes | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT Hi, I added Twig extensions for `meta` tags: - `turbo_exempts_page_from_cache` - `turbo_exempts_page_from_preview` - `turbo_page_requires_reload` - `turbo_refreshes_with` - `turbo_refresh_method` - `turbo_refresh_scroll` Commits ------- 14dcfa6 Add Twig Extensions for page refreshes
…use snapshots (Kocal) This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Map] Make renderer tests way easier to maintain, use snapshots | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- 74b9737 [Map] Make renderer tests way easier to maintain, use snapshots
📊 Packages dist files size differenceThanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
|
(Had a quick chat with @mbuliard yesterday — he's making a few adjustments before opening the PR. Stay tuned! 😄 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP, do not merge