Hook up the main form layout with child form layouts
ClosedPublic

Authored by filipf on Apr 6 2019, 6:35 PM.

Details

Summary

Previously we were only having the wallpaper plugins' child form layouts hooked up to the main form layouts. That causes issues when a label in a plugin is longer than the labels in the main layout. To solve the issue, this patch also makes the main layout responsive to the content of the child layouts.

Test Plan

Before:

After:

Diff Detail

Repository
R119 Plasma Desktop
Branch
hook-main-and-child-layouts-up (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10534
Build 10552: arc lint + arc unit
filipf created this revision.Apr 6 2019, 6:35 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 6 2019, 6:35 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.Apr 6 2019, 6:35 PM
filipf edited the test plan for this revision. (Show Details)Apr 6 2019, 6:36 PM
filipf added reviewers: Plasma, ngraham.
filipf planned changes to this revision.Apr 6 2019, 7:07 PM

twinFormLayouts: main.currentItem will stop working as soon as the wallpaper plugin in anything more complicated than having a single form layout. How do I specify that, yes, I want the currentItem, but only the form layout in that file?

abetts removed a subscriber: abetts.Apr 6 2019, 7:13 PM
filipf updated this revision to Diff 55591.Apr 6 2019, 7:20 PM

Figured it out. We'll just export a formLayout alias property in all the individual plugins and everything will work.

ngraham accepted this revision.Apr 6 2019, 11:13 PM
ngraham added a reviewer: mart.
This revision is now accepted and ready to land.Apr 6 2019, 11:13 PM
filipf added a comment.Apr 9 2019, 9:45 PM

@mart before you suggested we should do something like:

twinFormLayouts: stack.item && stack.item.formLayout ? [stack.item.formLayout] : []

but I'm not seeing any errors or issues if twinFormLayouts doesn't find main.currentItem.formLayout.

Is the diff okay then or should I specify that it shouldn't do anything if it doesn't find a child form layout?

filipf added a comment.EditedApr 18 2019, 9:14 PM

I'll land this tomorrow night (in 24hrs) since it's a prerequisite for fixing the PoTD plugin.

This revision was automatically updated to reflect the committed changes.