mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #14048
[Bug 1236102] Re: More logical ordering of blocks in the Page Builder
I was thinking we'd do something similar to what we've done for
blocktype categories in "install_blocktype_categories_for_plugin()".
So,
1. We add a "public static function get_gravity()" or maybe
"get_sortorder()" to PluginBlocktype, so that each blocktype plugin will
override it and define their own sortorder/gravity number
2. At installation or upgrade time, we check that function to find out
the blocktype's sortorder. Then we store that value in the database
somewhere.
3. Then when we're displaying the block palette on the "edit page"
screen, as well as pulling which category each block's in, we also pull
its sortorder/gravity. We sort accordingly. In case of a tie, we break
the tie with block name. For backwards compatibility with older 3rd
party plugins, blocks with no sortorder just come last, sorted by block
name.
4. For the core plugins, we space their sortorder out by 100 so that
there's plenty of space in between for 3rd party plugins to fit into the
sort order.
Third party developers simply add a "get_sortorder()" method to their
blocktype plugins, and they'll be inserted into the sortorder
accordingly. There is the potential for multiple 3rd party block plugins
from separate authors to interfere with each other's ordering. In theory
it might be a good idea to provide an admin screen to let admins reorder
the blocks, but that might be overkill for something not many would
bother to do.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1236102
Title:
More logical ordering of blocks in the Page Builder
Status in Mahara ePortfolio:
Confirmed
Bug description:
I'm talking about the order of the blocks in the "Block Pallette" that
is now off to the left hand side of the "Edit Content" tab of the Page
builder. The current order is kind of random:
Text Box
Image
Media
- File(s) to download
- Folder
- Image gallery
- Some HTML
- Image
- Embedded media
- PDF
Journals
- Journal
- Journal entry
- Recent journal entries
- Tagged journal entries
General
- Creative Commons License
- Navigation
- Plans
- Recent forum posts
- Text box
Personal Info
- Contact information
- Your entire resume
- Profile information
- One resume field
External
- External feed
- External media
- Google Apps
Theme
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1236102/+subscriptions
References