Refactor block title methods to allow empty titles and make everything less confusing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
I initially thought Bug 1451324 would be a bite-sized bug, but after looking into it I realized that our system for determining default & instance block titles is a mess, and it doesn't allow for a blank default block title.
There are currently five methods involved in determining block titles. I'll use "PluginBlocktyp
1. PluginBlocktype
2. PluginBlocktype
3. PluginBlocktype
4. PluginBlocktype
5. View->addblockt
So you can see, the problem here is that:
1. The method names are confusing and don't explain what they do and how they're different from each other (and there are not sufficient comments in the code to explain this either.)
2. We force the default block title for new block instances to be the same as the string used in the block picker.
3. The only way to make a block title empty by default, would be to implement get_instance_
I'll have to give some thought to the best way to refactor this. It might also be worthwhile doing a quick review of 3rd-party blocks to see how badly they'd be impacted if we made some big changes to this. One possibility that springs to mind, is to move the logic for determining the default title, out of View->addblockt
Changed in mahara: | |
milestone: | none → 15.10.0 |
assignee: | nobody → Aaron Wells (u-aaronw) |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
description: | updated |
tags: | added: behat-needed |
Changed in mahara: | |
milestone: | 15.10.0 → 16.04.0 |
Changed in mahara: | |
milestone: | 16.04.0 → 16.10.0 |
Changed in mahara: | |
milestone: | 16.10.0 → 16.10.1 |
Changed in mahara: | |
milestone: | 16.10.1 → 17.04.0 |
Changed in mahara: | |
milestone: | 17.04.0 → none |
assignee: | Aaron Wells (u-aaronw) → nobody |