"Collapsible" block setting doesn't work if block has no title.

Bug #1603825 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Cecilia Vela Gurovic

Bug Description

See https://mahara.org/interaction/forum/topic.php?id=7664

If a block has no title, it can't be collapsed. That is, if you set the "Collapsible" setting to "Yes", the block can't be toggled because there's no title bar to click on. Moreover, if you set the block to "Already collapsed", it won't be displayed as collapsed, or collapsible.

This behavior is present at least as far back as Mahara 1.7. I've found this behavior in the Text and Image blocks, but I haven't tested it across all of them so I don't know whether it's part of the implementation of particular blocks, or if it's in the block library code.

To replicate:

1. Put a text block on a page.
2. Delete the block's title.
3. Give the block some text.
4. Set the block's "Collapsible" setting to "Already collapsed"
5. View the page in display mode.

Expected result: The block is collapsed, and can be toggled between expanded/collapsed.
Actual result: The block is expanded, and there is no collapse/expand toggle to click on.

Aaron Wells (u-aaronw)
Changed in mahara:
milestone: none → 16.10.0
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Ah, this was actually part of the initial implementation of collapsible blocks: https://reviews.mahara.org/#/c/1678/

There's even a comment from Hugh about the "collapsible" setting on the config screen: "Perhaps add a rule so that a warning is shown when this is set with an empty title?" But it looks like we never followed up on that.

I'm not sure what the best solution is here. Display an empty title bar, with just the toggle control? Or disable the "collapsible" options when the block has no title?

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

I would disable the collapsible options / display a warning when changing them when the block doesn't have a title as there is not really any place to put the collapsible icon. It would look out of place without a title.

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.0 → 16.10.1
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 16.10.1 → 17.04.0
Robert Lyon (robertl-9)
Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/7580

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7580
Committed: https://git.mahara.org/mahara/mahara/commit/c2b7e1a978bd462a69dc0de82828e9a9b716bb62
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit c2b7e1a978bd462a69dc0de82828e9a9b716bb62
Author: Cecilia Vela Gurovic <email address hidden>
Date: Thu Mar 30 13:31:04 2017 +1300

Bug 1603825: Disable retractable when empty title

Whe adding a block in a page, if we dont specify a
title for the block, then we will have the
retractable option disabled.

behatnotneeded

Change-Id: I2855fefd9f120caa0da5d279b28e3981d22ac9c6

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
tags: added: usermanualupdate
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.