Skip to content

Improve user search and profile components #287

@mschilling

Description

@mschilling

Improvements from PR #286 review feedback

The following suggestions from Copilot code review are worth addressing in a future iteration:

1. Extract shared utility functions (DRY)

File: user-profile.component.ts, profile.component.ts

formatDisplayName() and formatMemberSince() are duplicated across ProfileComponent and UserProfileComponent. Extract these into a shared utility or service.

2. Case-insensitive search

File: user-search.service.ts

Search is currently case-sensitive (Firestore prefix search limitation). Consider storing a lowercase displayNameLower field on user documents and querying against that for case-insensitive matching.

3. Smarter back navigation

File: user-profile.component.ts

goBack() always navigates to /search. Consider using Location.back() with a fallback to /search when there's no navigation history (e.g. direct link).


From Copilot review on PR #286

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions