With-the-Ranks / Spoke

With the Rank's fork of Politics Rewired's fork of Spoke
GNU General Public License v3.0
0 stars 1 forks source link

Remove "new" query parameter from campaign builder #56

Open ajohn25 opened 1 month ago

ajohn25 commented 1 month ago

Describe the bug When creating a new campaign (vs. copying from an existing one) Spoke automatically adds the query parameter new=true to the URL. This may control other Spoke behavior, but one of its effects is definitely to force navigation back to the Basics tab if the admin tries to fill in other sections of the campaign builder before the Basics tab. While this may have made sense at some point in Spoke's history, it doesn't accurately reflect how admins now interact with the campaign builder, where sections are often filled out out of order.

To Reproduce Steps to reproduce the behavior:

  1. Click the Create a Campaign button on the campaigns page (/admin/1/campaigns)
  2. Click Create New Campaign
  3. Notice the URL has new=true appended as a query parameter
  4. Don't fill in the basics tab - navigate to a different section and make a change there instead
  5. Save that section
  6. Notice Spoke navigates back to the basics tab

Expected behavior Don't force navigation back to the basics tab after saving another section.

Additional context We can likely drop this query parameter entirely, but we should document any additional behavior that this query parameter controls to ensure it's safe to remove