Page MenuHomePhabricator

Rename JavaScript modules to reflect their location
Closed, ResolvedPublic


If you are new to MobileFrontend then is a great task to start on and get familiar with it!

Now that the resources files have been moved to the resources folder, it makes sense to change old module names too. For example, modules/search/SearchApi should be renamed to, etc. (the text before the / is the name of the ResourceLoader module and the text after it the name of the class).
Old names should be deprecated like
M.define( '' ).deprecate( 'modules/search/SearchApi' )

Be careful to correctly deprecate modules as some other exntensions may be using them.

Event Timeline

bmansurov raised the priority of this task from to Needs Triage.
bmansurov updated the task description. (Show Details)
bmansurov added a project: Readers-Web-Backlog.
bmansurov added a subscriber: bmansurov.
Jdlrobson set Security to None.
Jdlrobson awarded a token.
Jdlrobson updated the task description. (Show Details)
Jdlrobson triaged this task as Lowest priority.Sep 8 2015, 12:28 AM
Jdlrobson added a subscriber: Jdlrobson.

Could someone assign this to me please (I cannot assign myself)

Change 237969 had a related patch set uploaded (by TasneemLo):
Rename modules in resources

The above patch is a demo for the modules/search/SearchApi. Is this fine ? Or did I miss something ?

If it's fine, I'll continue and finish up the rest. Would you like different commit for each resource ? Or a single commit with all of them changed ?

Note: I used find . -type f -exec sed -i "s%'modules/search/SearchApi'%''%g" {} \; to make sure I didn't miss out any occurence.

Florian added a subscriber: Florian.

Hi @TasneemLo! Like I wrote in the change, I'm pretty sure, that you understood the problem and your change looks good (except one little confusion from our side! :P). I'm not sure, how much changes in the code are needed. I would suggest to made them all in one commit (in the hope, that there aren't too much changed names).

To the or you should use This task was created before we moved the SearchApi to it's own module :)

Change 237969 merged by jenkins-bot:
Rename modules in resources