Problem/Motivation

Original GH PR: https://github.com/nuvoleweb/ui_patterns/pull/208

UI Pattern definitions are in seemingly random order in the admin UI (e.g. in the Display Suite layout selector on "Manage Display" when using ui_patterns_layout and ui_patterns_ds).

I propose we sort them alphabetically. Luckily there is a trait for this that we can use :)

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

G4MBINI created an issue. See original summary.

G4MBINI credited ademarco.

G4MBINI credited drclaw.

g4mbini’s picture

G4MBINI credited DuaelFr.

g4mbini’s picture

g4mbini’s picture

grimreaper’s picture

Assigned: Unassigned » grimreaper

Grimreaper credited barig.

grimreaper’s picture

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Needs review
StatusFileSize
new25.84 KB
new25.02 KB

Before:

After:

I used ui_suite_bootstrap + ui_patterns_library_module_test + duplicate a button pattern into zbutton in the module.

As you can see now the patterns are sorted independently of the provider. If multiple patterns have the same label, sort by plugin ID.

I have added an automated test.

Thanks for the review.

Waiting until next monthly meeting to merge.

grimreaper’s picture

Assigned: Unassigned » grimreaper

Fixing tests.

grimreaper’s picture

Assigned: grimreaper » Unassigned

This time it is ready for the review.

duaelfr’s picture

I added two minor comments about changes that are out of the scope of this issue (I ran the tests with and without these and they pass every time).
Except for these nitpicks, this is RTBC for me. Thanks for the work here!

On a side note: I'd have written the test as a Unit Test but that's fine with a Kernel one too (only a bit slower).

grimreaper’s picture

Hi,

Thanks for the review.

I have replied to the comments.

If you want to convert the test as a Unit one, feel free to do it ;)

  • b91e618 committed on 8.x-1.x
    Issue #3311464 by Grimreaper, G4MBINI, DuaelFr, barig, ademarco, drclaw...
grimreaper’s picture

Status: Needs review » Fixed

Discussed during UI Suite monthly meeting.

Merged.

Thanks everyone!

Status: Fixed » Closed (fixed)

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