Closed PatelUtkarsh closed 6 years ago
From @miina
One thing that possibly could be useful would be to see somehow which Snapshots are merged. For example, have information on the merged Snapshot that it's merged from X & Y or show in the Snapshot that was merged sth like merged into Z. Currently, when testing with various Snapshots it was hard to understand later which Snapshots were merged. Or is this solved in some other way that I didn't notice? Or maybe this is irrelevant? Thoughts?
We don't store information of snapshots that are merged, we have information on which settings are being conflicted, but we can certainly add that data. I think it would be useful in some cases.
@westonruter thoughts?
@PatelUtkarsh yes I agree. There can be an array with each setting in the snapshot that contains the list of snapshots UUIDs that served as the sources for that value, even when snapshots were merged that had the identical value
. When the value is not identical, then the original values could be included as previously discussed.
even when snapshots were merged that had the identical value
Currently, If two snapshot has a conflicting setting we don't check for their values are identical or not so it will be shown as conflicting.
I will add improvement to check for same values to this PR.
@westonruter When you said to save an array of UUID in setting's data and not in post-meta, is it because if some setting gets deleted we don't need to take care of removing that UUID from post-meta?
So later we can get all unique UUIDs from settings and display somewhere in meta-box.
@PatelUtkarsh I suppose the UUIDs of the origins could be stored in postmeta instead (or maybe in addition), but I think what I was getting at is that if a snapshot gets merged with additional snapshots over and over again: considering merging two snapshots that were themselves merged. If the UUIDs are attached at the setting level, then you'd be able to know which snapshots those setting values came from specifically.
@westonruter Can you check above approach? You can get the idea from test case here https://github.com/xwp/wp-customize-snapshots/blob/b67ad83608ed4025ec2ecd6d52f83cae13d7a194/tests/php/test-class-post-type.php#L853-L996
I have added following things.
merge_conflict
and merged_uuid
keys)@PatelUtkarsh Great work on the Snapshots!
Some questions / thoughts I had when trying it out:
post
setting? Currently when I do this: 1) Add Snapshot 1 with title changed and description changed, 2) Add Snapshot 2 with just title changed, 3) Merge these two and favor the Snapshot 2 when resolving conflicts, the description change of the Snapshot 1 gets lost.Resolve conflicts
is purposefully going to stay available? So it won't permanently resolve/change the Snapshot but rather you can choose which Snapshot to favor and you can change it anytime? In this case maybe the Resolve Conflicts
might be confusing? Since even if you have already chosen an option it'll still show you as if you'd need to resolve conflicts. Thoughts?This snapshot is merged from:
slug
of Snapshot is changeable from Quick Edit
, that should probably be forbidden?Customize
and make some edits, it's going to create a new merged Snapshot, is this expected? However, this new Snapshot will not be Scheduled unless scheduled specifically, so it won't actually make any changes. Maybe this can be confusing? Thoughts?@miina Thank you for testing this :) Please find the answers below.
future
snapshots comparing to date). If you start editing it, it will put that in draft
status and will allow you to edit.@PatelUtkarsh
Yes, so that allows a user to re-select setting anytime, We should rename it any thoughts on another name?
Maybe "Merge conflicts, multiple choices available." And / or a link "Change selection"? Or just "Change merge conflict selection"?
There is no logic for mergeable, We are allowing all snapshot to be able to merge discussion here #67.
Okay :+1: For me it did feel like it might get out of hand when merging different Scheduled Snapshots and then Scheduling those. Maybe it would be a good idea to somehow let the user know that the other Snapshots are still scheduled? E.g. in This snapshot is merged from:
in addition to the name and link also display (Scheduled)
in case it's scheduled? Thoughts?
Yes, so when you preview from dashboard it creates new merge snapshot with auto-draft status(merging all future snapshots comparing to date). If you start editing it, it will put that in draft status and will allow you to edit.
Will move this to #95.
@miina
Maybe "Merge conflicts, multiple choices available." And / or a link "Change selection"? Or just "Change merge conflict selection"?
Maybe "Change Merge Selection" ?
@miina
Okay 👍 For me it did feel like it might get out of hand when merging different Scheduled Snapshots and then Scheduling those. Maybe it would be a good idea to somehow let the user know that the other Snapshots are still scheduled? E.g. in This snapshot is merged from: in addition to the name and link also display (Scheduled) in case it's scheduled? Thoughts?
Yes we can add that, would that be only for scheduled or we should display all post-status? I think only schedule makes sense.
@PatelUtkarsh Agreed that only "Scheduled" is relevant to display.
@PatelUtkarsh Please merge develop
into this branch so I can review. Cheers!
@sayedtaqui I am adding dependency on #71 as it will have conflicts with it when it merges and there are some todos that we will need to fix when #71 gets merged and we can use some style for admin area from it.