Skip to content

Implement reference view to group by source#23

Open
jamlung-ri wants to merge 2 commits into
mainfrom
#2508-Group-by-Source
Open

Implement reference view to group by source#23
jamlung-ri wants to merge 2 commits into
mainfrom
#2508-Group-by-Source

Conversation

@jamlung-ri
Copy link
Copy Markdown
Member

Linked Issue

Closes OpenConceptLab/ocl_issues#2508

@jamlung-ri jamlung-ri requested a review from snyaggarwal May 12, 2026 14:25
@jamlung-ri jamlung-ri self-assigned this May 12, 2026
Copy link
Copy Markdown
Contributor

@snyaggarwal snyaggarwal left a comment

Choose a reason for hiding this comment

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

there is a lot of logic for color, not sure whats the goal to have out of theme colors, but I think thats not needed.

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.

this should be in src/components/references/


const getSourceColorKey = source => [source?.owner, source?.id || source?.short_code].filter(Boolean).join('/')

const parseSourceFromExpression = expression => {
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.

this is almost duplicate of core.common.utils.URIToParentParams

return label || '-'
}

const hashString = value => {
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.

this should be core/common/utils.js

import MoreVertIcon from '@mui/icons-material/MoreVert'
import RepoChip from '../repos/RepoChip'

const SOURCE_COLORS = [
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.

these colors needs to be defined in src/common/color.js
and are they from theme?

- Move component from search/ to references/ directory
- Move SOURCE_COLORS to src/common/colors.jsx using theme palette colors (primary/secondary/tertiary)
- Move hashString to src/common/utils.js
- Refactor parseSourceFromExpression to use existing URIToParentParams utility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jamlung-ri
Copy link
Copy Markdown
Member Author

Thanks @snyaggarwal, I addressed those comments and committed.

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.

Surface / References Tab / Group by Source

2 participants