backdrop-contrib / d2b_migrate

GNU General Public License v2.0
5 stars 6 forks source link

Update UI - Cannot visit previous steps #12

Closed liberatr closed 8 months ago

liberatr commented 8 months ago

As a user, I want to visit a previous step in the wizard, so I can review my work.

liberatr commented 8 months ago

Created PR #13

docwilmot commented 8 months ago

This would require a bit more thought to accomplish safely, I believe. We would need to put in code to make transitions between steps safe to do. For example, the database name is set first in the source step and is retrieved by config_get() in other steps; if we skip that step and jump forward to another step things would not work well. We would need to be sure that running steps twice is also safe. I'm not sure if the code would/could crash in that case, or end up with duplicates etc. If a user jumps to the last step (restore), ignoring previous checks, assuming it proceeds, I imagine lots could go wrong with a database wipe and restore.

And so on.

Someone would need to draw up a matrix showing that proceeding through steps X and Y then jumping forward or backward to step A or B or Z is safe in each case.

I would prefer, unless we make those certain, that we allow only forward movement. Perhaps adding cancel buttons would be a compromise. We could then test that the cancel action wipes and restores everything to original, before starting over.

liberatr commented 8 months ago

I'm not disagreeing with you, but there were some serious problems that are skirted by naively allowing someone to go back a step (or a few steps) at will. There is little about this project that is "safe". At the last step you blow away your entire site.

docwilmot commented 8 months ago

True, but by "safe" I really mean the code doesn't barf, not necessarily preventing you from wiping your server accidentally, etc. Perhaps if you could say what those problems were that are resolvable by back-stepping, we could make some allowance in the wizard (a "confirm X is set" or "reload step X" or "recheck downloads" and so on). That way we allow re-doing while still moving only forward.

liberatr commented 8 months ago

I don't have my notes in front of me, I think one was being able to re-download the system table. Also I know there were some issues with modules that had not gotten all of their dependencies installed (rules) and there is a known issue with Google Analytics. In my test site I also had trouble with the OAuth module but that is pretty niche.

quicksketch commented 8 months ago

We discussed this today during the D2B sprint. Those present were mostly in favor of adding the links because it's convenient for developers currently to be able to step between them "just to get it working", in the event that some step fails or just to help re-run the same step repeatedly. I found I already am moving between steps by using the back button or manipulating the URL.

Perhaps this module may get to a point where it works smoothly enough that re-running steps or skipping them isn't needed, but as this is a highly developer-oriented project currently, I think it'd be nice to make them linked for the time being.

irinaz commented 8 months ago

Do we want color of links to be black or blue?

quicksketch commented 8 months ago

@irinaz I followed-up to add the links but to style them as the default (black) text color, so it's still available to jump between pages, but it's not particularly encouraged. We could revert that last change if desired.

irinaz commented 8 months ago

@quicksketch , thanks, I wanted to double check - I was testing new features and first thought that we lost links. I think that this looks perfect - provides back door for experts, but points new users in the right direction.