Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 379
    • Issues 379
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 21
    • Merge requests 21
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Merge requests
  • !993

See #170: add a description field on tracks, albums, tracks

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Agate requested to merge 170-track-description into develop Jan 14, 2020
  • Overview 0
  • Commits 11
  • Pipelines 3
  • Changes 38

This is a requirement for #170 (closed), since we'll need a place to store free-form description relating channels, albums and tracks.

So, what do we have?

  1. A new common.Content model that is used to store arbitrary text content (with various supported content types)
  2. A new optionnal description foreign key on the artists, albums and tracks tables, pointing to the model created in 1.
  3. A new description field exposed when fetching the detailed reprentation of these resources via the API:
// GET /api/v1/artists/42
{
  // The description has the same structure for album / tracks resources. We use an object instead of a plain string,
  // because we have multiple fields (and may want to have even more in the future, e.g to support translations)
  "description": {
    // content type of the description text. html, plain text and markdown supported
    "content_type": "text/markdown",
    // raw text, unrendered, for edition
    "text": "**hello world**",
    // rendered and sanitized HTML from the original text
    "html": "<p><strong>hello world</strong></p>"
  }
}
  1. The description supports automatic links, markdown, and basic HTML markup (bold, italic, lists, etc.). Everything else is disabled to prevent XSS/privacy issues
  2. Description is included in the ActivityPub representation of corresponding resources (via the content property).
  3. Description is populated from the comment field in ID3/Audio tags, if any, during upload
  4. Description can be updated via the edit mechanism (like title, album cover, etc.)
  5. Description update is propagated over federation

What's not implemented in this MR is the actual display of descriptions in the UI. This will come later.

cc @funkwhale/reviewers-front cc @funkwhale/reviewers-python

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 170-track-description