question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changes appearing immediately after switching layouts

See original GitHub issue

When switching between layouts, the layout sometimes immediately appears modified, even though the user didn’t change anything. If you look at the json before/after, sometimes the panel configs that change are actually from panels that aren’t present in the layout — this indicates a stale reference to old config being saved under the new layout.

I thought I already fixed this issue in #1425, so not sure if it regressed or just wasn’t totally fixed. The logic for savedDefaultConfig.current here is supposed to prevent saving data from an old layout after switching.

https://github.com/foxglove/studio/blob/62d8b42e5817e00660015a5baf3144dc2d5f8d7f/packages/studio-base/src/components/Panel.tsx#L189-L198

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
defunctzombiecommented, Sep 10, 2021

From our chat - it seems that the issue here is synthetic and would not occur the same way through user interaction. The “inject edit” adds a panel to the layout but fails to add the default config. A user that is working with the app on two computers and adding a layout would not produce the same result since the app will set the default config when the panel is added to the layout.

I’m gonna close this issue since through user interaction this same flow would not occur. If we do find other instances of changes appearing in unexpected ways (or via remote interaction) we should open new issues with reproduction for those.

0reactions
jtbandescommented, Sep 4, 2021

If the server version changes the base on a sync I would expect that to be shown as changes compared to the working copy?

If you’ve never made changes to the layout locally or even clicked on it, someone else changing it on the server shouldn’t result in a modified dot on your machine. Notice in my video the dot doesn’t appear upon sync, but only when loading the layout.

The dot being visible is just “working copy != undefined”. An unmodified layout doesn’t have a working copy, only the baseline

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10: unwanted keyboard layouts appear after ...
I have two non-English keyboard layouts in my Windows 10 Home settings. Recently Windows Update forced me to update the OS to version...
Read more >
FancyZones not applying correct layout after switching monitors
Changing to another layout is not recognized and windows still continue to be snapped to 3 vertical columns. If powertoys is closed and ......
Read more >
Switching templates in version 7.0 - Squarespace Help Center
This guide covers how to switch templates on version 7.0. It's not possible to change templates on a version 7.1 site. In version...
Read more >
Drawing elements do not show within a layout viewport in ...
Issue: When viewing a layout in AutoCAD, some or all elements shown in model space do not display within one or more viewports....
Read more >
Using Zebra EKB Designer
When switching between layouts in a project, resizing or changing layout ... Changes to most properties appear immediately on the selected button(s).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found