Skip to content

Feature request: Include document language (or field values) in edit intent params for canHandleIntent routing #12834

Description

@stianmartinsen

Is your feature request related to a problem? Please describe.
We have a lot of content and languages, so we organize the Studio content structure by language at the top level:

  • Norwegian
    • Pages
    • Products
  • English
    • Pages
    • Products

When we search for a document in the studio using the global search and click to edit an English page, the Norwegian structure is expanded.

Describe the solution you'd like
When Studio resolves an edit intent, canHandleIntent should receive enough information to match language-filtered structure panes. Ideally a filtered documentList should only handle edit intents matching documents with the same filters by default.

If that's not possible, it would be nice to be able to select which document attributes are passed to the params in the canHandleIntent callback so we could do this:

documentList()
  .filter('_type == $type && language == $language')
  .params({ type: 'destination', language: 'en' })
  .canHandleIntent((intentName, params) => {
    return (
      intentName === 'edit' &&
      params.type === 'destination' &&
      params.language === 'en'
    )
  })

Describe alternatives you've considered
I've tried other ways of structuring the studio, but because of the amount of content it makes sense for us to group content by language in the structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions