Meta should include information about the view

Created on 27 June 2022, over 2 years ago
Updated 16 February 2023, almost 2 years ago

I think it makes sense to display more information (title, pager, style, etc...) about the view inside the meta, instead of just 'count'.

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan yahyaalhamad Palestine

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands markwittens

    Thanks for this patch! I needed the pager info in the output and this patch adds just that plus some more useful data.

    Tests should be fixed however and there should be some new tests added for the new output.

  • πŸ‡¦πŸ‡ΊAustralia Deciphered

    There is already a good amount of this information available from the `view--view` resource, so it's best not to duplicate work too much.

    The biggest issue with the `view--view` resource is that it contains too much unfilterable data, and returns all displays. I think it would be better to concentrate on improvements in that area and then using the relationship from this resource to get that data as required.

  • πŸ‡³πŸ‡±Netherlands markwittens

    Then what do you propose? The pager information is loaded directly from the view itself, so there's hardly any code duplication. A pager is often essential for a view and I think it actually shouldn't take any extra work for it to be added to the API resource.

  • Glad to see others talking about - our use case would be to know what exposed filters exist on the view and what vocabularies they reference in order to programmatically build those exposed filters on the front end, rather than hardcoding.

    I can get this information from the `view--view` like you say, but it would be pretty slick the metadata of the view was available alongside the data.

  • First commit to issue fork.
  • πŸ‡ΈπŸ‡¬Singapore vhin0210

    Noticed that the count is missing after the patch. Tweaked #4 ✨ Meta should include information about the view Needs work a little bit.

Production build 0.71.5 2024