-
Notifications
You must be signed in to change notification settings - Fork 315
Description
Bug Description
Some components that list modules also sort them before rendering (this is likely goes back to pre-datastore design as getModules
currently returns a "sorted" object).
In the legacy schema, a module is sorted by its sort
property, however in the current schema, modules have a order
property instead. There are a few instances in the refactored components where this property was not updated and modules are still sorted using a reference to the old (and now undefined) sort
property.
Because the sort
property is undefined in the current module schema, this should result in no change when sorting because the result for every comparison would be the same.
In some cases, the sorting may no longer be necessary since getModules
returns a sorted value.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Modules should always be sorted by their
order
property (if needed) when using the current/modern schema - Legacy modules (i.e. those returned by
getModulesData()
) should always be sorted by theirsort
property
Implementation Brief
Test Coverage
- None needed
Visual Regression Changes
- Should be none
QA Brief
- Check the codebase to make sure all instances of module sorting have been updated
- Check areas in UI to ensure modules are sorted as expected (based on their defined
order
)
Changelog entry
- Fix regression where modules may be sorted incorrectly on the plugin's settings screen.