opened
zsarnett
username_0
## Proposed change

Places the Toggle between Code and Visual Editors on the Dialog

![image](https://user-images.githubusercontent.com/18730868/77017482-04156580-6951-11ea-90c5-6a9e940d9b87.png)


## Type of change

- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (thank you!)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests

## Additional information

- This PR fixes or closes issue: fixes #4086
- This PR is related to the issue: #4112
- Link to documentation pull request:
Card Editor: Add Toggle to Dialog
issue
created
zsarnett
username_0
Is `GUImode` Something we can change to `mode`? I hate this variable name :)
comment
created
bramkragten
username_1
How does this work with stack editors?
comment
created
zsarnett
username_0
Ha it doesn't 😄 Work on it today. Thinking adding a button here
![image](https://user-images.githubusercontent.com/18730868/77084744-c0187400-69d5-11ea-911f-01c040c45890.png)
comment
created
zsarnett
username_0
@username_2 What do you think UI wise here?

The bottom Button should toggle the whole stack to the code editor. While another button should toggle the card's mode
comment
created
SeanPM5
username_2
I like your choice, that seems like the best spot for it. Makes it clear that it's editing that stack, and keeps the buttons far away from each other to avoid any confusion 👍
comment
created
zsarnett
username_0
![aa81ae6e8118f74af5b58f11952249ef](https://user-images.githubusercontent.com/18730868/77090544-ada23880-69dd-11ea-8cd9-7924649751e3.gif)
comment
created
zsarnett
username_0
@username_1 if there isn't too much discussion on this I think it would be good for 0.108
comment
created
zsarnett
username_0
Bram, when I changed the Card Editor Dialog Toggle to send the boolean through the event and set a property on the dialog or stack editor, the event gets sent all the way up to the dialog when setting it for the card in the stack editor and I am not sure why..
Basically, calling the giomode-changed event in the card within the stack editor. The dialog sees that event as well and sets its property accordingly.

Before when calling request update it used the query selector to get the true value of GUImode from the element
And I cant figure it out :slight_smile:

@username_1  Sent this in discord but it got lost. No need to rush on  this as I don't think it needs to be in 0.108. Just looking for some insight
comment