Skip to content

Conversation

@luisa12ll
Copy link

Description

Fixes #12679

Problem:
Currently, when copying a session and deleting the identical name, the "Name for copied session" field validation allows whitespace-only names, which violates the system rules.

Solution:

  • Added validation to prevent empty or whitespace-only session names
  • Copy button is disabled for invalid names
  • Error message is displayed for invalid inputs
  • Form submission is blocked for invalid names

Changes Made

Functional Changes

  • Added isWhitespaceOnly() method to detect whitespace strings
  • Enhanced validateForm() to include whitespace validation
  • Added form state management with isFormValid property
  • Connected validation to UI events

Test Changes

  • Added test for disabled copy button with whitespace names
  • Added test for error message display
  • Fixed existing tests to work with new validation
  • All 1457 tests pass successfully

Testing

  • ✅ Manual testing with various input scenarios
  • ✅ All unit tests pass (1457/1457)
  • ✅ Integration with existing validation rules
  • ✅ No regressions introduced

Screenshots

(If applicable, add screenshots of the error message and disabled button)

@github-actions
Copy link

Hi @luisa12ll, thank you for your interest in contributing to TEAMMATES!
However, your PR does not appear to follow our contribution guidelines:

  • Title must start with the issue number the PR is fixing in square brackets, e.g. [#<issue-number>]

Please address the above before we proceed to review your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copying feedback session: Name for copied session should not be whitespace

1 participant