Views exposed sort identifiers are not configurable when also exposed

Created on 11 December 2024, 13 days ago

Problem/Motivation

In ✨ Views exposed sort identifiers are not configurable Fixed , the exposed sort identifiers were made configurable in the same way as the exposed filters identifiers.

But if the sort is exposed, this "meta" sorting options are not configurable. They will always be sort_by and sort_order.

This is an issue if you have several views in the same page exposing different sort filters, as this will show "The submitted value changed in the Sort by element is not allowed." unless you have the same filter ids in both.

Proposed resolution

Allow the exposed sort identifiers when exposed to be configured, having sort_by and sort_order by default.

Remaining tasks

MR with tests.

User interface changes

New, when sorting is exposed show in the exposed sort configuration subform the id for the sort_by and sort_order ids.

API changes

TBD

Data model changes

Config schema change. Will require upgrade path.

Release notes snippet

When exposing the sort options in the exposed form, the site builder is able to configure the identifiers that are exposed in the URL as query parameter values.

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component

views.module

Created by

πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

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

Merge Requests

Comments & Activities

  • Issue created by @penyaskito
  • Pipeline finished with Failed
    13 days ago
    Total: 123s
    #365992
  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    This:

    - needs tests
    - need upgrade path tests.
    - needs updating provided views in all profiles (and recipes?).

    Otherwise might be ready. Marking Needs review for getting feedback before working in tests.

  • Pipeline finished with Success
    13 days ago
    #365996
  • πŸ‡³πŸ‡±Netherlands Lendude Amsterdam

    I think the feature makes sense and is probably much harder to do in contrib than adding it to core since this stuff isn't exposed in any sort of hook.

    I'm not sold on the names and descriptions used here. I'd use 'key' and not 'id' to describe these, but even than it's still pretty hard to grasp what these are for. Since this is some pretty specialised config, we need strong descriptions to make clear what these are for I feel.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Thanks @lendude seems like solid feedback.

  • Pipeline finished with Canceled
    2 days ago
    Total: 93s
    #376675
  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    @lendude Given this manifested as an error message, I was tempted to mark this even as a bug instead of Feature request.

    Naming these are hard. In the meantime I used suffix as you suggested.
    The descriptions definitely need work.

  • Pipeline finished with Failed
    2 days ago
    Total: 722s
    #376676
  • Pipeline finished with Failed
    about 2 hours ago
    #377993
  • Pipeline finished with Failed
    about 1 hour ago
    #378018
  • Pipeline finished with Running
    about 1 hour ago
    #378024
  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    This now contains tests, including for the views upgrade.

Production build 0.71.5 2024