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

🐞 Hide Utility Area Command tied to Inspector instead of Utility Area #1696

Closed
knotbin opened this issue Apr 30, 2024 · 0 comments · Fixed by #1697
Closed

🐞 Hide Utility Area Command tied to Inspector instead of Utility Area #1696

knotbin opened this issue Apr 30, 2024 · 0 comments · Fixed by #1697
Labels

Comments

@knotbin
Copy link
Contributor

knotbin commented Apr 30, 2024

Description

In ViewCommands, the Show/Hide state of Hide Utility Area button text is tied to the inspector instead of the utility area.
Button("\(inspectorCollapsed ? "Show" : "Hide") Utility Area")

To Reproduce

  1. Click View in the Menu Bar
  2. Click Hide Inspector
  3. Exit the window (required because of 🐞 Menu Bar Items Not Updating #1684)
  4. Reenter the window
  5. Click on View in menu bar
  6. Notice that the 'Hide Utility Area' button now says 'Show Utility Area'
  7. Click 'Show Utility Area'
  8. Exit and reenter the window
  9. Click on View in menu bar
  10. Notice the button still says 'Show Utility Area'

Expected Behavior

Hide Utility Area changes to Show Utility Area only when the Utility Area's state changes, not the inspector

Version Information

CodeEdit: 0.1.0-dev (38)
macOS: 14.4.1

Additional Context

No response

Screenshots

No response

@knotbin knotbin added the bug Something isn't working label Apr 30, 2024
thecoolwinter pushed a commit that referenced this issue May 16, 2024
### Description

<!--- REQUIRED: Describe what changed in detail -->
The issue is described in detail in #1684.

~I tried to resolve a related issue, #1696, but it was harder than I anticipated since the state of the Utility Area is stored separate to the other panes for some reason. Any ideas to resolve this slight issue would be welcome :)~

**EDIT:** I think I fixed it! 

### Related Issues

<!--- REQUIRED: Tag all related issues (e.g. * #123) -->
<!--- If this PR resolves the issue please specify (e.g. * closes #123) -->
<!--- If this PR addresses multiple issues, these issues must be related to one other -->

* Closes #1684 
* Closes #1696 

### Checklist

<!--- Add things that are not yet implemented above -->

- [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code

### Screenshots

<!--- REQUIRED: if issue is UI related -->

https://github.com/CodeEditApp/CodeEdit/assets/65467530/166d9b35-ede1-47b8-8814-cf1cbb1a61f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🏁 Complete
Development

Successfully merging a pull request may close this issue.

1 participant