Saving the ForestAdmin UI layout

Expected behavior

When I change the FA UI layout in my dev environment, I expect changes to persist.

Actual behavior

When I rebuild the back container, my FA web interface is reset and all changes I make are lost. This is really a PITA, would it be possible to get information as to where exactly is stored the web interface layout configuration, so that we can understand when it can be overwritten/refreshed?

Btw rebuilding the container means the .forestadmin-schema.json is lost.
Last time I checked this file contained only schema information and no web layout stuff.
Maybe this changed, or maybe the web interface did not record properly the changes I made via the editor mode.
If that is the case, there should be a hard warning when web ui layout changes are not saved, because this means the user is working for nothing

And also, all collection segments were lost.

Hello François,

The layout changes are stored into Forest Admin servers, not in the .forestadmin-schema.json.
The problem you are facing should obviously not happen.

–> Actually, when you change the layout, you are asked to save your changes. When you hit the save button, if you have a green toast saying that everything went well, it means your changes have been saved properly. If something went wrong, you know it with an explicit red toast.

So that we can investigate, can you please provide more info about a change that you’ve made that was not saved properly (on what project, team, collection, etc.)?
if you are able to reproduce the issue, do you mind sharing a screencast of it?

Thanks.

Hello, when you are in editor mode and you’re viewing a collection, you can configure which columns are displayed in the list, and in which order.
There is no save button in that context (or at least I can’t see any on my screen)

Here is what was lost when I rebuilt the docker container from scratch:

  • the changes in displayed columns in a collection list
  • which collection is visible and which is not
  • all collection segments

Now I just rebuilt the container from scratch again, and there is no problem.
The data was lost when I rebuilt the container from scratch 1h ago, and it was the first time in 3 months I rebuild the container.
Maybe it was due to some incompatibility that emerges between web app and backend over time when you don’t rebuild the backend container in a long time?

That’s absolutely right. This kind of change doesn’t have a response toast, we should add one :+1:

Can you tell me on what project, environment and team you encountered this issue?
I want to make sure the segments were lost (vs you can’t access them).

Hello, it was on Findrive project, dev environment, and there is only 1 team
I don’t need to recover the segments, since I re-configured them.
Please see my other ticket about smart_actions creation problem, I think the root cause is the exact same than for this ticket

I also experienced this same issue a few days ago. The frontend would keep resetting.

At the moment it seems to work as expected.
It saves my layout and persist between backend loads again.

If this helps - we have faced a similar problem and eventually got to the bottom of it.
We are deploying to production with the blue-green scheme. (one live, the other being upgraded - then a switch).

Forest would reset the layout during the switch - when investigated deeper we found that the server being swapped “OUT” was started as the idle but still was able to push the OLD schema reverting some of the changes (like removing a collection, so that all customization was lost when it was brought back later).

Bottom line - could it be that when you start your dev env, it first starts with an empty schema / old schema and later gets the latest code?
I would try to disable the auto schema push (as well as the auto schema generation which is on for non prod envs) and see if a rebuild of the container still has any effect on the layout.
It might be safer to manually activate the auto schema push only AFTER the latest code is restored on the container.

2 Likes