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

Show Descriptions in Autocomplete Options #1497

Open
wants to merge 15 commits into
base: dev
Choose a base branch
from

Conversation

LouisThedroux
Copy link
Collaborator

Links to Jira Tickets

NA.

ADDING DESCRIPTIONS TO VARIOUS DROPDOWNS IN THE APP.

New Migration created for adding description values, where missing.
Added descriptions for Project roles, Survey roles, Purpose and Methodology form (Collected data & Ecological concepts of interest) and Site Selection Strategy.

Note, I had to change some tests as they were failing.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 47.49%. Comparing base (eb5bec7) to head (e89aaa0).
Report is 2 commits behind head on dev.

Files with missing lines Patch % Lines
app/src/features/surveys/edit/EditSurveyForm.tsx 0.00% 5 Missing ⚠️
app/src/components/user/UserRoleSelector.tsx 66.66% 0 Missing and 1 partial ⚠️
app/src/features/projects/edit/EditProjectForm.tsx 0.00% 0 Missing and 1 partial ⚠️
...ents/sampling-strategy/SurveySiteSelectionForm.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1497      +/-   ##
==========================================
+ Coverage   45.92%   47.49%   +1.57%     
==========================================
  Files         907      926      +19     
  Lines       23537    24022     +485     
  Branches     3492     3570      +78     
==========================================
+ Hits        10809    11409     +600     
+ Misses      12136    11993     -143     
- Partials      592      620      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -122,6 +122,9 @@ GET.apiDoc = {
},
name: {
type: 'string'
},
description: {
type: 'string'
Copy link
Collaborator

@mauberti-bc mauberti-bc Feb 13, 2025

Choose a reason for hiding this comment

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

If the description can be null in the database, you should include nullable: true in the description object here. Otherwise the request would fail for what the database considers valid data.

(Disregard if the description field of the type database table has a not null constraint.)

@@ -80,6 +81,14 @@ const EditSurveyForm = <
.concat(SurveyPartnershipsFormYupSchema)
.concat(SpeciesYupSchema);

// Add this transformer function
const transformSurveyJobs = (jobs: typeof codes.survey_jobs): IGetAllCodeSetsResponse['project_roles'] => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is doing anything?

system_user_id: 2,
user_identifier: 'myidirbossagain',
role_names: ['role 1', 'role 4']
// ...existing test setup...
Copy link
Collaborator

Choose a reason for hiding this comment

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

👀

@@ -12,7 +12,6 @@
"forceConsistentCasingInFileNames": true,
"noImplicitThis": true,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This controls some typescript settings that we want to keep, so we shouldn't be modifying this file.

import { Knex } from 'knex';

/**
* Add new columns to survey_sample_period table
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update the jsdoc

@mauberti-bc mauberti-bc changed the title Including descriptions to appear with option values that appear in dropdown menus. Show Descriptions in Autocomplete Options Feb 13, 2025
@mauberti-bc mauberti-bc added Early Feedback Welcome PR is not finished, but early review feedback is welcomed and removed Ready For Review PR is ready for review labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Early Feedback Welcome PR is not finished, but early review feedback is welcomed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants