Problem/Motivation

Views allows us to change display order by pressing Reorder displays button. Unforntunatly the module doesn't take into account it.

Proposed resolution

Sort the displays after getting a display list. I guess we may have a better solution, but don't have time to dig deeper.

CommentFileSizeAuthor
#2 views_display_switch-3251406-2.patch771 bytesid.aleks
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

id.aleks created an issue. See original summary.

id.aleks’s picture

Assigned: id.aleks » Unassigned
Status: Active » Needs review
StatusFileSize
new771 bytes
luksak’s picture

Status: Needs review » Needs work

Hi @id.aleks! Thanks a lot for your contribution! It makes sense to fix that.

Could you send a merge request please? This makes it a lot easier for me to review and commit changes. Thanks!

id.aleks’s picture

Status: Needs work » Needs review

Hello @lukas-von-blarer. Thanks for the fast feedback. Here is the MR: https://git.drupalcode.org/project/views_display_switch/-/merge_requests/5

luksak’s picture

Status: Needs review » Fixed

@id.aleks I just merged your changes. Thanks a lot for your contribution!

One bug that I found while testing your changes: After reordering displays, the configuration of views_display_switch needs to be saved once again to actually apply the changes to config. Should we fix that or is that behavior fine? If this should be fixed, feel free to create a follow-up issue.

id.aleks’s picture

Hello @Lukas. Yes, I know this. This is something that we can adjust. I will do this when will have time.

luksak’s picture

@id.aleks great, thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.