这是indexloc提供的服务,不要输入任何密码
Skip to content

Module sorting uses wrong property in some components #3093

@aaemnnosttv

Description

@aaemnnosttv

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.

image

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 their sort 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium priorityQA: EngRequires specialized QA by an engineerType: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions