Skip to content

Commit 146c8f3

Browse files
committed
Rewrite app with feature-complete editors
Completely rebuilds the application to address functionality gaps and improve performance. Key Changes: - **Framework Upgrade**: Updates from Angular 19 to Angular 21.1, leveraging the latest standalone component patterns and strict typing. - **Architecture**: Transitions state management to a fully reactive, Signals-based architecture via `DataStateService` for predictable data flow. - **Ontology Editor**: Implements a fully functional tree editor with drag-and-drop hierarchy management, term creation, and OBO parsing, replacing previous limited functionality. - **Metadata Editor**: Introduces a comprehensive, tabbed interface for editing `metadata.json`, featuring complex array handling, validation, and support for nested objects. - **File System Integration**: Refines the File System Access API implementation for better stability, error handling, and cross-browser fallback support. - **UI/UX**: Complete restyling with a responsive, variable-based CSS system and dark mode support.
1 parent f54ef6d commit 146c8f3

205 files changed

Lines changed: 12285 additions & 22160 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.

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ trim_trailing_whitespace = true
1010

1111
[*.ts]
1212
quote_type = single
13+
ij_typescript_use_double_quotes = false
1314

1415
[*.md]
1516
max_line_length = off

.github/workflows/deploy-pages.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v6
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v6
27+
with:
28+
node-version: 20
29+
cache: npm
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build
35+
run: npm run build -- --base-href "/${{ github.event.repository.name }}/" --output-path=dist
36+
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v4
39+
with:
40+
path: dist
41+
42+
deploy:
43+
needs: build
44+
runs-on: ubuntu-latest
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
steps:
49+
- name: Deploy
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.github/workflows/main.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# See http://help.github.com/ignore-files/ for more about ignoring files.
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
22

33
# Compiled output
44
/dist
@@ -26,6 +26,7 @@ yarn-error.log
2626
!.vscode/tasks.json
2727
!.vscode/launch.json
2828
!.vscode/extensions.json
29+
!.vscode/mcp.json
2930
.history/*
3031

3132
# Miscellaneous
@@ -36,11 +37,8 @@ yarn-error.log
3637
/libpeerconnection.log
3738
testem.log
3839
/typings
40+
__screenshots__/
3941

4042
# System files
4143
.DS_Store
4244
Thumbs.db
43-
44-
# Executable files
45-
/backend/*
46-
!/backend/*.go

.prettierrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.vscode/mcp.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
// For more information, visit: https://angular.dev/ai/mcp
3+
"mcpServers": {
4+
"angular-cli": {
5+
"command": "npx",
6+
"args": ["-y", "@angular/cli", "mcp"]
7+
}
8+
}
9+
}

.vscode/tasks.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"background": {
1313
"activeOnStart": true,
1414
"beginsPattern": {
15-
"regexp": "(.*?)"
15+
"regexp": "Changes detected"
1616
},
1717
"endsPattern": {
18-
"regexp": "bundle generation complete"
18+
"regexp": "bundle generation (complete|failed)"
1919
}
2020
}
2121
}
@@ -30,10 +30,10 @@
3030
"background": {
3131
"activeOnStart": true,
3232
"beginsPattern": {
33-
"regexp": "(.*?)"
33+
"regexp": "Changes detected"
3434
},
3535
"endsPattern": {
36-
"regexp": "bundle generation complete"
36+
"regexp": "bundle generation (complete|failed)"
3737
}
3838
}
3939
}

AGENTS.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
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.
3+
4+
## TypeScript Best Practices
5+
6+
- Use strict type checking
7+
- Prefer type inference when the type is obvious
8+
- Avoid the `any` type; use `unknown` when type is uncertain
9+
10+
## Angular Best Practices
11+
12+
- Always use standalone components over NgModules
13+
- Must NOT set `standalone: true` inside Angular decorators. It's the default in Angular v20+.
14+
- Use signals for state management
15+
- Implement lazy loading for feature routes
16+
- Do NOT use the `@HostBinding` and `@HostListener` decorators. Put host bindings inside the `host` object of the `@Component` or `@Directive` decorator instead
17+
- Use `NgOptimizedImage` for all static images.
18+
- `NgOptimizedImage` does not work for inline base64 images.
19+
20+
## Accessibility Requirements
21+
22+
- It MUST pass all AXE checks.
23+
- It MUST follow all WCAG AA minimums, including focus management, color contrast, and ARIA attributes.
24+
25+
### Components
26+
27+
- Keep components small and focused on a single responsibility
28+
- Use `input()` and `output()` functions instead of decorators
29+
- Use `computed()` for derived state
30+
- Set `changeDetection: ChangeDetectionStrategy.OnPush` in `@Component` decorator
31+
- Prefer inline templates for small components
32+
- Prefer Reactive forms instead of Template-driven ones
33+
- Do NOT use `ngClass`, use `class` bindings instead
34+
- Do NOT use `ngStyle`, use `style` bindings instead
35+
- When using external templates/styles, use paths relative to the component TS file.
36+
37+
## State Management
38+
39+
- Use signals for local component state
40+
- Use `computed()` for derived state
41+
- Keep state transformations pure and predictable
42+
- Do NOT use `mutate` on signals, use `update` or `set` instead
43+
44+
## Templates
45+
46+
- Keep templates simple and avoid complex logic
47+
- Use native control flow (`@if`, `@for`, `@switch`) instead of `*ngIf`, `*ngFor`, `*ngSwitch`
48+
- Use the async pipe to handle observables
49+
- Do not assume globals like (`new Date()`) are available.
50+
- Do not write arrow functions in templates (they are not supported).
51+
52+
## Services
53+
54+
- Design services around a single responsibility
55+
- Use the `providedIn: 'root'` option for singleton services
56+
- Use the `inject()` function instead of constructor injection

README.md

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,59 @@
1-
# Phenotypic Evolution Group Dockerfiles Website
1+
# ImagesEditor
22

3-
This repository contains the source code for the Phenotypic Evolution Group Dockerfiles website. The website is built using Angular 18.0.0 and is hosted on GitHub Pages.
3+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.1.0.
44

5-
## Getting Started
5+
## Development server
66

7-
### Prerequisites
7+
To start a local development server, run:
88

9-
To build and run the website locally, ensure you have the following installed:
9+
```bash
10+
ng serve
11+
```
1012

11-
- [Node.js](https://nodejs.org/en/download/) 18.19.1 or higher
12-
- [Go](https://go.dev/dl/) 1.22.2 or higher
13+
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
1314

14-
### Installation
15-
16-
Follow these steps to set up the project:
15+
## Code scaffolding
1716

18-
1. Clone the repository to your local machine.
19-
2. Run `npm install` to install the dependencies.
17+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
2018

21-
## Development Server
19+
```bash
20+
ng generate component component-name
21+
```
2222

23-
To start working on the website:
23+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
2424

25-
1. Run `npm run dev` in your terminal. This command will launch a development server.
26-
2. Open your browser and navigate to `http://localhost:4200/` to view the website.
25+
```bash
26+
ng generate --help
27+
```
2728

28-
The application will automatically reload if you make any changes to the source files.
29+
## Building
2930

30-
## Build
31+
To build the project run:
3132

32-
To build the website for production, run `ng build`. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
33+
```bash
34+
ng build
35+
```
3336

34-
## Code scaffolding
35-
36-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
37+
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
3738

3839
## Running unit tests
3940

40-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
41+
To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:
42+
43+
```bash
44+
ng test
45+
```
4146

4247
## Running end-to-end tests
4348

44-
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
49+
For end-to-end (e2e) testing, run:
50+
51+
```bash
52+
ng e2e
53+
```
54+
55+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
56+
57+
## Additional Resources
58+
59+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.

0 commit comments

Comments
 (0)