Skip to content

Sheffield | 25-SDC-Nov | Sheida Shabankari | Sprint 1 |Extra long blooms#105

Open
sheida-shab wants to merge 2 commits intoCodeYourFuture:mainfrom
sheida-shab:Feat-fixBug-longBlooms
Open

Sheffield | 25-SDC-Nov | Sheida Shabankari | Sprint 1 |Extra long blooms#105
sheida-shab wants to merge 2 commits intoCodeYourFuture:mainfrom
sheida-shab:Feat-fixBug-longBlooms

Conversation

@sheida-shab
Copy link

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

PR description :
Fix Bloom length validation (max 280 chars)

  • Added server-side check in send_bloom() to reject Bloom > 280 chars
  • Updated postBloom() in api.mjs to prevent sending overly long content
  • Integrated handleErrorDialog for consistent error display in UI
  • Updated Playwright tests to verify server rejects long blooms

@sheida-shab sheida-shab added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Legacy-Code The name of the module. labels Feb 4, 2026
Copy link
Member

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

This looks good, but it looks like you have fixes for other problems in this same PR - please only include one fix per PR

Comment on lines 162 to 163
if len(content)>280 :
return jsonify({"success": False, "error": "Bloom must be 280 characters or less"}), 400
Copy link
Member

Choose a reason for hiding this comment

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

If we wanted to change the limit to 300 in the future, we'd need to edit multiple values in this file. How could we avoid this?

Copy link
Author

Choose a reason for hiding this comment

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

If we wanted to change the limit to 300 in the future, we'd need to edit multiple values in this file. How could we avoid this?

Comment on lines 199 to 200
if (content.length>280){
handleErrorDialog(new Error("Bloom must be 280 characters or less"));
Copy link
Member

Choose a reason for hiding this comment

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

If we wanted to change the limit to 300 in the future, we'd need to edit multiple values in this file. How could we avoid this?

Copy link
Author

Choose a reason for hiding this comment

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

If we wanted to change the limit to 300 in the future, we'd need to edit multiple values in this file. How could we avoid this?

Copy link
Author

Choose a reason for hiding this comment

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

Fixed the extra commits issue as well.

@illicitonion illicitonion added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 4, 2026
@sheida-shab sheida-shab force-pushed the Feat-fixBug-longBlooms branch from 1f658ba to 33e13ae Compare February 6, 2026 16:01
@sheida-shab sheida-shab added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Legacy-Code The name of the module. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants