Skip to content
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

Trait-db v0 #722

Merged
merged 55 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ed3caab
laji-api-client prototype
Blodir Nov 24, 2023
1310fc0
Merge branch 'development' into api-client-prototype
Blodir Mar 25, 2024
968ebb5
init trait-db and api-client
Blodir Apr 8, 2024
b145543
fix infinite loading when logged out
Blodir Apr 8, 2024
23058c3
trait-db about page
Blodir Apr 24, 2024
a8aa5a8
trait-db new dataset
Blodir Apr 24, 2024
b2b8f62
use OnPush to trait-db components
Blodir Apr 25, 2024
791f29e
traits index page
Blodir Apr 25, 2024
435c5c6
trait-db single trait view
Blodir May 6, 2024
298eb83
trait-db new trait and new dataset fields
Blodir May 8, 2024
2d9d841
Merge branch 'development' into trait-db-186748322
Blodir May 8, 2024
1727de1
trait-db edit dataset
Blodir May 13, 2024
7f249e4
trait-db indicate deletion of datasets
Blodir May 14, 2024
d4632a8
Merge branch 'development' into trait-db-186748322
Blodir Nov 28, 2024
a07e766
automatic cache flushing
Blodir Dec 8, 2024
b92d5ec
new laji-ui datatable component
Blodir Dec 8, 2024
b78d3bd
trait-db-browse use lu-datatable
Blodir Dec 8, 2024
1b55d19
lu-datatable improvements
Blodir Dec 9, 2024
ee2cc17
lu-datatable custom cell templates
Blodir Dec 9, 2024
aea5345
remove console.log
Blodir Dec 9, 2024
9ce4692
sortable should default to true
Blodir Dec 9, 2024
4bb40c2
sorting should support default columns with custom sortfn
Blodir Dec 11, 2024
fca56a6
paginator active styles
Blodir Dec 11, 2024
72a6600
improve scroll css and default ghost size
Blodir Dec 11, 2024
58b982a
separate trait search from the trait browser page
Dec 13, 2024
dbe6753
update schema
Blodir Dec 19, 2024
0a97ef0
cache in-progress observables
Blodir Dec 19, 2024
6e91048
make datatable y-scrollable
Blodir Dec 19, 2024
ba52d01
update swagger
Blodir Jan 6, 2025
4ae3ad0
trait-db trait-search-filters
Blodir Jan 7, 2025
44eb2ff
get datasets and traits from api
Blodir Jan 7, 2025
a50180b
trait-search additional filters
Blodir Jan 17, 2025
c5c9285
trait-search should not know about internal structure of additional-f…
Blodir Jan 23, 2025
56a60ae
additional filters styling
Blodir Jan 28, 2025
fe16081
remove redundant dep
Blodir Jan 28, 2025
ab626b2
update readme & remove redundant setter for base url
Blodir Jan 28, 2025
80194de
move datatable example
Blodir Jan 28, 2025
3dc7c3c
remove redundant var
Blodir Jan 29, 2025
2162228
clear filters btn
Blodir Jan 29, 2025
dfafa67
hide trait-db in prod
Blodir Jan 29, 2025
845eb79
Merge branch 'development' into trait-db-186748322
Blodir Jan 29, 2025
fa1f1ea
strict typing
Blodir Jan 29, 2025
e886405
fix lint
Blodir Jan 29, 2025
b91502d
fix laji-api-client base url
Blodir Jan 30, 2025
89b7185
remove redundant style
Blodir Jan 31, 2025
ba83865
allow column templates to use prop
Blodir Jan 31, 2025
bd0990b
check that defaultColumns isnt null
Blodir Jan 31, 2025
0d57a41
extract datatable paginator into its own component
Blodir Jan 31, 2025
75c6c1b
rename new-dataset to dataset-editor
Blodir Jan 31, 2025
2d29dc3
tighten parameter type bounds
Blodir Jan 31, 2025
cdb255a
provide baseurl as an injection token
Blodir Feb 2, 2025
a487661
update hash
Blodir Feb 3, 2025
0070807
variable level path caching
Blodir Feb 3, 2025
0226bd8
split path vars separately from proceeding path
Blodir Feb 3, 2025
ef2496e
remove trait-db link from beta
Blodir Feb 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
"root": true,
"ignorePatterns": [
"projects/laji/src/test.ts"
"projects/laji/src/test.ts",
"projects/laji-api-client-b/generated/*"
],
"overrides": [
{
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ settings.json
/projects/kerttu-global/generate-spectrograms/input*
/projects/kerttu-global/generate-spectrograms/output*

projects/laji-api-client-b/node_modules

# Don't include script with this repo!
**/*.sh

Expand Down
33 changes: 33 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,39 @@
}
}
}
},
"laji-api-client-b": {
"projectType": "library",
"root": "projects/laji-api-client-b",
"sourceRoot": "projects/laji-api-client-b/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "projects/laji-api-client-b/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/laji-api-client-b/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/laji-api-client-b/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "projects/laji-api-client-b/tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
}
}
}
},
"schematics": {
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions projects/laji-api-client-b/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Updating api type definitions:

```
npm i

// update types based on the new API openapi schema
npm run updateNew
```

Usage:
```typescript
export class ExampleComponent {
constructor(private lajiApiClientService: LajiApiClientBService) {}
function f() {
const a$ = this.lajiApiClientService.fetch('/collections', 'get', { query: { page: 1 } });
}
}
```

Queries are cached by default based on the path and the query params. Whenever a new non-get request is sent to the same path, the cache is flushed automatically.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is out of date. If it's hard to document, maybe put a link to the review discussion that explains it? Or just remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or idk... it's not entirely out of date. It says "based on the path", which is correct. I mean it doesn't mention that the path params affect it also. Maybe we can update the README after we develop the other changes (like method wrappers get() put() etc)

Loading