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

Add Environment Variables - Various improvements. #1518

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

Conversation

LouisThedroux
Copy link
Collaborator

Links to Jira Tickets

NA

Description of Changes

Regarding the Add Environment Variables section of the Configure Columns dialogue box on the Manage Observations page.

  • Modified environment search to display all options on initial click/focus
  • Added alphabetical sorting to environment options list
  • Added the env.units to the drop down so the user can see what unit it is measured in without clicking/adding and then having to remove if its not what they want
  • Added unit pluralization for measurements ending in 'er' (e.g., "meter" → "meters")

@LouisThedroux LouisThedroux added Early Feedback Welcome PR is not finished, but early review feedback is welcomed Not Ready For Review Addressing feedback and/or refactoring labels Mar 4, 2025
@LouisThedroux LouisThedroux self-assigned this Mar 4, 2025
Copy link

sonarqubecloud bot commented Mar 4, 2025

Copy link

codecov bot commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 47.40%. Comparing base (5c40bf2) to head (28f5c25).

Files with missing lines Patch % Lines
...ironment/search/EnvironmentsSearchAutocomplete.tsx 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1518      +/-   ##
==========================================
- Coverage   47.57%   47.40%   -0.18%     
==========================================
  Files         926      942      +16     
  Lines       24182    24225      +43     
  Branches     3609     3619      +10     
==========================================
- Hits        11505    11483      -22     
- Misses      12043    12105      +62     
- Partials      634      637       +3     

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

@LouisThedroux
Copy link
Collaborator Author

Let wait for @mauberti-bc to have a look at this first. Maybe he is not happy with the idea of it and no point reviewing code thats not going to be used


// This function is a repeat of a function in another file for pluralising. It should be edited to an imported function. GridColumnDefinitionsUtils.tsx when PR goes through
const getFormattedUnit = (unit: string) => {
const unitSuffix = unit.endsWith('er') ? 's' : '';
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is the second time we've seen this logic. I would suggest making it a standalone function.

I would add a new function next to the pluralize function in .../utils/Utils.tsx since it tackles a similar kind of issue.

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 Not Ready For Review Addressing feedback and/or refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants