Since this is an irrevocable action, an interstitial page making sure the user has carefully considered the project shortname before saving seems in order.

Comments

dww’s picture

Issue tags: +Usability, +sandbox projects

Yeah, mikey_p and I had discussed this. Probably worth doing, although I wouldn't mind getting some UX input on this before going much further...

eliza411’s picture

To get this in prior to deployment we have about 2 weeks. To get it tested thoroughly and documented, about 5 days. Hopefully we can get the feedback quickly as it would be a mistake to launch without out, I think, but not technically a blocker.

mikey_p’s picture

Sounds like a good use case for confirm_form().

dww’s picture

From IRC:

[10:33pm] dww: Bojhan: first: RFC: http://drupal.org/node/1040044
[10:33pm] Druplicon: http://drupal.org/node/1040044 => Add a confirmation page before promoting a sandbox to a full project => Project, Miscellaneous, normal, active, 3 comments, 1 IRC mention
[10:33pm] dww: Bojhan: no screenshot -- just in principle, what do you think of that?
[10:34pm] Bojhan: dww: Sounds ok.

Actively working on this now, stay tuned...

dww’s picture

Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new31.45 KB
new31.02 KB
new49.52 KB
new7.06 KB

Later in IRC:

[12:07am] dww: eliza411: you realize this form already has a confirm checkbox?
[12:07am] dww: eliza411: "I understand that this action cannot be undone and wish to proceed anyway
[12:07am] dww: Please confirm that you understand the implications of promoting this project."
[12:07am] dww: eliza411: precisely so we wouldn't have to mess with a confirm form.
[12:08am] dww: eliza411: should I...
[12:08am] dww: a) set the issue to 'works as designed'?
[12:08am] dww: b) add a confirm form and leave the checkbox?
[12:08am] dww: c) add a confirm form and remove the checkbox?
[12:08am] dww: d) other?
[12:11am] eliza411: dww: my preference is the checkbox and the confirm (or just the confirm).
[12:12am] dww: eliza411: ok
[12:12am] eliza411: dww: i've been led to believe the confirm is hard. If that's so, then leave it works as designed and we'll deal it.
[12:12am] dww: eliza411: it's not that hard
[12:12am] dww: eliza411: if you want it, i can do it
[12:12am] eliza411: dww: then lets, yes.

I was wrong, it kind of is a pain in the ass to add the confirm form. ;) You have to persist the values from the promote form into the $_SESSION so they can be used when building the confirm form at a new menu callback. It gets even weirder since project_release is altering the confirm form. But, it's all working now. And in a way it's good I went through the trouble to do project_release properly since that'll serve as an example if any other modules need to alter the promote form and deal with the confirm form.

So here's the working patch and some screenshots of the workflow. You'll notice that in the first instance, there's no 'Releases' subtab under edit at all (since it's a sandbox with releases disabled) but in the 'done' screenshot after confirming the promotion, the download section appears on the project page. If I clicked on edit you'd see a subtab for releases, etc.

dww’s picture

StatusFileSize
new31.74 KB
new7.11 KB

Based on IRC feedback from eliza411, here's a new version of the confirm form itself that stuffs the shortname into the page title, too. Other screenshots are unchanged...

eliza411’s picture

Status: Needs review » Reviewed & tested by the community

I didn't review the patch, but I think this text is ready for us to use in testing.

dww’s picture

Status: Reviewed & tested by the community » Fixed
sdboyer’s picture

Status: Fixed » Needs work
StatusFileSize
new2.05 KB

Using $_SESSION directly only appears to work, but $project->project['uri'] never gets updated in the db. When the form builder makes the second pass through the form and on submit, the session var has already been unset which means we revert back to the numerical uri. Yuck.

Attached patch gets rid of the $_SESSION approach and instead just passes it as as part of the url. Tested & verified that it works.

dww’s picture

No, that won't work when other people are extending this form, e.g. project_release. The funny thing is that project_release gets SESSION right. I just forgot to fix the shortname once I debugged project_release. ;) Stay tuned.

-Derek

sdboyer’s picture

Like I said, it does work - I've verified that the shortname gets saved properly. I may have missed something in project_release, I wasn't checking there. If you have another way of solving this that gets the shortname saved properly, though, then by all means...

dww’s picture

Status: Needs work » Fixed
StatusFileSize
new1.91 KB

Committed this to HEAD. Verified the shortname was updated. ;) Sorry about that.

dww’s picture

@sdboyer: x-post. I'm sure your patch worked for the shortname. I meant that trying to stuff everything into the URL is an unsustainable approach to this problem, which we already see in project_release. So project itself should just use SESSION properly so everyone knows how to do this if they need to extend the promote form.

sdboyer’s picture

Fair nuff, works for me. Let's hope it works clean after rebuild.

Status: Fixed » Closed (fixed)
Issue tags: -Usability, -git phase 2, -sandbox projects, -git sprint 9

Automatically closed -- issue fixed for 2 weeks with no activity.