Skip to content

Commit dc64529

Browse files
committed
Fix code shaking on interaction; polishing
1 parent 0feff5a commit dc64529

File tree

6 files changed

+36
-5
lines changed

6 files changed

+36
-5
lines changed

.vitepress/config.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ export default defineConfig({
5555
{ text: 'Test Attribute', link: '/docs/test-attribute' },
5656
{ text: 'Naming Conventions', link: '/docs/naming-conventions' },
5757
{ text: 'Inline Tests', link: '/docs/inline-tests' },
58+
{ text: 'Data Providers', link: '/docs/data-providers' },
5859
],
5960
},
6061
{
6162
text: 'Guide',
6263
items: [
6364
{ text: 'CLI Reference', link: '/docs/cli-reference' },
6465
{ text: 'Filtering', link: '/docs/filtering' },
65-
{ text: 'Data Providers', link: '/docs/data-providers' },
6666
],
6767
},
6868
{
@@ -107,14 +107,14 @@ export default defineConfig({
107107
{ text: 'Атрибут Test', link: '/ru/docs/test-attribute' },
108108
{ text: 'Конвенции именования', link: '/ru/docs/naming-conventions' },
109109
{ text: 'Встроенные тесты', link: '/ru/docs/inline-tests' },
110+
{ text: 'Провайдеры данных', link: '/ru/docs/data-providers' },
110111
],
111112
},
112113
{
113114
text: 'Руководство',
114115
items: [
115116
{ text: 'CLI справка', link: '/ru/docs/cli-reference' },
116117
{ text: 'Фильтрация', link: '/ru/docs/filtering' },
117-
{ text: 'Провайдеры данных', link: '/ru/docs/data-providers' },
118118
],
119119
},
120120
{

.vitepress/theme/CodeTabs.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ const getIcon = (tab: Tab) => {
125125
.ide-tab.active {
126126
background: var(--vp-code-block-bg);
127127
color: var(--vp-c-text-1);
128-
border-bottom: 2px solid var(--vp-c-brand-1);
129-
margin-bottom: -1px;
128+
box-shadow: inset 0 -2px 0 var(--vp-c-brand-1);
130129
}
131130
132131
.tab-icon {

.vitepress/theme/style.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ html {
122122
.vp-doc .vp-code-group:hover,
123123
.vp-doc div[class*="language-"]:hover {
124124
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
125-
transform: translateY(-2px);
126125
}
127126

128127
/* Custom info/tip boxes */

CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ ru/ # Russian locale (same structure)
2323
- DON'T show code in features (text only, 1 sentence each)
2424
- Don't mention competitors, use "old solutions"
2525

26+
**Code examples:**
27+
- List of options first, then one code block with all examples (easier to read than many small blocks)
28+
- Keep examples compact — show structure, not implementation (when implementation doesn't matter)
29+
- Show contrast between approaches in examples
30+
31+
**Text structure:**
32+
- Avoid tautology in lists, fix typos
33+
- Small sections sometimes better integrated into existing ones
34+
2635
**Markdown:** Use `::: tip`, `::: warning`, `::: info` blocks
2736

2837
## Working with Content

docs/inline-tests.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,15 @@ public function createUser(string $email): User
105105
// ...
106106
}
107107
```
108+
109+
In PHP 8.6 this becomes even more elegant with [partial application](https://wiki.php.net/rfc/partial_function_application_v2):
110+
111+
```php
112+
use Testo\Assert;
113+
114+
#[TestInline([10, 3], Assert::greaterThan(3, ?))]
115+
public function divide(int $a, int $b): float
116+
{
117+
return $a / $b;
118+
}
119+
```

ru/docs/inline-tests.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,15 @@ public function createUser(string $email): User
105105
// ...
106106
}
107107
```
108+
109+
В PHP 8.6 это станет ещё элегантнее благодаря [partial application](https://wiki.php.net/rfc/partial_function_application_v2):
110+
111+
```php
112+
use Testo\Assert;
113+
114+
#[TestInline([10, 3], Assert::greaterThan(3, ?))]
115+
public function divide(int $a, int $b): float
116+
{
117+
return $a / $b;
118+
}
119+
```

0 commit comments

Comments
 (0)