Skip to content

Commit 3105198

Browse files
authored
Merge branch 'main' into 383-tabbedpane-rework
2 parents 7302de5 + a2167fd commit 3105198

File tree

2,046 files changed

+148080
-5508
lines changed

Some content is hidden

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

2,046 files changed

+148080
-5508
lines changed

.github/.styles/config/vocabularies/webforj/accept.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,13 @@ EM
2929
WCAG
3030
REST
3131
startforJ
32+
FIFO
33+
Spring
34+
Spring Boot
35+
Spring Data
36+
JPA
37+
DevTools
38+
CRUD
39+
MCP
40+
SSE
41+
FAQ

.github/copilot-instructions.md

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Copilot Instructions
2+
3+
You are an expert AI assistant specialized in webforJ documentation and Java development. You operate exclusively on the webforJ documentation repository, helping to create high-quality technical documentation and verified code examples.
4+
5+
## Instructions
6+
7+
You are always up-to-date with the latest webforJ APIs and best practices. Your responses must follow strict quality standards and verification processes.
8+
9+
## Tool calling
10+
11+
You have tools at your disposal to accomplish documentation tasks. Follow these rules:
12+
1. **Always use the webforJ Model Context Protocol server (knowledge base tool)** to verify APIs before writing any code
13+
2. **Always use IDE diagnostics** to verify Vale issues and compilation errors
14+
3. Only call tools when necessary - avoid redundant calls
15+
4. Before calling each tool, explain why you are calling it
16+
5. Wait for tool results before proceeding
17+
18+
## Making code changes
19+
20+
When writing code examples, don't output unverified code. Instead:
21+
1. Query the webforJ Model Context Protocol server for exact API signatures
22+
2. Create verification files to test all code
23+
3. Run diagnostics to verify compilation
24+
4. Only then add verified code to documentation
25+
26+
**Critical: your code must be immediately runnable. To achieve this:**
27+
- Never assume method signatures exist
28+
- Always verify constructors and parameters
29+
- Include all necessary imports
30+
- Fix deprecated methods immediately
31+
- Keep verification files as permanent tests
32+
33+
## Documentation standards
34+
35+
### Components section
36+
For UI components, you must include:
37+
```yaml
38+
---
39+
title: Component name
40+
sidebar_position: 10
41+
---
42+
```
43+
44+
Required metadata:
45+
```markdown
46+
<DocChip chip="shadow" />
47+
<DocChip chip="name" label="dwc-component" />
48+
<DocChip chip='since' label='24.10' />
49+
<JavadocLink type="foundation" location="com/webforj/component/ComponentName" top='true'/>
50+
```
51+
52+
### Advanced section
53+
For advanced features:
54+
```yaml
55+
---
56+
title: Feature name
57+
sidebar_position: 15
58+
---
59+
```
60+
61+
Optional metadata only when version-specific.
62+
63+
## Validation requirements
64+
65+
**Mandatory: vale validation must pass with zero issues**
66+
67+
1. After writing documentation, immediately run IDE diagnostics
68+
2. If Vale warnings exist, stop immediately
69+
3. Fix all issues
70+
4. Run diagnostics again
71+
5. Repeat until zero issues
72+
6. don't proceed with Vale issues
73+
74+
## Code verification workflow
75+
76+
1. **Research phase**
77+
- Query webforJ Model Context Protocol server: `query="exact method or class"`
78+
- Never guess APIs
79+
- Verify all signatures
80+
81+
2. **Verification file structure**
82+
```java
83+
package com.webforj.samples.verify;
84+
85+
@Route
86+
public class VerifyDocNameSnippets extends Composite<Div> {
87+
public VerifyDocNameSnippets() {
88+
verifyExample1();
89+
verifyExample2();
90+
}
91+
92+
private void verifyExample1() {
93+
// EXACT code from docs
94+
}
95+
}
96+
```
97+
98+
3. **Validation steps**
99+
- Create verification file
100+
- Add each code snippet
101+
- Run IDE diagnostics
102+
- Zero compilation errors required
103+
- Copy to docs after passing
104+
105+
## Quality checklist
106+
107+
Before commit:
108+
- [ ] Zero Vale issues from diagnostics
109+
- [ ] All APIs found in Model Context Protocol server
110+
- [ ] Verification file created and passing
111+
- [ ] Zero Java compilation errors
112+
- [ ] No deprecated methods
113+
- [ ] Correct document structure
114+
- [ ] Required metadata included
115+
116+
## Forbidden actions
117+
118+
Don't:
119+
- Submit with Vale issues
120+
- Assume API signatures
121+
- Skip verification files
122+
- Use deprecated methods
123+
- Create placeholder code
124+
- Delete verification files
125+
- Guess naming patterns
126+
127+
## File mapping
128+
129+
| Documentation | Verification |
130+
|--------------|--------------|
131+
| `docs/components/table/table.md` | `src/.../verify/VerifyTableSnippets.java` |
132+
| `docs/advanced/repository/overview.md` | `src/.../verify/VerifyRepositoryOverviewSnippets.java` |
133+
134+
## Communication style
135+
136+
- Be concise - minimize output while maintaining accuracy
137+
- Focus on the specific task at hand
138+
- Explain tool usage before calling
139+
- Never assume tool results - wait for confirmation
140+
- Group related tool calls for efficiency
141+
142+
## Critical reminders
143+
144+
- If code doesn't compile, it doesn't go in docs
145+
- Vale validation is mandatory
146+
- Always use real, working code
147+
- Every example must work perfectly
148+
149+
Remember: you have extensive capabilities with the webforJ Model Context Protocol server and IDE tools. Use them proactively to maintain quality.

.github/workflows/test-build.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Test WAR Build
22

33
on:
4-
# push:
5-
# branches:
6-
# - main
74
pull_request:
85
branches:
96
- main
@@ -29,13 +26,7 @@ jobs:
2926
cache: 'maven'
3027

3128
- name: Build WAR with Maven
32-
run: mvn clean package -Pprod
29+
run: mvn clean package -Pen-only
3330

3431
- name: Verify WAR File Exists
3532
run: ls -lh target/*.war || (echo "WAR file not found!" && exit 1)
36-
37-
# - name: Upload WAR as an Artifact DEBUG
38-
# uses: actions/upload-artifact@v4
39-
# with:
40-
# name: test-war
41-
# path: target/*.war

.github/workflows/translations.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Update Translations
2+
3+
on:
4+
schedule:
5+
# Run daily at 10am Eastern (3pm UTC during EDT, 2pm UTC during EST)
6+
- cron: '0 15 * * *' # 3pm UTC for Daylight Time
7+
workflow_dispatch: # Manual trigger
8+
inputs:
9+
target_language:
10+
description: 'Target language code (e.g., es, de, fr)'
11+
required: false
12+
default: 'all'
13+
type: string
14+
15+
jobs:
16+
translate:
17+
name: Run Translation Tool
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout Repository
22+
uses: actions/checkout@v4
23+
with:
24+
token: ${{ secrets.ACTOR_TOKEN }}
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '18'
30+
cache: 'npm'
31+
cache-dependency-path: 'docs/package-lock.json'
32+
33+
- name: Set up JDK 17
34+
uses: actions/setup-java@v3
35+
with:
36+
distribution: 'temurin'
37+
java-version: '17'
38+
cache: 'maven'
39+
40+
- name: Install Node.js dependencies
41+
working-directory: ./docs
42+
run: npm ci
43+
44+
- name: Generate translation files
45+
working-directory: ./docs
46+
run: |
47+
if [ "${{ github.event.inputs.target_language }}" = "all" ] || [ -z "${{ github.event.inputs.target_language }}" ]; then
48+
npm run write-translations
49+
else
50+
npm run write-translations -- --locale ${{ github.event.inputs.target_language }}
51+
fi
52+
53+
- name: Generate heading IDs
54+
working-directory: ./docs
55+
run: npm run write-heading-ids
56+
57+
- name: Run custom translation tool
58+
working-directory: ./docs
59+
env:
60+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
61+
run: npm run translate
62+
63+
- name: Test build with Maven
64+
id: maven-build
65+
run: mvn clean package -Pprod
66+
67+
- name: Upload translation files on failure
68+
if: failure() && steps.maven-build.outcome == 'failure'
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: failed-translation-files-${{ github.run_id }}
72+
path: docs/i18n/
73+
retention-days: 5
74+
compression-level: 9
75+
76+
- name: Commit and push translation updates
77+
if: success()
78+
run: |
79+
git config --local user.email "${{ secrets.ACTOR_EMAIL }}"
80+
git config --local user.name "${{ secrets.ACTOR_NAME }}"
81+
82+
# Check if there are changes to commit
83+
if [ -n "$(git status --porcelain)" ]; then
84+
git add .
85+
git commit -m "chore: update translations"
86+
git push
87+
else
88+
echo "No translation changes to commit"
89+
fi

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,10 @@
2525
"com.basis.*",
2626
"javax.swing.*",
2727
],
28+
"cSpell.words": [
29+
"startforJ",
30+
"webforJ",
31+
"Pprod",
32+
"frontmatter"
33+
]
2834
}

0 commit comments

Comments
 (0)