Skip to content

[CalendarLink] Add component#3460

Open
zairigimad wants to merge 10 commits intosymfony:3.xfrom
zairigimad:feat/component-calendar-link
Open

[CalendarLink] Add component#3460
zairigimad wants to merge 10 commits intosymfony:3.xfrom
zairigimad:feat/component-calendar-link

Conversation

@zairigimad
Copy link
Copy Markdown
Contributor

@zairigimad zairigimad commented Apr 12, 2026

Q A
Bug fix? no
New feature? yes
Deprecations? no
Documentation? no
Issues Fix #3308 ...
License MIT

This new component address the #3308 idea , it provide twig functions as proposed by (@Kocal) with an easy way to configure calendar links , it supports Google Calendar, Microsoft Outlook and Ics.

I did not include a dropdown in the component since we can use any other dropdown from any Kit or custom Dropdown.

Capture d’écran 2026-04-12 à 16 31 23

@carsonbot carsonbot added Deprecation Feature New Feature Status: Needs Review Needs to be reviewed labels Apr 12, 2026
@zairigimad zairigimad marked this pull request as draft April 12, 2026 15:58
@zairigimad zairigimad force-pushed the feat/component-calendar-link branch 6 times, most recently from b7c7159 to 4da188d Compare April 12, 2026 16:20
@zairigimad zairigimad marked this pull request as ready for review April 13, 2026 14:25
@Kocal
Copy link
Copy Markdown
Member

Kocal commented Apr 14, 2026

Hi, Symfony UX 3.0 has been released, and the 2.x branch is no longer maintained.

Could you please retarget this PR to the 3.x branch instead? That way we can review and merge it in the currently supported version.

Thanks!

@Kocal Kocal added Status: Needs Work Additional work is needed and removed Status: Needs Review Needs to be reviewed labels Apr 14, 2026
@zairigimad zairigimad force-pushed the feat/component-calendar-link branch from bb5ab31 to 13a1fc5 Compare April 15, 2026 15:42
@zairigimad zairigimad requested a review from Kocal as a code owner April 15, 2026 15:42
@carsonbot carsonbot added Status: Needs Review Needs to be reviewed and removed Status: Needs Work Additional work is needed labels Apr 15, 2026
@zairigimad zairigimad changed the base branch from 2.x to 3.x April 15, 2026 15:42
@github-actions
Copy link
Copy Markdown
Contributor

📊 Packages dist files size difference

Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
Please review the changes and make sure they are expected.

FileBefore (Size / Gzip)After (Size / Gzip)
LazyImage
controller.d.ts 395 B / 257 B Removed
controller.js 904 B / 457 B Removed
Map
abstract_map_controller.d.ts 7.6 kB / 1.49 kB 7.29 kB-4% 📉 / 1.46 kB-2% 📉
abstract_map_controller.js 4.92 kB / 1.4 kB 4.65 kB-5% 📉 / 1.26 kB-10% 📉
Map (Bridge Google)
map_controller.d.ts 10.56 kB / 1.92 kB 10.26 kB-3% 📉 / 1.9 kB-1% 📉
map_controller.js 12.9 kB / 3.19 kB 11.25 kB-13% 📉 / 2.84 kB-11% 📉
Map (Bridge Leaflet)
map_controller.d.ts 9.92 kB / 1.84 kB 9.61 kB-3% 📉 / 1.81 kB-2% 📉
map_controller.js 12.45 kB / 3.36 kB 11.38 kB-9% 📉 / 3.17 kB-6% 📉
Svelte
components.d.ts 200 B / 150 B Removed
components.js 46 B / 69 B Removed
loader.d.ts 435 B / 217 B Removed
loader.js 553 B / 313 B Removed
register_controller.d.ts 384 B / 235 B Removed
register_controller.js 531 B / 303 B Removed
render_controller.d.ts 629 B / 353 B Removed
render_controller.js 1.05 kB / 493 B Removed
Swup
controller.d.ts 1012 B / 360 B Removed
controller.js 1.71 kB / 653 B Removed
TogglePassword
controller.d.ts 896 B / 355 B Removed
controller.js 2.64 kB / 1.07 kB Removed
style.min.css 312 B / 218 B Removed
Typed
controller.d.ts 1.9 kB / 501 B Removed
controller.js 1.8 kB / 638 B Removed

@Kocal Kocal removed the Deprecation label Apr 17, 2026
@Kocal Kocal changed the title [CalendarLink] Init CalendarLink component [CalendarLink] Add component Apr 17, 2026
Copy link
Copy Markdown
Member

@Kocal Kocal left a comment

Choose a reason for hiding this comment

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

Thanks for working on this component!

Please ensure to read the whole review before starting anything, my mind changed during the review and I'm sure we don't need a dedicated route (and everything related) for downloading a .ics file.

Thanks you!

Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/src/Controller/IcsDownloadController.php Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/src/Ics/IcsBuilder.php Outdated
Comment thread src/CalendarLink/src/UXCalendarLinkBundle.php Outdated
Comment thread src/CalendarLink/src/UXCalendarLinkBundle.php Outdated
Comment thread src/CalendarLink/.symfony.bundle.yaml Outdated
Comment thread src/CalendarLink/CHANGELOG.md Outdated
Comment thread src/CalendarLink/CHANGELOG.md Outdated
@carsonbot carsonbot added Status: Needs Work Additional work is needed and removed Status: Needs Review Needs to be reviewed labels Apr 17, 2026
@carsonbot carsonbot added Status: Needs Review Needs to be reviewed and removed Status: Needs Work Additional work is needed labels Apr 18, 2026
@zairigimad zairigimad force-pushed the feat/component-calendar-link branch from 405061c to 8348232 Compare April 18, 2026 14:51
@zairigimad
Copy link
Copy Markdown
Contributor Author

The package must also be added in the subtree split configuration file, at the repo's root

I did a large cleanup here and the CI is green.

Copy link
Copy Markdown
Member

@Kocal Kocal left a comment

Choose a reason for hiding this comment

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

New round

Comment thread src/CalendarLink/config/services.php Outdated
Comment thread src/CalendarLink/doc/index.rst
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
@carsonbot carsonbot added Status: Needs Work Additional work is needed Status: Needs Review Needs to be reviewed and removed Status: Needs Review Needs to be reviewed Status: Needs Work Additional work is needed labels Apr 21, 2026
@zairigimad zairigimad requested a review from Kocal April 21, 2026 14:29
@zairigimad zairigimad force-pushed the feat/component-calendar-link branch from 74889b4 to c83ae65 Compare April 21, 2026 14:30
@zairigimad zairigimad force-pushed the feat/component-calendar-link branch from c83ae65 to 3920086 Compare April 21, 2026 14:38
Copy link
Copy Markdown
Member

@Kocal Kocal left a comment

Choose a reason for hiding this comment

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

Thanks for taking care about my previous comments, here some new ones.

Overall it looks fine, but I still want to take some time to try it inside a real project.

Thanks!

Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/src/Ics/IcsBuilder.php Outdated
Comment thread src/CalendarLink/tests/Ics/IcsBuilderTest.php Outdated
Comment thread src/CalendarLink/README.md Outdated
Comment thread src/CalendarLink/README.md Outdated
Comment thread src/CalendarLink/README.md Outdated
Comment thread src/CalendarLink/README.md Outdated
@carsonbot carsonbot added Status: Needs Work Additional work is needed and removed Status: Needs Review Needs to be reviewed labels Apr 26, 2026
Comment thread src/CalendarLink/phpunit.xml.dist
Copy link
Copy Markdown
Member

@Kocal Kocal left a comment

Choose a reason for hiding this comment

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

More comments

Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
@carsonbot carsonbot added Status: Needs Review Needs to be reviewed and removed Status: Needs Work Additional work is needed labels Apr 29, 2026
@zairigimad zairigimad requested a review from Kocal April 29, 2026 13:14
Comment thread src/CalendarLink/src/Provider/IcsCalendarLinkProvider.php Outdated
Comment thread src/CalendarLink/doc/index.rst Outdated
Comment thread src/CalendarLink/tests/Provider/OutlookCalendarLinkProviderTest.php
Comment thread src/CalendarLink/doc/index.rst
@zairigimad zairigimad force-pushed the feat/component-calendar-link branch from 2e7cc5d to 3078044 Compare April 30, 2026 16:21
Copy link
Copy Markdown
Member

@Kocal Kocal left a comment

Choose a reason for hiding this comment

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

LGTM, with some comments in tests.

I will try to take some time ASAP to test it

Comment on lines +28 to +32
$uuid = Uuid::fromString('0192a5d2-7c6f-7000-8000-000000000000');
$factory = $this->createStub(UuidFactory::class);
$factory->method('create')->willReturn($uuid);

$this->builder = new IcsBuilder($factory);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is wrong, the whole point for using Symfony UID and the UuidFactory is to use the MockUuidFactory in tests.
If I'm not wrong, it should be something like that

Suggested change
$uuid = Uuid::fromString('0192a5d2-7c6f-7000-8000-000000000000');
$factory = $this->createStub(UuidFactory::class);
$factory->method('create')->willReturn($uuid);
$this->builder = new IcsBuilder($factory);
$this->builder = new IcsBuilder(new MockUuidFactory([
Uuid::fromString('0192a5d2-7c6f-7000-8000-000000000000')
]));

protected function tearDown(): void
{
$this->kernel->shutdown();
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it can be replaced by:

Suggested change
}
final class BundleIntegrationTest extends KernelTestCase
{
protected static function getKernelClass(): string
{
return TestKernel::class;
}

or even this, since KERNEL_CLASS is already configured in the PHPUnit config file:

Suggested change
}
final class BundleIntegrationTest extends KernelTestCase
{

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New Feature Status: Reviewed Has been reviewed by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Add to calendar" component

3 participants