The view modes for entities except Content (node) are displayed in a non-understandable order. This happens during actual theme rendering, as the render array appears normal.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fgm’s picture

Status: Active » Needs review
FileSize
1.25 KB

Suggested patch reorders by entity name.

Also, the "Content" (node) view modes are listed first by an explicit choice in code without any user-level explanation, which seems weird in terms of UX, but since this is an explicit choice, the patch doesn't change this.

fgm’s picture

Title: The view modes page displays out of order » The view modes pages (form, view) both display out of order

The patch fixes both pages.

swentel’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense indeed.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

I'm guessing we should have a test for this then

swentel’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
1.79 KB
916 bytes
fgm’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Actually, I wrote a test and allowed me to catch another error situation which my original patch does not cover, so I've started restructuring a bit more and using ConfigEntityBase::sort() for entity types ordering.

So I'm marking "needs work" even though swentel's test completes my original patch.

swentel’s picture

@fgm are you still working on this ?

fgm’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
1.25 KB

Oops, I has completely forgotten about that one. Rerolled the failing test on top of current HEAD: it is expected to fail because it demonstrates the bug. I resumed work on the actual fix this morning.

fgm’s picture

Rerolled on this afternoon's HEAD. Still not working but fresher than the one in #8.

Status: Needs review » Needs work

Status: Needs work » Needs review

Status: Needs review » Needs work
fgm’s picture

Status: Needs work » Fixed

This has been fixed at some point since the last patch. Marking as such.

Status: Fixed » Closed (fixed)

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