[Closed] Auto-remove leading/trailing spaces from user-entered payloads#2532
Closed
[Closed] Auto-remove leading/trailing spaces from user-entered payloads#2532
Conversation
Collaborator
Author
|
Just realized I need to apply the same for the factorial payloads. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new Angular directive, TrimInputDirective, to automatically remove leading and trailing whitespace from user-entered payloads and applies it to relevant input fields.
- Introduced TrimInputDirective to trim inputs on blur
- Updated SharedModule to include the new directive
- Applied the directive to payload inputs in multiple components
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/projects/upgrade/src/app/shared/shared.module.ts | Added import and declaration for TrimInputDirective in module arrays |
| frontend/projects/upgrade/src/app/shared/directives/trim-input.directive.ts | Implemented a new directive that trims whitespace on blur |
| frontend/projects/upgrade/src/app/features/dashboard/home/components/factorial-experiment-design/factorial-experiment-design.component.html | Applied appTrimInput to payload input |
| frontend/projects/upgrade/src/app/features/dashboard/home/components/factorial-experiment-design/conditions-table/conditions-table.component.html | Applied appTrimInput to condition payload input |
| frontend/projects/upgrade/src/app/features/dashboard/home/components/experiment-design/payloads-table/payloads-table.component.ts | Removed unused Output and EventEmitter imports |
| frontend/projects/upgrade/src/app/features/dashboard/home/components/experiment-design/payloads-table/payloads-table.component.html | Applied appTrimInput to payload input |
Collaborator
Author
|
Closing due to opening another hotfix PR: #2534 |
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.
Resolves #2531
Description:
This PR fixes issue #2531 where payloads with leading/trailing whitespace characters were causing users to not get assigned the appropriate experiment variants.
Changes Made:
TrimInputDirective: A reusable Angular directive that automatically trims leading/trailing whitespace from form control values when users finish editing (on blur)appTrimInputdirective to payload input fields in:payloads-table.component.html)conditions-table.component.html)factorial-experiment-design.component.html)SharedModule: Made the directive available across the entire application for consistent payload sanitizationTesting:
condition_payloadtable are properly trimmed