-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Open
Copy link
Labels
app: backendTask implementation touches the backendTask implementation touches the backendapp: frontendTask implementation touches the frontendTask implementation touches the frontendtype: discussionTeam discussion requiredTeam discussion requiredtype: enhancementEnhancement to an existing featureEnhancement to an existing feature
Description
With more than one item in the external link field now (UCSC, IGVF), we might consider generalizing the external link type to include more information for the UI to display.
The item could look more similar to:
class ExternalLinkItem(BaseModel):
label: str = Field(..., description="Human-readable label for the link")
url: HttpUrl = Field(..., description="Absolute URL for the external resource")
source: Optional[str] = Field(None, description="Optional source/system for this link (e.g., IGVF, GEO)")
icon: Optional[str] = Field(None, description="Optional icon key for UI")
type: Optional[str] = Field(None, description="Optional tag to group/filter links")
@field_validator("label")
@classmethod
def _strip_label(cls, v: str) -> str:
v = v.strip()
if not v:
raise ValueError("label cannot be empty")
return v
This would allow the interface to write less dedicated code for each individual external link, increasing maintainability and reducing duplication.
Metadata
Metadata
Assignees
Labels
app: backendTask implementation touches the backendTask implementation touches the backendapp: frontendTask implementation touches the frontendTask implementation touches the frontendtype: discussionTeam discussion requiredTeam discussion requiredtype: enhancementEnhancement to an existing featureEnhancement to an existing feature