pluginpal / strapi-plugin-config-sync

:recycle: CLI & GUI for continuous migration of config data across environments

Home Page:https://www.pluginpal.io/plugin/config-sync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Differences tool is giving the changes in wrong order.

SalahAdDin opened this issue · comments

Continuing with test, we are looking a mismatch on the differences tool.

For instance, we've done the next changes on the setting file (manually on the editor, VSCode):
image
These are the changes we want to replicate on settings.

Now, we go to the Admin Panel, Config Sync plugin and we want to import the above changes, we do click on the items to see the changes and we see the next:
image
You can see what are suppossed to be the changes.

Can you see the mismatch? The actual changes appear as the last version, and the current version appears as the changes.

We choose just ignore this view and we import the changes and, indeed, the changes we want are made.

This means the panel is showing the current settings and its changes in the wrong side of the comparison tool.

It happened with files we edited manually (VSCode) after exporting and before re-importing them.

What's the problem here?

Hi @SalahAdDin,
Thank you for your issue submission!

I think I do not yet fully understand what is happening here.
The second picture you've sent, is that how the config files look after exporting the changes seen in the first picture?
Please elaborate, I think this may just be a misinterpretation of the differences tool.
I might have to make this more transparent.

Looking forward to your response!

@boazpoolman I just rewrote the issue, sorry for my bad writting.

Thanks.

Ah, I get it now. I see how this can be confusing.
The only thing here is that if I were to switch the differences view (to match the diff from the manual changes) than we would have the same issue the other way around. If you were to make changes to the DB, it would show the diff as if it is removed.

Let me think about the best approach for this.

Thanks again for reporting!

Oh, I get you, it shows the differences between the exported file and the current database instead, where is supposed the changes to be, as we are making changes on the files and not on databases and we don't know how this view works, we got the information wrong.

I think to put clear "File state" and "Database State" as labels and a bit more documentation about this, we could understand it easily.

I added titles in de diff viewer to make it easier to understand.
See the screenshot from the readme.

Released in v1.0.0-alpha.1 for the Strapi v4 version of strapi-plugin-config-sync.