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

🐞 Clicking "Remove Gizmo πŸ—‘οΈ" button from a Gizmo's edit page does not actually remove the Gizmo from the Section #1565

Closed
3 tasks done
Tracked by #709
zspencer opened this issue Jun 15, 2023 · 14 comments
Assignees
Labels
🐞 bug Something isn't working

Comments

@zspencer
Copy link
Member

zspencer commented Jun 15, 2023

To Do

  • Isolate reproduction steps
  • Write a test isolating the failure to remove a Gizmo
  • Fix the Bug

Steps to Reproduce:

  1. In a running instance of convene (the base dev instance for now), sign in as "space-member" via regular steps
  2. Go into "System Test"
  3. Click on either edit/settings/configure icon βš™οΈ
  4. Under "Sections", click on "Listed Room 1"
  5. Under "Gizmos", click the edit icon βš™οΈ next to "Markdown Text Block"
  6. Click "Remove Gizmo πŸ—‘οΈ"

Expected Behavior: Return to Edit screen for "Listed Room 1" with "Markdown Text Block" gone (so no Gizmos in this case)

Actual Behavior: Returned to Edit screen for "Listed Room 1" with "Markdown Text Block" still present

Note: Steps 5-6 can be repeated any number of times for a Gizmo with the same results. This also applies to the other Gizmos that have "Remove Gizmo πŸ—‘οΈ" as an option in their configure page: "Livestream" and "Embedded Form"

@zspencer
Copy link
Member Author

@KellyAH or @daltonrpruitt - Are either of you willing to write up some repro steps for this (or a test that isolates it?)

@KellyAH
Copy link
Contributor

KellyAH commented Jun 15, 2023

I have 5 assigned issues right now. I don't have anymore bandwidth for this one. Can you take it @daltonrpruitt ? Thanks. πŸ™ πŸ™‡β€β™€οΈ

@zspencer zspencer changed the title 🐞 Clicking "Remove Gizmo πŸ—‘οΈ" button from a Gizmo's edit page does not actually remove the Gizmo from the Section 🐞 Clicking "Remove Gizmo πŸ—‘οΈ" button from a Section's edit page does not actually remove the Gizmo from the Section Jun 15, 2023
@daltonrpruitt
Copy link
Contributor

Sure thing. Will try do that in a couple hours ish.

@daltonrpruitt
Copy link
Contributor

daltonrpruitt commented Jun 16, 2023

Steps to reproduce:

  1. In a running instance of convene (the base dev instance for now), sign in as "space-member" via regular steps
  2. Go into "System Test"
  3. Click on either edit/settings/configure icon βš™οΈ
  4. Under "Sections", click on "Listed Room 1"
  5. Under "Gizmos", click the edit icon βš™οΈ next to "Markdown Text Block"
  6. Click "Remove Gizmo πŸ—‘οΈ"

Expected Behavior: Return to Edit screen for "Listed Room 1" with "Markdown Text Block" gone (so no Gizmos in this case)
Actual Behavior: Returned to Edit screen for "Listed Room 1" with "Markdown Text Block" still present

Steps 5-6 can be repeated any number of times for a Gizmo with the same results.
This also applies to the other Gizmos that have "Remove Gizmo πŸ—‘οΈ" as an option in their configure page: "Livestream" and "Embedded Form"

@zspencer
Copy link
Member Author

These were great! I added some typographical flourishes and put them in the main issue body so it's easier to find without scrolling.

@zspencer
Copy link
Member Author

zspencer commented Jun 16, 2023

I'm also going to assign this to myself so I know what to pick up next, but if the spirit moves you and anyone wants to tilt at fixing it; don't let my glowering avatar stop you!

Also, if I get to it before next wednesday, it means Convene will have a system test that @KellyAH can crib off of for #1562!

@zspencer zspencer self-assigned this Jun 16, 2023
@zspencer zspencer changed the title 🐞 Clicking "Remove Gizmo πŸ—‘οΈ" button from a Section's edit page does not actually remove the Gizmo from the Section 🐞 Clicking "Remove Gizmo πŸ—‘οΈ" button from a Gizmo's edit page does not actually remove the Gizmo from the Section Jun 22, 2023
zspencer added a commit that referenced this issue Jun 22, 2023
- #1565

I probably should have deconstructed the "fix" and the Spec; but for
whastever reason the automated check doesn't *FAIL* despite it failing
when we manually execute it!

This at least gives us a system spec; and I may come back and split the
spec and the fix into two different PRs for clarity sake if requested.
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

For whatever reason the automated check doesn't *FAIL* despite it
failing when we manually execute it!
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

For whatever reason the automated check doesn't *FAIL* despite it
failing when we manually execute it!
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

OK this is also a bit much; but it does fix the bug. I'm going to try
and tighten it up a bit
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

OK this is also a bit much; but it does fix the bug. I'm going to try
and tighten it up a bit
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

OK this is also a bit much; but it does fix the bug. I'm going to try
and tighten it up a bit
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

OK this is also a bit much; but it does fix the bug. I'm going to try
and tighten it up a bit
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

OK this is also a bit much; but it does fix the bug. I'm going to try
and tighten it up a bit
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

For whatever reason the automated check doesn't *FAIL* despite it
failing when we manually execute it!
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

For whatever reason the automated check doesn't *FAIL* despite it
failing when we manually execute it!

Add Firefox to the RSpec tests

Run in Headless mode on CI

Don't send real emails in CI

save screenshots yo

Add the .env.development to the devcontaine

Add Firefox to the RSpec tests

Run in Headless mode on CI

Don't send real emails in CI

save screenshots yo
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

OK this is also a bit much; but it does fix the bug. I'm going to try
and tighten it up a bit
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

For whatever reason the automated check doesn't *FAIL* despite it
failing when we manually execute it!

Add Firefox to the RSpec tests

Run in Headless mode on CI

Don't send real emails in CI

save screenshots yo

Add the .env.development to the devcontaine

Add Firefox to the RSpec tests

Run in Headless mode on CI

Don't send real emails in CI

save screenshots yo
zspencer added a commit that referenced this issue Jun 25, 2023
- #1565

OK this is also a bit much; but it does fix the bug. I'm going to try
and tighten it up a bit
zspencer added a commit that referenced this issue Jun 25, 2023
* πŸ₯— `Gizmo`: System Spec to Add and Remove Gizmo

- #1565

For whatever reason the automated check doesn't *FAIL* despite it
failing when we manually execute it!

Add Firefox to the RSpec tests

Run in Headless mode on CI

Don't send real emails in CI

save screenshots yo

Add the .env.development to the devcontaine

Add Firefox to the RSpec tests

Run in Headless mode on CI

Don't send real emails in CI

save screenshots yo

* πŸžπŸ”¨ `Gizmo`: Fix bug where removing a Gizmo fails

- #1565

OK this is also a bit much; but it does fix the bug. I'm going to try
and tighten it up a bit
@zspencer
Copy link
Member Author

@daltonrpruitt - Can you confirm that this is fixed in production when you get a chance and then close this out?

@daltonrpruitt
Copy link
Contributor

I have tried to go through this a few times today, but I keep running into different issues when I try to get to the configure/edit page of my space.
The latest one occurs in a fresh instance when I try to go to the configuration/edit page (clicking the gear) for a room I add. The error is shown below. I think it has something to do with some of the changes we were looking at today? I can try to look at it more later.
image

Also, my fresh devcontainer instance does not have the two spaces it usually has (System Test and something else). Any insight on this? Is the bin/setup script not doing what I expected it to? Or is something else maybe going on?

@KellyAH
Copy link
Contributor

KellyAH commented Jun 26, 2023

I have tried to go through this a few times today, but I keep running into different issues when I try to get to the configure/edit page of my space. The latest one occurs in a fresh instance when I try to go to the configuration/edit page (clicking the gear) for a room I add. The error is shown below. I think it has something to do with some of the changes we were looking at today? I can try to look at it more later. image

Also, my fresh devcontainer instance does not have the two spaces it usually has (System Test and something else). Any insight on this? Is the bin/setup script not doing what I expected it to? Or is something else maybe going on?

The error implies there's no space.entrance. πŸ€” Maybe no space exists in your dev environment. I think I have to always manually create a space when start from a fresh dev environment.

Lemme delete spaces on my local and see if I can replicate the break.

πŸ€¦β€β™€οΈ I also notice I forgot to add space.entrance.furnitures.blank? to the outer if condition when coding #1593

πŸ€” Maybe I should also add a safe navigational operator too to handle nils.
<% if space&.entrance&.furnitures.blank? %>

@daltonrpruitt
Copy link
Contributor

daltonrpruitt commented Jun 26, 2023

This was after creating a space and trying to go to its edit page. So, there was no entrance, like you said, but the space did exist (I thought, anyways?)

And yeah, that next part makes sense to me, since if you are checking for both whether the entrance exists and if the entrance has furniture, then there is a non-zero chance there is no entrance to fetch furniture for. That operator seems like a good way to avoid more complex/dense branching here.
I am not familiar with the syntax, so I'm a little hesitant to say that is definitely set up to do what you want it to, but I'm sure testing or reading the docs more would clear that up.

I will try to look into this more before Wednesday's session. In the meantime, if we want this closed sooner, I will trust anyone saying it's fixed and can gladly close this. (Until I find a way to break it in a different way and have to open another issue or re-open this one for some reason... πŸ˜… 🀞 let's hope not)

@zspencer
Copy link
Member Author

Woops! I should have caught the need for a safe navigation operator when reviewing #1593! But yes, tossing a space.entrance&.gizmos.present? should fix this.

@zspencer
Copy link
Member Author

@daltonrpruitt - now that the missing-entrance-causes-boom issue is resolved; if you can retest I would be delighted!

@daltonrpruitt
Copy link
Contributor

daltonrpruitt commented Jun 28, 2023

It took a few days to get back to this, but I can confirm that the three Gizmos now behave in a way that doesn't allow this problem to occur. Thank you all for the work on this!

@zspencer
Copy link
Member Author

Thank you!!!! Also, don't hesitate to open your own bug reports! If you're not sure which Gizmo or Use Case to connect it to, just comment asking the @zinc-collective/convene-maintainers and we'll take care of it!

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

3 participants