Opened 13 years ago
Closed 13 years ago
#17151 closed Cleanup/optimization (fixed)
Rename 'wizard_prev_step' in NamedUrlWizardView
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.formtools | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have a wizard where users can go to any form/page (i.e. they can jump ahead a few forms if they want to), and the field 'wizard_prev_step' is poorly named in this context.
I think a better name would be 'wizard_next_step', this is at least consistent with Django's auth app's ?next=<url> URL style (i.e. "next" meaning "go to this after some action is performed").
If backwards compatibility is a major concern (which is shouldn't be since no Django release contains this stuff yet), perhaps both wizard_prev_step and wizard_next_step should be supported?
Attachments (2)
Change History (12)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
The issue I have is that it doesn't necessary take you to a previous form. It just takes you to some other form (in the docs example it only takes you backwards).
In my situation I have a few forms which are all optional, and I want the user to be able to jump around between the forms willy-nilly. In this scenario, calling the field wizard_prev_step
is wrong, because the user might be moving to the next step.
by , 13 years ago
Attachment: | 17151.diff added |
---|
comment:3 by , 13 years ago
Easy pickings: | set |
---|---|
Has patch: | set |
comment:4 by , 13 years ago
Easy pickings: | unset |
---|
wizard_next_step
seems confusing to me too, because the primary use of this feature is to return to a previous step. I believe that in the vast majority of cases, users will fill in a form wizard linearly, even if the order isn't enforce by the application.
One could make an argument for wizard_goto_step
. I can't really convince myself that it's a better name. In this case, a name that describes the most common case feels more appropriate than a technically accurate one.
comment:5 by , 13 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:7 by , 13 years ago
Triage Stage: | Design decision needed → Accepted |
---|
I wouldn't mind using 'wizard_target_step'
or 'wizard_goto_step'
, too. That said I agree this sounds like a matter of how the specific field is explained in the docs. If you can find a clear explanation of why it should have a more generic name, I'm all for changing the name (before 1.4).
comment:8 by , 13 years ago
I like wizard_goto_step
. The project I'm working on requires me to build a "tabbed wizard" -- think Windows file properties window -- where there are multiple tabs that each have a separate form. Essentially it's suppose to be break up a huge form that would normally take up a huge amount of vertical space, into separate tabs that the user can click through.
Here's a screenshot of what it looks like: http://dl.dropbox.com/u/33499139/django/tab-wizard.png
There's no requirement for the user to fill out all the forms, or to fill them out in any particular order. The tabs at the top are actually buttons that, using the current contrib.formwizard in 1.4 are named wizard_prev_step
. As you can see it doesn't make any sense to have them named this way, and rather it would make far more sense to name them wizard_goto_step
or something similar.
comment:9 by , 13 years ago
I just added a new patch with "wizard_goto_step" instead of "wizard_prev_step". I think the requested change is a good thing and should be done before the 1.4 release.
I'm not sure I undertand what the issue is here. The "prev" terminology is used throughout the
formtools
. I for one think it makes sense, since it takes you to the form that was previously posted. Could you elaborate on why this name would be confusing from a developer's standpoint?