-
Notifications
You must be signed in to change notification settings - Fork 4
update title length to 120 #3104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughAdds new constant INPUT_LENGTH_120 to validation constants and updates title field max length from 60 to 120 across moderator draft and provider creation forms, including both validators in TypeScript and displayed maxCharacters hints in templates. No other logic, control flow, or public APIs are changed. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant FC as Form Component
participant V as Angular Validators
participant C as ValidationConstants
U->>FC: Type title
FC->>C: Read INPUT_LENGTH_120
FC->>V: Validate title (required, minLength, pattern, maxLength=120)
alt length <= 120
V-->>FC: Valid
FC-->>U: Enable submit / no error
else length > 120
V-->>FC: MaxLength error
FC-->>U: Show "max 120 chars" hint
end
note over FC,C: Max length increased from 60 to 120
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/app/shared/constants/validation.ts (1)
33-33: INPUT_LENGTH_120 added — titles use 120; shortTitle remains 60.Sweep confirms title FormControls use ValidationConstants.INPUT_LENGTH_120; shortTitle and other short fields intentionally use ValidationConstants.INPUT_LENGTH_60. Remaining hardcoded maxlength="60": src/app/shell/personal-cabinet/provider/create-workshop/create-description-form/create-description-form.component.html:111 — replace with ValidationConstants.INPUT_LENGTH_60 for consistency.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
src/app/shared/constants/validation.ts(1 hunks)src/app/shell/admin-tools/data/admin-competition-list/moderator-draft-competition-form/moderator-draft-competition-form.component.ts(1 hunks)src/app/shell/admin-tools/data/admin-workshop-list/moderator-draft-edit-form/moderator-draft-edit-form.component.html(1 hunks)src/app/shell/admin-tools/data/admin-workshop-list/moderator-draft-edit-form/moderator-draft-edit-form.component.ts(1 hunks)src/app/shell/personal-cabinet/provider/create-competition/create-required-form/create-required-form.component.html(1 hunks)src/app/shell/personal-cabinet/provider/create-competition/create-required-form/create-required-form.component.ts(1 hunks)src/app/shell/personal-cabinet/provider/create-workshop/create-about-form/create-about-form.component.html(1 hunks)src/app/shell/personal-cabinet/provider/create-workshop/create-about-form/create-about-form.component.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-02-17T21:20:13.347Z
Learnt from: humanmantis
PR: ita-social-projects/OoS-Frontend#2733
File: src/app/shared/components/validation-hint/validation-hint.component.html:4-4
Timestamp: 2025-02-17T21:20:13.347Z
Learning: Using [innerHTML] is acceptable for rendering validation messages in ValidationHintComponent as the messages are predefined constants from ValidationMessages and are not user-provided content.
Applied to files:
src/app/shell/admin-tools/data/admin-workshop-list/moderator-draft-edit-form/moderator-draft-edit-form.component.htmlsrc/app/shell/personal-cabinet/provider/create-workshop/create-about-form/create-about-form.component.html
📚 Learning: 2025-02-12T23:13:35.247Z
Learnt from: MaxZhylka
PR: ita-social-projects/OoS-Frontend#2733
File: src/app/shared/components/validation-hint/validation-hint.component.ts:62-62
Timestamp: 2025-02-12T23:13:35.247Z
Learning: In ValidationHintComponent, a minimal debounce time (1ms) is required on statusChanges to prevent double error addition caused by formControl.markAsTouched(), while still maintaining near-instant validation feedback for dynamic ValidationParams updates.
Applied to files:
src/app/shell/admin-tools/data/admin-workshop-list/moderator-draft-edit-form/moderator-draft-edit-form.component.htmlsrc/app/shell/personal-cabinet/provider/create-workshop/create-about-form/create-about-form.component.htmlsrc/app/shell/personal-cabinet/provider/create-competition/create-required-form/create-required-form.component.html
📚 Learning: 2025-08-30T18:26:27.585Z
Learnt from: witolDark
PR: ita-social-projects/OoS-Frontend#3091
File: src/app/shell/personal-cabinet/provider/create-workshop/create-description-form/create-description-form.component.ts:84-90
Timestamp: 2025-08-30T18:26:27.585Z
Learning: In the CreateDescriptionFormComponent (src/app/shell/personal-cabinet/provider/create-workshop/create-description-form/create-description-form.component.ts), the fieldsToListen array should NOT include 'competitiveSelection' and 'tagIds' fields as they don't need to trigger moderation notices according to the maintainer.
Applied to files:
src/app/shell/admin-tools/data/admin-competition-list/moderator-draft-competition-form/moderator-draft-competition-form.component.tssrc/app/shell/personal-cabinet/provider/create-competition/create-required-form/create-required-form.component.htmlsrc/app/shell/personal-cabinet/provider/create-competition/create-required-form/create-required-form.component.tssrc/app/shell/admin-tools/data/admin-workshop-list/moderator-draft-edit-form/moderator-draft-edit-form.component.ts
🧬 Code graph analysis (4)
src/app/shell/personal-cabinet/provider/create-workshop/create-about-form/create-about-form.component.ts (1)
src/app/shared/constants/validation.ts (1)
ValidationConstants(5-65)
src/app/shell/admin-tools/data/admin-competition-list/moderator-draft-competition-form/moderator-draft-competition-form.component.ts (1)
src/app/shared/constants/validation.ts (1)
ValidationConstants(5-65)
src/app/shell/personal-cabinet/provider/create-competition/create-required-form/create-required-form.component.ts (1)
src/app/shared/constants/validation.ts (1)
ValidationConstants(5-65)
src/app/shell/admin-tools/data/admin-workshop-list/moderator-draft-edit-form/moderator-draft-edit-form.component.ts (1)
src/app/shared/constants/validation.ts (1)
ValidationConstants(5-65)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: SonarCloud
- GitHub Check: build_and_test
🔇 Additional comments (7)
src/app/shell/personal-cabinet/provider/create-competition/create-required-form/create-required-form.component.html (1)
21-21: Title hint maxCharacters → 120 — aligned with validatorsMatches the updated TS validator; UI copy will reflect the new limit.
src/app/shell/admin-tools/data/admin-workshop-list/moderator-draft-edit-form/moderator-draft-edit-form.component.html (1)
38-38: Title hint maxCharacters → 120 — consistentTemplate matches the new constant.
src/app/shell/admin-tools/data/admin-competition-list/moderator-draft-competition-form/moderator-draft-competition-form.component.ts (1)
237-237: Title maxLength validator → 120 — OKValidator aligns with product change. Please ensure the backend accepts 120 chars for title to prevent 400s.
src/app/shell/personal-cabinet/provider/create-workshop/create-about-form/create-about-form.component.html (1)
26-26: Title hint maxCharacters → 120 — OKIn sync with the component validators.
src/app/shell/personal-cabinet/provider/create-workshop/create-about-form/create-about-form.component.ts (1)
196-196: Title maxLength validator → 120 — OKNo other validator logic changed; good.
src/app/shell/personal-cabinet/provider/create-competition/create-required-form/create-required-form.component.ts (1)
189-189: Title maxLength validator → 120 — OKShort title remains at 60 as intended; confirm BE contracts match these limits.
src/app/shell/admin-tools/data/admin-workshop-list/moderator-draft-edit-form/moderator-draft-edit-form.component.ts (1)
235-235: Title maxLength validator → 120 — OKChange is isolated and consistent with the new constant.



Summary by CodeRabbit
New Features
Chores