Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Section: Cannot be removed #1841

Closed
Tracked by #1155
KellyAH opened this issue Sep 21, 2023 · 3 comments
Closed
Tracked by #1155

🐞 Section: Cannot be removed #1841

KellyAH opened this issue Sep 21, 2023 · 3 comments
Assignees
Labels
🐞 bug Something isn't working

Comments

@KellyAH
Copy link
Contributor

KellyAH commented Sep 21, 2023

Replicated on Prod: https://sandbox.zinc.coop/spaces/sandbox/edit
and Local: http://localhost:3000/spaces/<space_name>/edit

Given a space has at least 1 section.

  1. Go to any space edit page: /spaces/<space_name>/edit
  2. Click on any section to go to the section details page /spaces/<space_name>/rooms/<room-name>/edit
  3. click "Remove Section" button
  4. see "You've updated Section '' successfully! 🎉"

expected behavior

  • Section is deleted and no longer displays on the space edit page

actual behavior

  • Section fails to be deleted and still displays on the space edit page

section fail to be deleted

@KellyAH KellyAH added the 🐞 bug Something isn't working label Sep 21, 2023
@zspencer
Copy link
Member

zspencer commented Oct 1, 2023

Oof, this is not ideal. I will nab it 🔜 , unless @rosschapman, @anaulin or @KellyAH get to it first!

@zspencer zspencer mentioned this issue Jun 15, 2023
8 tasks
@zspencer zspencer changed the title Spaces: cannot Remove Section (AKA Room) Section: Cannot be removed Oct 1, 2023
@zspencer zspencer changed the title Section: Cannot be removed 🐞 Section: Cannot be removed Oct 4, 2023
@zspencer zspencer self-assigned this Oct 12, 2023
zspencer added a commit that referenced this issue Oct 19, 2023
- #1841

So, this was caused by me being FANCY and putting the delete button in
the same form as the edit and update. A bad idea.

Now, deleting a Section is handled in it's own independent form, rather
than attempting to rewrite the forms hidden `_method` field to trick
Rails into doing a destroy.

This is also better from a design perspective because:

A) omg, a delete button so close to the save button is DANGEROUS
B) Deleting a Section is kinda a big deal, and while it would be better
  to bubble-wrap the heck out of it so people who *do* delete a
  section don't wind up in a sad-mad state; we can at least give them
  lots of "DANGER WILL ROBINSON DANGER" messaging. This is...
  irresponsible of us but what we can do now. If a motivated bystander
  or contributor wanted to design and implement a way for Sections to be
  Archived instead; I would be Very Happy ™️
zspencer added a commit that referenced this issue Oct 19, 2023
- #1841

So, this was caused by me being FANCY and putting the delete button in
the same form as the edit and update. A bad idea.

Now, deleting a Section is handled in it's own independent form, rather
than attempting to rewrite the forms hidden `_method` field to trick
Rails into doing a destroy.

This is also better from a design perspective because:

A) omg, a delete button so close to the save button is DANGEROUS
B) Deleting a Section is kinda a big deal, and while it would be better
  to bubble-wrap the heck out of it so people who *do* delete a
  section don't wind up in a sad-mad state; we can at least give them
  lots of "DANGER WILL ROBINSON DANGER" messaging. This is...
  irresponsible of us but what we can do now. If a motivated bystander
  or contributor wanted to design and implement a way for Sections to be
  Archived instead; I would be Very Happy ™️
@zspencer
Copy link
Member

@KellyAH OK! This is fixed and the fix should be deployed! Can you give it a whirl?

@KellyAH
Copy link
Contributor Author

KellyAH commented Oct 19, 2023

@KellyAH OK! This is fixed and the fix should be deployed! Can you give it a whirl?

Confirmed the issues is fixed on prod. TY for fixing it!
Tested on Sandbox space: https://sandbox.zinc.coop/edit w/ user k_ahong@yahoo.com.
✅ can delete a section if it has gizmos or not.
✅ if a section has any gizmos, when clicking theRemove Section button on the section details page, a confirmation pop-up displays.
✅ if no gizmos exist for a section, after clicking Remove Section button on the section details page, a confirmation pop-up does not display.
✅ can create new sections and delete them.

@KellyAH KellyAH closed this as completed Oct 19, 2023
rosschapman pushed a commit that referenced this issue Oct 23, 2023
- #1841

So, this was caused by me being FANCY and putting the delete button in
the same form as the edit and update. A bad idea.

Now, deleting a Section is handled in it's own independent form, rather
than attempting to rewrite the forms hidden `_method` field to trick
Rails into doing a destroy.

This is also better from a design perspective because:

A) omg, a delete button so close to the save button is DANGEROUS
B) Deleting a Section is kinda a big deal, and while it would be better
  to bubble-wrap the heck out of it so people who *do* delete a
  section don't wind up in a sad-mad state; we can at least give them
  lots of "DANGER WILL ROBINSON DANGER" messaging. This is...
  irresponsible of us but what we can do now. If a motivated bystander
  or contributor wanted to design and implement a way for Sections to be
  Archived instead; I would be Very Happy ™️
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants