Skip to content
Snippets Groups Projects

Prevent OrientationPanel from patching on mount or element change

Merged Erwan Rouchet requested to merge fix-orientation-panel-patch into master
All threads resolved!

Closes #743 (closed)

When the OrientationPanel loads, it is possible for the element to not be loaded yet, or its element might suddenly change without the component changing, for example when browsing back and forth between multiple elements, or after simply renaming the element. When this happens, it will update its own fields. But there are watchers on those fields, to update the element if the fields change; so when the fields are changed by the element, the panel immediately runs a PATCH query even when it is completely unnecessary.

This can cause 403 errors to show up for logged-out users, or those with read-only access or unverified emails, particularly when loading an already rotated or mirrored element.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Erwan Rouchet added 2 commits

    added 2 commits

    • 964de472 - Prevent OrientationPanel from patching on mount
    • ccd77393 - Add comment

    Compare with previous version

  • Erwan Rouchet resolved all threads

    resolved all threads

  • Bastien Abadie added 4 commits

    added 4 commits

    Compare with previous version

  • Bastien Abadie enabled an automatic merge when the pipeline for 271a4131 succeeds

    enabled an automatic merge when the pipeline for 271a4131 succeeds

  • Bastien Abadie mentioned in commit 75052216

    mentioned in commit 75052216

  • Please register or sign in to reply
    Loading