Feature: Refactor mdTranslatorAPI URL and itisProxyUrl to have no default, and added configuration validation #763
Merged
hmaier-fws merged 1 commit intodevelopfrom Jun 11, 2025
Conversation
hmaier-fws
approved these changes
Jun 11, 2025
Contributor
hmaier-fws
left a comment
There was a problem hiding this comment.
Looks OK. Validation for a missing translator API occurs in a few places where it shouldn't so I'm leaving #738 open and will a new comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds validation checks for external service URLs before attempting to use them. Specifically, it adds modal alerts when users try to use features that require the
mdTranslatorAPI or ITIS Proxy URL without having these services configured in settings.Changes
Added a check in the import route to verify if
mdTranslatorAPIis configured before attempting to translate XML and JSON filesIf the API URL is not configured, a modal is shown to the user explaining the issue
The modal provides options to either go to settings to configure the API or cancel the operation
Added a similar check in the taxonomy collection route to verify if
itisProxyUrlis configured before attempting to add taxa from ITISIf the ITIS Proxy URL is not configured, a modal is shown to the user explaining the issue
The modal provides the same options to configure the URL or cancel
Updated the md-modal component to better handle action passing
Ensured compatibility with existing usages of the modal component throughout the application
Added support for direct action handling in the modal buttons
Closing issues
closes #725
closes #762
closes #737
closes #736
Pull Request
Please check if the PR fulfills these requirements
- [ ] Docs have been added / updated (for bug fixes / features)What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
Refactor default mdTranslator and itisProxy URLs #725
Expose the `itis-proxy-url' as a user setting #762
Trap for missing mdTranslator API URL #738
Remove the default mdTranslatorAPI value from the setting.js file #737
Derive
itisProxyUrlfrom themdTranslatorAPIvalue #736Previously, when users attempted to use features requiring external services without having them configured, they would encounter confusing errors or the application would silently fail. These changes provide clear feedback to users about what's missing and guide them directly to where they can configure the necessary settings.
What is the new behavior (if this is a feature change)?
This PR adds validation checks for external service URLs before attempting to use them. Specifically, it adds modal alerts when users try to use features that require the
mdTranslatorAPI or ITIS Proxy URL without having these services configured in settings.Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
If the user has a current
mdTranslatorAPIendpoint their won't be any changes to that field other than, there is no moredefaultAPIhard-coded to the application. However they will have to provide aitisProxyUrlif they are using any taxonomy in the records.Other information:
Untitled.video.mp4
mdtranslator.mp4