Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: filter by record type (not content folder) in Dashboard Content View #749

Closed
pauko opened this issue Feb 2, 2024 · 3 comments

Comments

@pauko
Copy link

pauko commented Feb 2, 2024

Is your feature request related to a problem? Please describe.
As you introduced support for sub-content on behalf of #722 and #715, I organize my (single) content folder as illustrated in the diagram in #715.

contents/
├─ Solution A/
│ ├── index.md
│ ├── problem-1-of-A.md
│ ├── problem-2-of-A.md
│ ├── goal-1-of-A.md
├─ Solution B/
│ ├── index.md
│ ├── problem-1-of-B.md
...

At the moment I can't filter for a specific record type in the Content View of the Dashboard, e.g., in above example, I can't filter all problem records across all sub-content directories.

Describe the solution you'd like

  1. The Content View of the Dashboard should allow to filter by the type metadata field of each record.

  2. In combination with Enhancement: support custom taxonomies as filter in Content view #744, cascades of filters should be supported, for instance, I can filter by some custom taxonomy and then show specific record types of some value of the custom taxonomy. In above example this means, I can filter all problem records (by type) of Solution A (by custom taxonomy).

Describe alternatives you've considered
As I don't associate each record type with a dedicated content folder, the existing filtering by content folders is too coarse for this use case.

Additional context
Already mentioned in above sections.

@estruyf
Copy link
Owner

estruyf commented Feb 2, 2024

Thanks, @pauko, for the suggestion. An implementation where you can define your filter options is coming.

There will be a new setting introduced:

{
  "frontMatter.content.filters": [
	"pageFolders", 
	"tags", 
	"categories",
    {
      "title": "Type",
      "name": "type"
    },
	"otherValue"
  ]
}

As you can see in the above code, you can define your filters as a string or provide a title/name.

estruyf added a commit that referenced this issue Feb 2, 2024
@estruyf
Copy link
Owner

estruyf commented Feb 2, 2024

Feel free to give it a try in the beta and provide feedback if needed.

estruyf added a commit that referenced this issue Feb 22, 2024
estruyf added a commit that referenced this issue Feb 22, 2024
@estruyf
Copy link
Owner

estruyf commented Feb 22, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants