Skip to content

Commit 2357eb6

Browse files
committed
[Toolkit] Delay/hide the "Community Kits" feature, minor fixes
1 parent b45d8b0 commit 2357eb6

File tree

9 files changed

+19
-197
lines changed

9 files changed

+19
-197
lines changed

src/Toolkit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ https://github.com/symfony/ux to create issues or submit pull requests.
1010

1111
## Resources
1212

13-
- [Documentation](https://symfony.com/bundles/ux-toolkit/current/index.html)
13+
- [Documentation](https://ux.symfony.com/bundles/toolkit)
1414
- [Report issues](https://github.com/symfony/ux/issues) and
1515
[send Pull Requests](https://github.com/symfony/ux/pulls)
1616
in the [main Symfony UX repository](https://github.com/symfony/ux)

src/Toolkit/doc/index.rst

Lines changed: 0 additions & 172 deletions
This file was deleted.

src/Toolkit/kits/shadcn/AlertDialog/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "../../../schema-kit-recipe-v1.json",
33
"type": "component",
4-
"name": "AlertDialog",
4+
"name": "Alert Dialog",
55
"description": "A modal dialog that interrupts the user with important content and expects a response.",
66
"copy-files": {
77
"assets/": "assets/",

src/Toolkit/kits/shadcn/AspectRatio/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "../../../schema-kit-recipe-v1.json",
33
"type": "component",
4-
"name": "AspectRatio",
4+
"name": "Aspect Ratio",
55
"description": "A container that maintains a specific width-to-height ratio for its content.",
66
"copy-files": {
77
"templates/": "templates/"

src/Toolkit/kits/shadcn/INSTALL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,3 @@ In your `assets/styles/app.css`, after the TailwindCSS imports, add the followin
9898
}
9999
}
100100
```
101-
102-
And voilà! You are now ready to use Shadcn components in your Symfony project.

src/Toolkit/src/Command/InstallCommand.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
117117
} elseif (1 === $availableKitsCount) {
118118
$kit = $availableKits[0];
119119
} else {
120-
$io->error(
121-
null === $recipeName
122-
? 'It seems that no local kits are available and it should not happens. Please open an issue on https://github.com/symfony/ux to report this.'
123-
: \sprintf("The recipe \"%s\" does not exist in any official kits.\n\nYou can try to run one of the following commands to interactively install recipes:\n%s\n\nOr you can try one of the community kits https://github.com/search?q=topic:ux-toolkit&type=repositories", $recipeName, implode("\n", array_map(fn (string $availableKitName) => \sprintf('$ bin/console %s --kit %s', $this->getName(), $availableKitName), $availableKitNames)))
124-
);
125-
120+
$io->error('It seems that no official kits are available and it should not happens. Please open an issue on https://github.com/symfony/ux to report this.');
126121
return Command::FAILURE;
127122
}
128123
} else {

ux.symfony.com/assets/styles/components/_SidebarNav.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
.SidebarNav {}
1+
.SidebarNav {
2+
position: sticky;
3+
top: 0px
4+
}
25

36
.SidebarNav_Heading {
47
font-weight: 600;
@@ -8,6 +11,10 @@
811
.SidebarNav_Item {
912
border-radius: .5rem;
1013
transition: background-color 100ms ease-in-out;
14+
15+
& + & {
16+
margin-top: .1rem;
17+
}
1118
}
1219
.SidebarNav_Item.active,
1320
.SidebarNav_Item:hover {

ux.symfony.com/src/Controller/Toolkit/ComponentsController.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,6 @@ public function __construct(
3434
) {
3535
}
3636

37-
#[Route('/toolkit/kits/{kit}/components/')]
38-
public function listComponents(ToolkitKitId $kit): Response
39-
{
40-
// TODO: implementing listing in the future :D
41-
42-
return $this->redirectToRoute('app_toolkit_kit', [
43-
'kit' => $kit->value,
44-
], Response::HTTP_FOUND);
45-
}
46-
4737
#[Route('/toolkit/kits/{kitId}/components/{componentName}', name: 'app_toolkit_component')]
4838
public function showComponent(ToolkitKitId $kitId, string $componentName): Response
4939
{

ux.symfony.com/templates/ux_packages/toolkit.html.twig

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,19 @@ tree templates/components
7979
</div>
8080
{% endfor %}
8181

82-
<div class="PackageBox">
82+
<div class="PackageBox" style="position: relative">
83+
<span style="position: absolute; background-color: #e9c502; transform: rotate(-10deg); padding: 3px 8px; top: 10px; left: 0; font-size: 20px; font-weight: bold;">
84+
🚧 <abbr title="Work In Progress">WIP</abbr>!
85+
</span>
86+
8387
<div class="PackageBox_logo" style="--color: #24292f;">
8488
<twig:ux:icon name="flowbite:users-group-solid" style="color: #fff; width: 50%; height: 50%;" />
8589
</div>
8690
<div class="PackageBox_content">
8791
<h2 class="PackageBox_title">
88-
<a href="https://github.com/search?q=topic%3Aux-toolkit&type=repositories" rel="external" class="PackageBox_link">
92+
{# <a href="https://github.com/search?q=topic%3Aux-toolkit&type=repositories" rel="external" class="PackageBox_link"> #}
8993
Community Kits
90-
</a>
94+
{# </a> #}
9195
</h2>
9296

9397
<div class="PackageBox_description">

0 commit comments

Comments
 (0)