[MGNLUI-3096] Section availability for multiple selection is plain wrong Created: 13/Aug/14 Updated: 09/Mar/21 Resolved: 09/Mar/21 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | 5.2.8, 5.3.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Mikaël Geljić | Assignee: | Unassigned |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | actionbar, availability | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Description |
|
There was one silly code leftover from 5.3 development in ConfiguredActionbarSectionDefinition, which I tentatively removed ahead of 5.3.2, but had to revert back: public void setAvailability(AvailabilityDefinition availability) { // FIXME This is plain wrong, availability for multiple selection matches sections for which it is not configured (i.e. set to false) // But we have to keep it for the time being because some content apps rely on this incorrect behavior. ((ConfiguredAvailabilityDefinition) availability).setMultiple(true); this.availability = availability; } In essence:
As a result, currently we always fall back on the first configured section — typically the one dealing with singular item selection — so the set of actions displayed, their labeling and the section title are all wrong. Side note: multiple availability does work correctly on individual actions; most of them are expectedly disabled when selecting multiple items. |