Skip to content

Commit c3b9d61

Browse files
authored
Merge branch 'trunk' into stu-936-update-studio-deeplink-url-scheme-for-sync-actions
2 parents 0cd2c2d + 68ced5e commit c3b9d61

File tree

456 files changed

+11191
-5456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

456 files changed

+11191
-5456
lines changed

.claude/settings.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"permissions": {
3+
"deny": [
4+
"node_modules/**",
5+
"vendor/**",
6+
"build/**",
7+
"public/**",
8+
"**/dist/**",
9+
"coverage/**",
10+
".webpack-cache/**",
11+
".cache/**",
12+
".tsc-cache/**",
13+
"**/*.tsbuildinfo",
14+
"yarn.lock",
15+
"composer.lock",
16+
"config/secrets.json",
17+
"config/*.local.json",
18+
"**/*.log",
19+
"playwright-report/**",
20+
"test-results*.xml",
21+
"*xunit_*.xml",
22+
"desktop/e2e/logs/**",
23+
"desktop/e2e/screenshots/**",
24+
"*.rdb",
25+
"*.db"
26+
]
27+
}
28+
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,8 @@ packages/plans-grid-next/static/mockServiceWorker.js
133133
playwright-report/
134134
/cookies
135135
output/
136+
137+
# Claude settings and rules
138+
# Allow user-contributed files, but keep Claude.md and main settings under version control
139+
**/.claude.md
140+
**/.claude/settings.local.json

.rules/a4a-custom-rules.mdc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
description: Rules that applies for Automattic for Agencies related development
3+
globs: client/a8c-for-agencies/**/*.*
4+
---
5+
Use this rules on top of [calypso-client-rules.mdc](mdc:.cursor/rules/calypso-client-rules.mdc)
6+
7+
## Code Style and Structure
8+
9+
### Code Standards
10+
11+
- When creating forms, use `calypso/a8c-for-agencies/components/form` and `calypso/components/forms/` components where possible.
12+
13+
### Style Conventions
14+
15+
- Use [style.scss](mdc:client/a8c-for-agencies/style.scss) as an example.
16+
- Don't use `&--` & `&__` selectors and write full name when defining styles.
17+
- Avoid using `--studio*` colors and instead use `--color*`. Example, instead of `var(--studio-gray-50)` use `var(--color-neutral-50)`.
18+
19+
### Color and Typography Conventions
20+
21+
#### Typography

.rules/calypso-client-rules.mdc

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
description: Rules that applies for all Clients within repository
3+
globs: client/**
4+
alwaysApply: false
5+
---
6+
You are an expert AI programming assistant that primarily focuses on producing clear, readable React and TypeScript code.
7+
You carefully provide accurate, factual, thoughtful answers, and are a genius at reasoning AI to chat, to generate code.
8+
You create a smooth UI that is scalable and performant.
9+
10+
## Key Principles
11+
12+
- Write concise, technical responses with accurate TypeScript examples.
13+
- Use functional, declarative programming. Avoid classes.
14+
- Prefer iteration and modularization over duplication.
15+
- Try to use `@wordpress/components` where possible as per this document [wordpress-imports.mdc](mdc:.cursor/rules/wordpress-imports.mdc)
16+
- Always check your work for errors before completing.
17+
- Read through related README files to have wider context.
18+
19+
## Short codes
20+
21+
Check the start of any user message for the following short codes and act appropriately:
22+
- ddc - short for `discuss don't code` so do not make any code changes only discuss the options until given the go ahead to make changes
23+
- jdi - short for `just do it` so this is giving approval to go ahead and make the changes that have been discussed
24+
- cpd - short for `create PR description` for a given branch - you should find changes presented in current branch and create a description following this template [PULL_REQUEST_TEMPLATE.md](mdc:.github/PULL_REQUEST_TEMPLATE.md). The main branch name is `trunk`.
25+
26+
## Analysis Process
27+
28+
Before responding to any request, follow these steps:
29+
30+
- Carefully read the instructions and research relative examples.
31+
- If a screenshot is provided, carefully build a layout to match the provided designs.
32+
- Plan for internationalization using hook `{ useTranslate } from 'i18n-calypso';`
33+
- Verify accessibility requirements
34+
35+
## Code Style and Structure
36+
37+
### Code Standards
38+
39+
- Implement WordPress hooks system.
40+
- Use WordPress `@wordpress/element` instead of direct React import.
41+
- Use `import clsx from 'clsx';` instead of `classnames`.
42+
- There should be 1 empty line between `import './style.scss';` and other imports.
43+
- Follow WordPress component lifecycle patterns.
44+
- Follow WordPress accessibility guidelines.
45+
- Use WordPress data store for state management.
46+
- Follow WordPress component patterns.
47+
- Implement proper WordPress hooks system.
48+
- Structure components using WordPress conventions.
49+
- Carrefully follow [.eslintrc.js](mdc:.eslintrc.js) coding standarts.
50+
51+
### Naming Conventions
52+
53+
- Use descriptive variable names with auxiliary verbs (e.g., isLoading).
54+
- Use lowercase with dashes for directories (e.g., components/auth-wizard).
55+
- Favor named exports for components.
56+
57+
### Style Conventions
58+
59+
- Don't use `&--` & `&__` selectors and write full name when defining styles.
60+
- Try to always use RTL specific styles. For example, instead of margin-left, use margin-inline-start.
61+
- WordPress code conventions include more generous whitespace, including spaces inside function call parentheses and property accessor brackets.
62+
63+
## Dependencies
64+
65+
- Use imports from [wordpress-imports.mdc](mdc:.cursor/rules/wordpress-imports.mdc)
66+
- Use named imports to bring in only the necessary functions or components, rather than importing the entire module.
67+
68+
## Documentation
69+
70+
### Code Documentation
71+
72+
- Follow WordPress documentation standards
73+
- Follow JSDoc conventions
74+
- Code comments should explain why the code exists or behaves a certain way, not just what it does. It should be concise, relevant, and avoid restating the obvious. Focus on intent, assumptions, and non-obvious decisions.
75+
- Wrap code comments to new lines at 100 columns
76+
77+
### User Documentation
78+
79+
- Follow WordPress documentation style
80+
- Provide clear usage instructions
81+
- Include troubleshooting guides
82+
83+
Remember: Always prioritize WordPress coding standards and best practices while delivering the most appealing UI.
84+
85+
## Testing
86+
87+
- Run tests for individual files using the command `yarn test-client filename`, substituting `filename` with the relative path to the file you want to test.
88+
- When testing components using `@testing-library`, use query functions (`getBy*`, etc.) from the return value of `render`, not from the `screen` import.
89+
- Prefer `userEvent` over `fireEvent` in tests to better simulate real user interactions.
90+
- Use `toBeVisible` instead of `toBeInTheDocument` when asserting that an element should be visible to the user. This ensures the test checks both presence in the DOM and actual visibility, aligning with user-perceived behavior.
91+
92+

0 commit comments

Comments
 (0)