I mock something similar to what's done in the ReferenceDialog,
just to improve the situation for now.
Change-Id: Ie3a1facf79a1920fe282a023b2ac33165d62f117
When the reference to re-use has a lot of content the button element
of the sub-menu expands over the whole height of the result widget.
The expanded sub-menu will always be positioned at the end of the
button element, that's why it was always added to the end of the
result widget and not the visible button.
Makeing sure that the element of the button is not larger than the
visible outlines fixes that problem.
Bug: T375053
Change-Id: I3c16aeae37c3774808544b03c7e6e52762e6d145
Since changing the group will break a subref, we'll hide the field
for now.
TODO: There's more that can be done here: the main ref group
selector could also be hidden, and changing group could be supported
if we change the group on all linked refs.
Bug: T375156
Change-Id: I220850edae58097e09616a4b100878513767deae
We add the preview in the Setup step that's called everytime the
dialog is openend. The preview elements will pile up everytime you
load that dialog when adding additional details. So let's remove
the content from the prior call.
Change-Id: I1e0256d566e0979ce71db958b88493ab084de68a
Adding a submenu to the results of the reference re-use search.
This allows the user to either create a direct reuse or a reuse with
different details.
Hide the menu when there's a sub-reference.
Known Issues:
- Ref name is hidden (conditionally when our feature is enabled) as a
quick fix to not having a good layout choice yet.
- Submenu is clipped at the dialog bounds.
- Submenu highlight should vanish when the submenu is closed
- Instrument action with metrics.
Bug: T375053
Change-Id: I3eddd6bad328aaf9bb99eb2783ba66d4e08f862d
Hide some knowledge from the reference dialog, and prepare the way
for additional events such as "extends".
Bug: T375053
Change-Id: I6097eb85deadcb58d1f56844c65726f19dbf6dda
The exact rendering of each item should be part of the widget.
This also allows a better application of the sub-ref indent.
Bug: T375841
Change-Id: Ic2c24f40d59f41b316c6d6f362726c1ee68f2102
TODO: This can be merged as-is, since it only affects pages with
subrefs, but it behaves surprisingly when the ref body is long. In
this case, the text wraps around and flows onto the next lines
unindented.
A full implementation would require deeper changes to the item pane
layout, which is happening in a separate patch. Recommend merging
this as a quick visual fix and then we come back to the subref+long
content edge case once the pane is easier to adjust layout in.
Bug: T375841
Change-Id: I65510f1550e033e57a3493676d8fc24f628c0600
Also adding some margin where it made sense looking at the mocks
in the message document.
Bug: T373876
Change-Id: I1165681521565d900b705a45579fd816fe625a8f
For unknown reasons, some of the event handlers in the reflist class
can be called when the model is already partially destroyed. I
removed some guard logic in I0809df9d3c24fdd5fe which turns out to be
necessary, so I'm adding it here explicitly.
To reproduce the bug, try deleting the reflist in VE.
Bug: T375049
Change-Id: I33e6526cdf535eddaaf8ae506243a5898bd15676
First step in streamlining the code to create sub-references.
Slightly renaming the class to fit the schema and avoid conflicts.
Bug: T373849
Change-Id: Iadbdbecbedf4d4aa3f0e0bade88ea020f2570926
Reverses the previous logic which traversed up from a fragment to get
the full document's refs. Much other code in VE isn't ready for this
behavior, for example we can see list-defined refs but not inline refs
defined outside of the fragment.
This patch will ensure that we're only looking at refs accessible from
the current fragment, and prevents caching on fragments because the
cache uses `persistentStorage`, which is shared between fragments and
their parent document.
Bug: T374068
Change-Id: Ia38098f8b3e5a9d24c2206e11edab37d60209225
Note this doesn't fully solve T374068. The issue is probably that the
reuse tab shouldn't be visible in the first place. Still I think this
is a useful safe-guard that cannot hurt. We are doing the same in
almost all other places already.
Bug: T374068
Change-Id: I9b91374dbda74af75d8c36e24ffe5b9448da1aa7
I could add some simplifications to reduce the complexity of the
tests a bit. I also fixed the test for the change handler. Seems
it did not work that way before.
Also some minor random doc fixes.
Change-Id: If1530a815ea126c38c3a55f3d52e3ca482059840