-
Notifications
You must be signed in to change notification settings - Fork 2
Material 3 #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PowerKiKi
wants to merge
55
commits into
master
Choose a base branch
from
md3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Material 3 #254
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
3d85826
Material design 3 migration #11936
sambaptista ec825c9
Remove unsued themes #11936
sambaptista a4f87fe
Correct selector for default theme #11936
sambaptista 2d492ad
Fix material version #11936
sambaptista 4cff685
Fine tunings #11936
sambaptista da6f53e
Centralize and finetune theming setup #11936
sambaptista cd7c240
Add themes #11936
sambaptista 4aaa439
Fix tests
sambaptista 931e691
Never i18n `subscriptSizing`
PowerKiKi 85532c9
Never i18n `i18n-matButton`
PowerKiKi 7024a22
Assist more consistent theme #11936
sambaptista 23a7fab
Fix SSR #11936
sambaptista 40cc2b0
Merge branch 'master' into md3
PowerKiKi d6fc5b4
Update projects/natural/src/lib/services/theme.service.ts
sambaptista a5e79a7
Update projects/natural/src/lib/services/theme.service.ts
sambaptista ff5dc1d
Md3 finetunings #11936
sambaptista 3aa8772
Improve merger #11936
sambaptista 0ffe848
MD3 : keep isDark and data-is-dark synched when browser change scheme…
sambaptista 22416a4
Initialize correctly default colorScheme #11936
sambaptista ba2138f
Support browsers that don't support `light-dark()` #11936
PowerKiKi 8aeea67
MD3 typogaphy #11936
sambaptista ee9524f
MD3 typo : headers and paragraphe have no default margins #11936
sambaptista 0c60667
Md3 buttons #11936
sambaptista 8cbf291
Support theming of buttons with dynamic color #11936
sambaptista 8d171ae
Update themes and minor fine tunings #11932
sambaptista 60a29a4
Merge branch 'master' into md3
PowerKiKi 87b938c
Default language is french
PowerKiKi 6e7e3dd
New components are OnPush #11936
PowerKiKi bca6436
Show which theme is selected in opened menu #11936
PowerKiKi bf84089
Don't store theme in local storage #11936
PowerKiKi 02e5407
Lock down NaturalThemeService to avoid misuses #11936
PowerKiKi 58ef83d
Document NaturalThemeService API #11936
PowerKiKi b9e46e4
Reject invalid theme name #11936
PowerKiKi 16253c2
Restore animation during image uploads #11936
PowerKiKi 4257008
Add Copilot instructions #11936
PowerKiKi 342d991
Use standard "Natural" prefix #11936
PowerKiKi c1500fa
Avoid npm warning #11936
PowerKiKi 0bcb150
Enable trusted publishing #11936
PowerKiKi 381a0ec
Node 24 for all CI #11936
PowerKiKi bbf6003
No need for `--access public` after first publish #11936
PowerKiKi 9ae05cc
Update to latest npm #11936
PowerKiKi 9e00d87
Node 24 is enough #11936
PowerKiKi 59d5be0
66.0.13
PowerKiKi 043fdd2
Release requires lint and prettier to pass #11936
PowerKiKi 78b97c9
Drop Gitter #11936
PowerKiKi d4586ac
Upgrade type-fest #11936
PowerKiKi 20dd3c8
Remove useless provider
sambaptista e1eeb53
Better md3 theming for upload #11936
sambaptista a6d1b34
A few more protected members #11936
PowerKiKi 159edcf
Respect file name convention #11936
PowerKiKi c48bae8
Prevent accidental scroll bars #11936
PowerKiKi 2f449b4
New natural-compact-color-schemer #11936
PowerKiKi b710131
Don't auto-fix mat-slider to make it easier to align with other eleme…
PowerKiKi 72eed25
Document requirement of providing themes in most cases #11936
PowerKiKi 73dc026
Merge branch 'master' into md3
PowerKiKi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| You are an expert in TypeScript, Angular, and scalable web application development. You write functional, maintainable, performant, and accessible code following Angular and TypeScript best practices. | ||
|
|
||
| ## TypeScript Best Practices | ||
|
|
||
| - Use strict type checking | ||
| - Prefer type inference when the type is obvious | ||
| - Avoid the `any` type; use `unknown` when type is uncertain | ||
|
|
||
| ## Angular Best Practices | ||
|
|
||
| - Always use standalone components over NgModules | ||
| - Must NOT set `standalone: true` inside Angular decorators. It's the default in Angular v20+. | ||
| - Use signals for state management | ||
| - Implement lazy loading for feature routes | ||
| - Do NOT use the `@HostBinding` and `@HostListener` decorators. Put host bindings inside the `host` object of the `@Component` or `@Directive` decorator instead | ||
| - Use `NgOptimizedImage` for all static images. | ||
| - `NgOptimizedImage` does not work for inline base64 images. | ||
|
|
||
| ## Accessibility Requirements | ||
|
|
||
| - It MUST pass all AXE checks. | ||
| - It MUST follow all WCAG AA minimums, including focus management, color contrast, and ARIA attributes. | ||
|
|
||
| ### Components | ||
|
|
||
| - Keep components small and focused on a single responsibility | ||
| - Use `input()` and `output()` functions instead of decorators | ||
| - Use `computed()` for derived state | ||
| - Set `changeDetection: ChangeDetectionStrategy.OnPush` in `@Component` decorator | ||
| - Prefer inline templates for small components | ||
| - Prefer Reactive forms instead of Template-driven ones | ||
| - Do NOT use `ngClass`, use `class` bindings instead | ||
| - Do NOT use `ngStyle`, use `style` bindings instead | ||
| - When using external templates/styles, use paths relative to the component TS file. | ||
|
|
||
| ## State Management | ||
|
|
||
| - Use signals for local component state | ||
| - Use `computed()` for derived state | ||
| - Keep state transformations pure and predictable | ||
| - Do NOT use `mutate` on signals, use `update` or `set` instead | ||
|
|
||
| ## Templates | ||
|
|
||
| - Keep templates simple and avoid complex logic | ||
| - Use native control flow (`@if`, `@for`, `@switch`) instead of `*ngIf`, `*ngFor`, `*ngSwitch` | ||
| - Use the async pipe to handle observables | ||
| - Do not assume globals like (`new Date()`) are available. | ||
| - Do not write arrow functions in templates (they are not supported). | ||
|
|
||
| ## Services | ||
|
|
||
| - Design services around a single responsibility | ||
| - Use the `providedIn: 'root'` option for singleton services | ||
| - Use the `inject()` function instead of constructor injection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.