Skip to content

Feature/species differentiation - #900

Open
K-Owiti wants to merge 7 commits into
testfrom
feature/Species-differentiation
Open

Feature/species differentiation#900
K-Owiti wants to merge 7 commits into
testfrom
feature/Species-differentiation

Conversation

@K-Owiti

@K-Owiti K-Owiti commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

This change addresses:
-Change of filter drop down to address two categories, primary and secondary.
-Addition of a catalogue page to show the category of species.
-Database trigger that automatically classifies a species as primary or secondary and adds a display name based on species field.
-Translation to French and Portuguese.
- The table row is clickable only if one is an editor/admin to show a page to edit species color, category and display name.
- Filter drop down picks dynamically from database
- Added three columns to table recorded_species : category, color and display_name

@K-Owiti
K-Owiti force-pushed the feature/Species-differentiation branch from 80cd836 to 85dd999 Compare July 24, 2026 09:21
@K-Owiti
K-Owiti requested a review from rogonion July 24, 2026 09:23
@K-Owiti
K-Owiti force-pushed the feature/Species-differentiation branch from 1e94287 to fe22f35 Compare July 26, 2026 18:54
Comment thread src/API/package-lock.json

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Comment thread src/Database/.temp/runcontainer.sh Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Comment thread src/TileServer/.temp/runcontainer.sh Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Comment thread src/API/src/schema.gql

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can the query return color as well? This would be important in order for the vector panel to be built dynamically from the database information on recorded_species.

Comment thread src/UI/.envrc

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Comment thread src/package-lock.json

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Comment thread src/yarn.lock

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Comment thread package.json

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Comment thread package-lock.json

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Comment thread src/package.json

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exclude this file from PR merge request.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Rather than use a function/trigger to update the display_name, category, and color (does not account for fresh database instances at the moment), you can refer to this migration for countries? The proposed approach is the following:

  1. Create a fixed list of species in code with display_name, category and color.
  2. Create a migration that loops through this list of species, then for each entry: check if it exists in the recorded_species table by looking at the species column. If it exists, only update the display_name, category, and color. If it does not, create a new species entry.

@rogonion rogonion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good foundation. Kindly take a look at the comments made on each file. TLDR, most files need to be ommited from the commit like the *-lock.json. Moreover, for the species catalogue migration, ensure it accounts for fresh database instances, you can refer to the countries migration to see how it was set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants