Skip to content

Commit f0a7b22

Browse files
authored
Merge branch 'main' into copilot/identify-memory-leaks
2 parents 2ff1841 + 6cd26e3 commit f0a7b22

150 files changed

Lines changed: 9181 additions & 671 deletions

File tree

Some content is hidden

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

.github/copilot-instructions.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
Add corrections to the relevant section (Critical Patterns, Common Pitfalls, etc.) or create a new section if needed.
1111

12+
## Skills
13+
**IMPORTANT**: Before performing any task, always check `.github/skills/` and `.github/agents/` for applicable skill and agent files. Each subfolder contains a `SKILL.md` or agent definition with specific workflows, templates, trigger phrases, and rules that MUST be followed when their trigger conditions match.
14+
15+
**Workflow**: List all folders in `.github/skills/` and `.github/agents/` (if they exist), read each definition file to check if it applies to the current task, and follow its steps exactly.
16+
1217
## Project Overview
1318
DIPS.Mobile.UI is a .NET MAUI component library for iOS and Android mobile apps in the healthcare domain. Components follow a design system with resources (colors, sizes, icons) auto-generated from Figma via DIPS.Mobile.DesignTokens pipeline.
1419

@@ -228,6 +233,17 @@ Example divider usage:
228233

229234
Format: `[Component/Feature] Description` (see existing entries for style)
230235

236+
**Changelog rules (strictly enforced):**
237+
- Only include **public-facing changes**: new APIs, changed behavior, bug fixes visible to consumers
238+
- Do **not** include internal refactorings, code cleanup, sample changes, or test changes
239+
- Do **not** include changes to non-public (`internal`/`private`) APIs
240+
241+
**Documentation rules (strictly enforced):**
242+
- Every new **public** type, property, method, or component MUST have XML doc comments
243+
- Every new **component or feature** MUST have a `wiki/<FeatureName>.md` page added in the same PR
244+
- Changed behavior or API MUST update existing wiki pages — cross-reference changed code against `wiki/` to catch stale docs
245+
- Breaking changes MUST update all affected wiki pages
246+
231247
## Common Pitfalls
232248

233249
1. **Don't** manually append "Button" to accessibility strings - `TouchPlatformEffect` handles this
@@ -236,7 +252,8 @@ Format: `[Component/Feature] Description` (see existing entries for style)
236252
4. **Don't** create new colors/sizes - use design token resources or request from designers
237253
5. **Don't** use invalid style names like `Body500` - use `SectionHeader`, `UI100-300`, etc.
238254
6. **Don't** use `FontFamily="monospace"` - use `FontFamily="Body"`, `"UI"`, or `"Header"`
239-
5. **Don't** forget to test on both platforms - behavior often differs
255+
7. **Don't** forget to test on both platforms - behavior often differs
256+
8. **When reusing an existing component in a new context** (e.g. embedding a component inside a new handler, effect, or renderer), always read the component's existing canonical platform consumer first and replicate **all** of its event subscriptions, lifecycle hooks, and teardown logic. Never assume that rendering the component is sufficient. Components often have additional contracts (update events, binding context propagation, etc.) that only the canonical consumer reveals. Missing these causes silent regressions where the component renders correctly initially but fails to update afterwards.
240257

241258
## Key Files to Reference
242259
- `API/Builder/AppHostBuilderExtensions.cs` - Library initialization and handler registration
@@ -248,4 +265,6 @@ Format: `[Component/Feature] Description` (see existing entries for style)
248265
All code uses `DIPS.Mobile.UI.*` namespace. Platform folders (iOS/Android/dotnet) use same namespace as parent - no `.iOS` suffix.
249266

250267
## Wiki
251-
The codebase is documented in https://github.com/DIPSAS/DIPS.Mobile.UI/wiki
268+
The codebase is documented in https://github.com/DIPSAS/DIPS.Mobile.UI/wiki
269+
270+
Documentation source lives in the `wiki/` folder in the main repository and is auto-synced to the GitHub wiki via a GitHub Action on pushes to `main`. The `_Sidebar.md` is auto-generated alphabetically from all wiki pages — no manual sidebar edits needed.

.github/instructions/create_pr.instructions.md

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
name: Write Component Documentation
3+
description: Generates wiki documentation for new DIPS.Mobile.UI components following established patterns and conventions.
4+
---
5+
6+
# Write Component Documentation
7+
8+
When asked to write documentation for a new component, generate a `wiki/<ComponentName>.md` page following the template and rules below.
9+
10+
## Trigger Phrases
11+
12+
- "Document this component"
13+
- "Write wiki page"
14+
- "Add documentation"
15+
- "Create wiki doc"
16+
17+
## Before Writing
18+
19+
1. **Read the component source code** — understand all public properties, bindable properties, events, commands, and options classes
20+
2. **Check for sub-components or variants** — e.g., `NavigationListItem` alongside `ListItem`, `FilledCheckBox` alongside `CheckBox`
21+
3. **Check for platform differences** — look at iOS/Android partial classes for behavioral differences
22+
4. **Check accessibility support** — does the component set semantic properties, use `TouchPlatformEffect`, or have accessibility-specific features?
23+
5. **Look at the sample app** — check `ComponentsSamples/` or `AccessibilitySamples/` for usage examples
24+
25+
## Template
26+
27+
Use the following structure. Sections marked **(if applicable)** should only be included when relevant.
28+
29+
```markdown
30+
<Short description of what the component is — 1-2 sentences. Written before any heading. Explain the purpose and when to use it.>
31+
32+
# Inspiration **(if applicable)**
33+
34+
<Links to design guidelines that inspired the component, e.g., Material Design, Apple Human Interface Guidelines.>
35+
36+
# Usage
37+
38+
<XAML example showing the most common/basic usage of the component.>
39+
40+
> <Any important notes about defaults, required properties, or common gotchas.>
41+
42+
# Styles **(if applicable)**
43+
44+
<List available styles/variants with a brief description of each.>
45+
46+
# Tips and tricks **(if applicable)**
47+
48+
<Practical guidance: recommended patterns, common combinations with other components, or things to watch out for.>
49+
50+
# Accessibility **(if applicable)**
51+
52+
<How the component behaves with VoiceOver/TalkBack. Any required semantic properties. Special accessibility features.>
53+
54+
# Properties
55+
56+
Inspect the [components properties class](<GitHub URL to .Properties.cs file>) to further customise and use it.
57+
```
58+
59+
### Sub-Component Pattern
60+
61+
When the component has variants or related sub-components, add them as `##` sections after the main component, each with their own `### Usage` and `### Properties`:
62+
63+
```markdown
64+
## SubComponentName
65+
66+
<Brief description of the sub-component.>
67+
68+
### Usage
69+
70+
<XAML example>
71+
72+
### Properties
73+
74+
Inspect the [components properties class](<GitHub URL>) to further customise and use it.
75+
```
76+
77+
## Writing Rules
78+
79+
### Intro
80+
- Start with a plain-text paragraph **before any heading** — describe what the component is and when people would use it
81+
- Keep it to 1-2 sentences
82+
83+
### Usage Sections
84+
- Always include at least one XAML code block with `xml` as the language tag
85+
- Use the `dui:` XML namespace prefix — do not show `xmlns` declarations (readers already know this)
86+
- Show the simplest working example first, then more advanced configurations
87+
- If C# code-behind is needed (e.g., ViewModel bindings, event handlers), include it after the XAML block using `csharp` as the language tag
88+
89+
### Properties
90+
- Always link to the `.Properties.cs` file on GitHub: `https://github.com/DIPSAS/DIPS.Mobile.UI/blob/main/src/library/DIPS.Mobile.UI/<path>/<Component>.Properties.cs`
91+
- Use the standard phrasing: *"Inspect the [components properties class](URL) to further customise and use it."*
92+
- This should be the **last section** (or last sub-section per component)
93+
94+
### Callouts
95+
- Use blockquotes (`>`) for notes, warnings, and platform-specific differences
96+
- Bold the callout type: `> **NB!**`, `> **NOTE:**`, `> **Important:**`
97+
- Use callouts for: default values, platform differences (iOS vs Android), UX warnings, required configurations
98+
99+
### Style
100+
- Use `#` (h1) for major sections
101+
- Use `##` (h2) for sub-components
102+
- Use `###` (h3) for sections within a sub-component
103+
- Be concise — developers scan documentation, not read it cover-to-cover
104+
- Write in present tense: *"The component displays..."* not *"The component will display..."*
105+
- Address the reader as *"you"*: *"Use this when you need..."*
106+
- Refer to end-users as *"people"*: *"People can tap to..."*
107+
108+
### What NOT to Include
109+
- No namespace/xmlns declarations (unless the component requires a non-standard namespace)
110+
- No installation or NuGet instructions
111+
- No `_Sidebar.md` references — it is auto-generated
112+
- No Figma links (designers maintain those separately)
113+
- Do not document internal/private APIs — only public-facing properties and usage
114+
115+
### File Placement (wiki/ folder structure)
116+
117+
The `wiki/` folder is organized into group folders. Place new documentation in the appropriate group:
118+
119+
| Folder | What goes here |
120+
|--------|---------------|
121+
| `Components/` | UI elements: buttons, labels, list items, pickers, checkboxes, etc. |
122+
| `Layout & Navigation/` | Page structure, navigation, sheets, tabs, search |
123+
| `Media/` | Camera, images, audio |
124+
| `Feedback & State/` | Alerts, dialogs, loading indicators, state views |
125+
| `Styling & Resources/` | Colors, icons, sizes, animations, converters |
126+
| `Interaction & Accessibility/` | Touch, accessibility, input behaviors |
127+
| `Guides/` | How-to guides, performance tips, general patterns |
128+
129+
- **New component?** → Place in the matching group folder (most likely `Components/`)
130+
- **Nothing fits?** → Create a new group folder and place the file there
131+
- **Root-level files** (`Home.md`, `Getting-Started.md`) are reserved for top-level pages only
132+
- The sidebar and wiki sync are handled automatically — just add the `.md` file to the right folder

.github/skills/pr-create/SKILL.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: Create PR
3+
description: Creates a pull request with proper title, description, changelog updates, and wiki documentation checks.
4+
---
5+
6+
# Pull Request Creation Instructions
7+
8+
## Trigger Phrases
9+
When I say **any** of these:
10+
- "Create PR"
11+
- "Make PR"
12+
- "PR"
13+
- "Create Pull Request"
14+
- "Make a PR"
15+
- "Generate PR"
16+
- "Generate PR description"
17+
18+
## Action Steps
19+
1. **Check changes**: Get the diff between main branch and current branch
20+
2. **Update CHANGELOG.md** (only if `src/` has changes): Determine if Major/Minor/Patch bump is needed based on:
21+
- **Major**: Breaking changes (removed/changed public APIs)
22+
- **Minor**: New features (new components, properties, methods)
23+
- **Patch**: Bug fixes, internal improvements, accessibility fixes
24+
- Follow existing CHANGELOG.md format: `[Component/Feature] Description`
25+
- **Skip** if the PR has no changes under `src/` — documentation-only, build scripts, CI/CD, and config changes do not require a changelog entry
26+
3. **Wiki documentation**: Check if documentation in `wiki/` needs to be added or updated:
27+
- **New feature?****MUST** add a new `wiki/<FeatureName>.md` page
28+
- **Changed behavior/API?****MUST** update the relevant existing wiki page
29+
- **Breaking change?****MUST** update wiki to reflect the new behavior
30+
- The sidebar is auto-generated — just add the `.md` file to `wiki/`
31+
4. **Generate PR**: Create pull request with title and body, **always** using the PR template from `.github/pull_request_template.md` as the body structure. Read the template file first and fill in each section — never invent a different structure.
32+
33+
## PR Format Requirements
34+
35+
### Title
36+
- Short and imperative (e.g., "Add accessibility support to Touch effect")
37+
- No "Fixed" or past tense - use present tense
38+
- Mention component/area if applicable
39+
40+
### Body
41+
**Always** use `.github/pull_request_template.md` as the base. Read it before writing the body. Fill in every section — do not skip or reorder sections, do not add sections not in the template.
42+
43+
## Additional Considerations
44+
45+
### Wiki Documentation
46+
Documentation lives in the `wiki/` folder and is auto-synced to the GitHub wiki on merge to main.
47+
- **New features**: A wiki page in `wiki/` is **required** — not optional. Add it in the PR.
48+
- **Changed behavior**: Update the relevant `wiki/*.md` page in the same PR.
49+
- **Breaking changes**: Wiki must reflect the new API/behavior.
50+
- The `_Sidebar.md` is auto-generated from filenames — no manual sidebar edits needed.
51+
52+
### Tone and Style
53+
- **Clear**: Easy to understand what changed
54+
- **Professional**: No informal language
55+
- **Concise**: Avoid unnecessary context or repetition
56+
- **Specific**: Reference actual files, components, and patterns

0 commit comments

Comments
 (0)