Enterprise: Homepage: Resize / reorder events send faulty information for Editable Homepage (Regression)

Created on 2 Feb 2021  路  4Comments  路  Source: infor-design/enterprise

Describe the bug
When resizing/reordering widgets in an editable Homepage, the events that fire do not send correct metadata. The events are sending the size / position the widget had _before_ the event, not the resulting size / position.

To Reproduce

  1. Go to https://design.infor.com/code/ids-enterprise/latest/demo/components/homepage/example-editable.html
  2. Open Dev console
  3. Move Widget A (top left) to position of Widget B (top right)
  4. Inspect the event metadata being sent in the reorder event

Expected behavior
Widget A should be at index 1 in metadata blocks array. Its x value should be 2.

Actual behavior
Widget A is at index 0 in metadata blocks array. Its x value is 0.

See similar fault in the metadata blocks when resizing a widget.

Version

  • ids-enterprise: latest / 4.36.1

Screenshots
image

Additional context
Works fine on 4.35.0, https://design.infor.com/code/ids-enterprise/4.35.0/demo/components/homepage/example-editable.html
image

[3] type

Most helpful comment

I'm pretty sure it's due to this change
https://github.com/infor-design/enterprise/commit/761f3c02a8a03677918e96faa5493212f392d894#diff-0a05b3a653c698030f13b241516312e126a853dd3e8f6fab78ee26aa6dd4dc41R771
Adding a timeout in refresh()

refresh() is called before dispatching the resize/reorder events. Due to the timeout, the blocks are out of date (they are updated in resize() which is called within refresh())

All 4 comments

@deep7102 can you take a look at this (on master) if needed i can patch to 4.36 - assume its due to some recent changes.

I'm pretty sure it's due to this change
https://github.com/infor-design/enterprise/commit/761f3c02a8a03677918e96faa5493212f392d894#diff-0a05b3a653c698030f13b241516312e126a853dd3e8f6fab78ee26aa6dd4dc41R771
Adding a timeout in refresh()

refresh() is called before dispatching the resize/reorder events. Due to the timeout, the blocks are out of date (they are updated in resize() which is called within refresh())

Was this page helpful?
0 / 5 - 0 ratings