Page MenuHomePhabricator

Get rid of 'type' stuff in ResourceLoaderImageModule and OOUI's colorize-svg.js
Closed, ResolvedPublic

Description

Let's get rid of 'type' stuff in ResourceLoaderImageModule.

'images' => array(
    [image type] => array(         <-- this guy right here
        [file path string],
        [file path string] => array(
            'name' => [image name string, defaults to file name],
            'variants' => [array of variant name strings, variants
                           available for this image],
        ),
    )
),

It was badly copied from OOjs UI, where it served a purpose (mapped to directory structure), in a way that doesn't serve a purpose at all (since we require full paths). People just always put 'icon' there. It is not useful and was never needed, and I half-assed the implementation since I suspected that it won't be useful. Right now the same thing is causing us problems in OOjs UI too, because the rigid mapping to directory structures turned out to be inconvenient when we introduced icon packs.

Event Timeline

matmarex claimed this task.
matmarex raised the priority of this task from to High.
matmarex updated the task description. (Show Details)

Change 200188 had a related patch set uploaded (by Bartosz Dziewoński):
ResourceLoaderImageModule: Remove 'type' stuff

https://gerrit.wikimedia.org/r/200188

Change 200189 had a related patch set uploaded (by Bartosz Dziewoński):
Get rid of 'type' stuff in ResourceLoaderImageModule

https://gerrit.wikimedia.org/r/200189

Change 200190 had a related patch set uploaded (by Bartosz Dziewoński):
Get rid of 'type' stuff in ResourceLoaderImageModule

https://gerrit.wikimedia.org/r/200190

Change 200188 merged by jenkins-bot:
ResourceLoaderImageModule: Remove 'type' stuff

https://gerrit.wikimedia.org/r/200188

Change 200190 merged by jenkins-bot:
Get rid of 'type' stuff in ResourceLoaderImageModule

https://gerrit.wikimedia.org/r/200190

Change 200189 merged by jenkins-bot:
Get rid of 'type' stuff in ResourceLoaderImageModule

https://gerrit.wikimedia.org/r/200189