Skip to content

feat(settings): add profile form validation, simulated persistence, a…#303

Merged
MaryammAli merged 2 commits into
BlockDash-Studios:mainfrom
Anadudev:issue-295-settings-validation
Jul 16, 2026
Merged

feat(settings): add profile form validation, simulated persistence, a…#303
MaryammAli merged 2 commits into
BlockDash-Studios:mainfrom
Anadudev:issue-295-settings-validation

Conversation

@Anadudev

Copy link
Copy Markdown
Contributor

closes #295

Summary of Changes

Profile Validation Layer

  • Implemented strongly typed profile field validation in profile.ts.
  • Added constraints for username, hex theme colors, avatar URL format, bio length, and social handles (Twitter, Discord, GitHub).

Simulated Profile Persistence

  • Created mock backend persistence handlers in api.ts using localStorage to retain profile changes between sessions.
  • Added artificial network latency to mirror actual API responsiveness.

useApi Hooks updates

  • Adjusted useApi.ts to reset error states and propagate caught errors to form handlers.

Layout Positioning Adjustments

  • Adjusted NetworkBadge.tsx to clear the sidebar space on desktop and not overlap title content on mobile.
  • Rendered <NetworkBadge /> in teams/page.tsx for layout consistency.

UI Integration

  • Connected mount fetching and handleSave action to loading state and error handlers in settings/page.tsx.
  • Displayed input validation messages and alert banners.

@MaryammAli MaryammAli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@MaryammAli
MaryammAli merged commit e97be98 into BlockDash-Studios:main Jul 16, 2026
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.

settings form saves no data and lacks validation, causing broken UX

2 participants