Open
Conversation
- Updated TypeScript and ESLint dependencies in sails-ng-common package. - Refactored tsconfig.json to extend a new base configuration. - Introduced a new base TypeScript configuration file for consistent settings across projects. - Cleaned up the recordtype configuration by removing commented-out code and unnecessary complexity. - Ensured compatibility with ES2024 features and improved module resolution settings.
…nfiguration - Added ESLint and Prettier scripts for linting and formatting TypeScript files. - Introduced a new TypeScript configuration file for strict type checking. - Updated package.json to include new devDependencies for ESLint and Prettier.
…le and resolution settings
…/improve-core-types-typing
…e variables - Updated all service classes to use 'protected override _exportedMethods' for method declarations. - Added non-null assertion operator (!) for class properties where applicable. - Declared global variables for each service to improve accessibility across the application. - Removed unnecessary variable declarations in several service files to clean up the code. - Updated the ExportJSONTransformer class to use 'override' for transform methods. - Cleaned up test files by removing unused variable declarations related to services.
- Updated UsersService to enhance type declarations for variables and function parameters. - Modified ViewUtilsService, VocabService, WorkflowStepsService, WorkspaceAsyncService, WorkspaceService, and WorkspaceTypesService to use more specific types and improve type safety. - Changed the tsconfig.json to enable strict mode for better type checking. - Adjusted wrapper-webpack.js to handle different configurations more robustly. - Ensured consistent use of `any` type where necessary while aiming for more specific types throughout the services.
…ices and controllers - Removed unused imports and improved type definitions in CoreService, Logger, and bootstrap files. - Enhanced type safety by replacing `any` with more specific types in various service and config files. - Refactored methods to use `unknown` and `Record<string, unknown>` for better type safety. - Updated logging and configuration handling to ensure consistent type usage. - Improved handling of optional properties in authentication and role management services. - Cleaned up code by consolidating variable declarations and ensuring consistent use of lodash methods.
… declarations - Updated various services (ViewUtilsService, VocabService, WorkflowStepsService, etc.) to replace 'any' with 'UnsafeAny' for better type safety. - Removed global declarations for 'sails', '_', and other variables in service files. - Introduced a new waterline model 'RBReport' to avoid conflicts with the DOM's Report interface. - Adjusted tests to accommodate changes in model names and types. - Enhanced TypeScript configuration for improved type checking and global access. - Increased timeout for BrandingService tests to ensure stability during execution.
- Updated TranslationService to comment out unused BrandingService declarations. - Modified TriggerService to replace UnsafeAny with any in various methods and parameters for better type safety. - Adjusted UsersService to replace UnsafeAny with any in method signatures and internal logic. - Refined VocabService by changing UnsafeAny to specific types and improving type definitions. - Enhanced WorkspaceService by replacing UnsafeAny with any for targetRecord and workspaces.
…vices - Updated RolesService to introduce ConfigRoleResult type and improve getConfigRoles method signatures. - Refined SolrSearchService by adding specific types for SolrResponse and QueueJob, enhancing clarity and type safety. - Enhanced TriggerService with RecordLike and UserLike types for better type handling in workflow transitions and hook executions. - Improved UsersService by ensuring failureMode is consistently treated as a string. - Updated VocabService to include additional type definitions for user context and service parameters, ensuring better type safety in external service interactions.
… safety in various services
… declarations to use const; improve type safety with unknown; clean up code formatting and comments across multiple service files.
- Updated FigshareService to use local variable for readstream. - Enhanced FormsService with better type definitions for observables and added optional starting property to WorkflowStepLike. - Improved NamedQueryService with explicit type annotations for observables. - Refined OniService to handle Buffer creation more safely. - Enhanced PathRulesService with type safety for observables. - Updated RDMPService to ensure consistent return types and added user parameter to assignPermissions method. - Refactored RecordsService for better type handling and logging. - Improved ReportsService with explicit type annotations for observables. - Enhanced RolesService with type safety for observable returns. - Refined SolrSearchService to ensure string conversion for core IDs. - Updated UsersService for better type safety and observables. - Enhanced WorkspaceTypesService with explicit return types for methods. - Minor adjustments to Handlebars helper registration for better type safety.
…d before adding to view and edit lists
…ons in RDMPService tests
- Updated ReportsService to assert types for search service and report DTO conversion. - Modified RolesService to ensure correct typing for branding service methods. - Adjusted SolrSearchService to cast queue service and roles array types. - Enhanced SvgSanitizerService to assert the return type of max bytes. - Updated TranslationService to ensure bundles are correctly typed. - Refined UsersService to introduce PassportLike type and assert various method calls. - Improved VocabService to assert the search service type. - Adjusted WorkflowStepsService to ensure workflows are correctly typed. - Enhanced WorkspaceAsyncService to assert observable types for service methods. - Updated WorkspaceTypesService to assert observable types for bootstrap services. - Refined momentShim to improve type safety in date handling. - Updated waterline models to use Record<string, unknown> for better type safety. - Enhanced test cases for momentShim to ensure valid date formatting.
- Removed deprecated RxJS imports and adjusted usages in EmailService, FigshareService, FormsService, I18nEntriesService, NamedQueryService, OniService, RDMPService, RaidService, RecordsService, ReportsService, RolesService, SassCompilerService, SolrSearchService, TranslationService, UsersService, VocabService, WorkflowStepsService, WorkspaceAsyncService. - Updated function parameters to use underscores for unused parameters in various services for clarity. - Cleaned up waterline models by removing unused imports and references to JsonMap.
- Refactored Solr configuration to use autogenerated shims. - Updated Angular test script to improve directory handling. - Created a comprehensive task list for Vocabulary Management, detailing models, services, controllers, and testing requirements. - Added Bruno API tests for Vocabulary CRUD operations and sync functionality. - Developed integration tests for Vocabulary models and services to ensure proper functionality. - Created admin UI for Vocabulary management, including necessary routes and controllers. - Implemented Angular components for Vocabulary listing and detail views, along with import functionality. - Added navigation configuration for the new Vocabulary feature in the admin interface.
… in model methods
…or clarity and consistency
…s for improved transaction handling
…and entry normalization
…rees and update tests accordingly
…URLs and enhance tests
…ethods for better type safety
…firmation and status handling
- Updated AdminVocabularyComponent to utilize i18next for translation of error messages, success messages, and UI text. - Added a stub for the i18next pipe in component tests to ensure proper rendering. - Modified HTML templates across various components (RvaImport, VocabDetail, VocabList) to replace static text with i18next translations. - Enhanced translation JSON file with new keys for vocabulary management, including error messages, labels, and placeholders. - Updated unit tests for components to include the i18next pipe stub for consistent testing.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3673 +/- ##
===========================================
- Coverage 50.26% 49.67% -0.60%
===========================================
Files 390 402 +12
Lines 21735 23348 +1613
Branches 4434 4873 +439
===========================================
+ Hits 10926 11599 +673
- Misses 10221 11112 +891
- Partials 588 637 +49
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… and validation improvements - Added keyboard accessibility for vocabulary rows in the admin UI, allowing users to open vocabulary details with the Enter key. - Updated SCSS for improved table layout and focus styles for better accessibility. - Introduced a new API endpoint for reordering vocabulary entries, ensuring atomic updates and validation of entry IDs. - Enhanced VocabularyController to handle entry reordering requests, including validation for entry existence and order. - Improved input sanitization in VocabularyService for create and update operations, enforcing unique constraints on identifiers. - Updated database models to enforce unique constraints on vocabulary entry identifiers. - Enhanced RVA import service to handle asynchronous operations and improve error handling during vocabulary synchronization. - Updated design documentation to reflect new features and validation rules for vocabulary entries. - Improved wireframe documentation to clarify UI interactions for vocabulary management.
…y creation and updates
…ment pagination - Added a checkbox for marking entries as historical in the vocabulary detail view. - Default new entries to non-historical. - Updated the vocabulary list to include pagination controls and display total counts. - Enhanced the vocabulary API to support querying with pagination and historical flags. - Updated tests to cover new functionality for historical entries and pagination.
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.
Summary
This pull request introduces a new Angular application for vocabulary management within the admin console, along with the supporting configuration, dependencies, and build/test integration required to run it as part of the RedBox platform.
The main addition is the
@researchdatabox/admin-vocabularyapplication, which provides a UI for curating vocabularies, importing data from Research Vocabualries Australia (RVA), and managing vocabulary entries. Supporting changes ensure the new app is built, tested, and included in local development, CI, and containerised builds.Changes made:
Context / related work
Technical implementation details
New admin vocabulary application
@researchdatabox/admin-vocabulary, with full configuration inangular.json, including:Dependency and build integration
package.jsonandpackage-lock.jsonto include@angular/cdk, required by the new application.Build and environment automation
Dockerfileto install and build therva-registrypackage so all required dependencies are compiled as part of CI/CD builds.redbox-portalenvironment to support local and automated workflows.Testing
Future work